From patchwork Tue Jan 16 18:53:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Schmitz X-Patchwork-Id: 861859 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ksj/mHvc"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zLfW30gWwz9sRV for ; Wed, 17 Jan 2018 05:53:19 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 15EDF89152; Tue, 16 Jan 2018 18:53:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2MQNAu+Ak28a; Tue, 16 Jan 2018 18:53:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 5119089110; Tue, 16 Jan 2018 18:53:13 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id E93331C2648 for ; Tue, 16 Jan 2018 18:53:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E59F988DD6 for ; Tue, 16 Jan 2018 18:53:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PXbWpUnfEHL3 for ; Tue, 16 Jan 2018 18:53:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by whitealder.osuosl.org (Postfix) with ESMTPS id 1A5CE88D32 for ; Tue, 16 Jan 2018 18:53:11 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id o7so16330140wro.8 for ; Tue, 16 Jan 2018 10:53:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=tLWXFh2TC4AVfse+OJ70rMekJqPZ8OxRER9eL4+44ZQ=; b=ksj/mHvcNDXbi9NJE75URHNriHReNcsTv+Skhxb534GwzhBItc8jazsAlWDbd7+j/m kIOel+VMnP3X8ktXbdosM4SuwKBw5/ziC2XCMGOMwWzEVv0mAOhpWkL4pP8MZfBnBX05 i6AoUaGOLCx1nxTSwivsy7Eib+ugWB+3VIOzt59XlS6qYCkMg22QCTYnJSUiEeOMNG3Z 0/CfuA3/6KOSATFHTDBAQ9KiDL6MTXipNz5kCuvLqbg0eRG3SpxuYhkUar4RTTEW61nr ieHUVAQaWRYDzm+XhEf0Cn+nV6yZ/CQMCuP+bhj/rSWsWWLYRHJIIV1ajxZSLatmFtsz kbVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=tLWXFh2TC4AVfse+OJ70rMekJqPZ8OxRER9eL4+44ZQ=; b=jxlowWpxSZW3xVPvr/fVO0LHlUJ5Sy/XnfYCs03QG+LeD3Zky/kDmEHiptPIHU/wxa s0/Wk5nFtNcPlQI7ffTVDkCGNU5fll53hu22mx36leC+5b7IAiCflBOcU16TIQnOOnyc uTbItBM/P1spgzDLt10K+UkIi77V5GUGEpqYy5iHosO25mb9MO1+omDWg+ZWIbyFkqax O9NL8UVIXljS221ZI0OFcz8fBrhtpwqs3gAz/fn31Ale0oWDP8iRhxhwW+6wUYsPebd1 0QEcyx0euJzbimLp/09or4giH/ZvfuDoELJRSfPvPdVyYetQpKcl8sTDKTYM2tGUPCLQ XH8g== X-Gm-Message-State: AKwxyteE7GCo5w6dWxfONp+B9o766GSKOsJkmT+becjE9FfMRfAGYWGi eC5Q6OuH3xvFmr9K9LWAY0YBJBxN X-Google-Smtp-Source: ACJfBoureyHuczqGSDULO28kdjehjYMyYLBTs7SGxJO18uJ8UPdXnZp77jEhzk8ANFvQiJ8MiRCdOg== X-Received: by 10.223.144.195 with SMTP id i61mr185334wri.73.1516128789305; Tue, 16 Jan 2018 10:53:09 -0800 (PST) Received: from metis.ti.rwth-aachen.de (metis.ti.rwth-aachen.de. [134.130.35.68]) by smtp.gmail.com with ESMTPSA id k17sm2402688wrf.17.2018.01.16.10.53.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Jan 2018 10:53:08 -0800 (PST) From: Johannes Schmitz To: buildroot@buildroot.org Date: Tue, 16 Jan 2018 19:53:07 +0100 Message-Id: <1516128787-20711-1-git-send-email-johannes.schmitz1@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [Buildroot] [PATCH 1/1] toolchain: use -ffp-contract=off on MIPS in the wrapper when needed X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thomas.petazzoni@free-electrons.com, Johannes Schmitz MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This fix is necessary for to build for MIPS, for example for the MIPS XBurst architecture used on ci20 boards. GCC has replaced (no)mfused-madd with ffp-contract. Find more details and a long discussion at https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00876.html Signed-off-by: Johannes Schmitz --- toolchain/toolchain-wrapper.c | 3 --- toolchain/toolchain-wrapper.mk | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/toolchain/toolchain-wrapper.c b/toolchain/toolchain-wrapper.c index 2928ea4..04b2631 100644 --- a/toolchain/toolchain-wrapper.c +++ b/toolchain/toolchain-wrapper.c @@ -79,9 +79,6 @@ static char *predef_args[] = { #ifdef BR_OMIT_LOCK_PREFIX "-Wa,-momit-lock-prefix=yes", #endif -#ifdef BR_NO_FUSED_MADD - "-mno-fused-madd", -#endif #ifdef BR_BINFMT_FLAT "-Wl,-elf2flt", #endif diff --git a/toolchain/toolchain-wrapper.mk b/toolchain/toolchain-wrapper.mk index 7f72a0c..7faa033 100644 --- a/toolchain/toolchain-wrapper.mk +++ b/toolchain/toolchain-wrapper.mk @@ -28,8 +28,12 @@ endif # Avoid FPU bug on XBurst CPUs ifeq ($(BR2_mips_xburst),y) +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_6),y) +TOOLCHAIN_WRAPPER_ARGS += -DBR_FP_CONTRACT_OFF +else TOOLCHAIN_WRAPPER_ARGS += -DBR_NO_FUSED_MADD endif +endif ifeq ($(BR2_CCACHE_USE_BASEDIR),y) TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE_BASEDIR='"$(BASE_DIR)"'