From patchwork Sun Sep 3 09:53:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 809247 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.137; helo=fraxinus.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="liejOK8x"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xlSx82jR8z9s76 for ; Sun, 3 Sep 2017 19:54:04 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7D5B786975; Sun, 3 Sep 2017 09:54:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qHWm2nw5pssj; Sun, 3 Sep 2017 09:54:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1AB3B86931; Sun, 3 Sep 2017 09:54:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id EC1891C41C7 for ; Sun, 3 Sep 2017 09:53:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id DFAA527550 for ; Sun, 3 Sep 2017 09:53:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RcBTz+CszK0c for ; Sun, 3 Sep 2017 09:53:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by silver.osuosl.org (Postfix) with ESMTPS id 0A96723262 for ; Sun, 3 Sep 2017 09:53:58 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id l19so3887466wmi.1 for ; Sun, 03 Sep 2017 02:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=ph9ZXz+Kvc89rTeTKzrO+YrwKHVK1JlPuPDcY2EmRzQ=; b=liejOK8xj4kpFlGNYzATN429X4smf5eG85vp3iAi28WIcGvOdkRSbuHRnACWds41Wo xke87gGKAliDnZo2FAB97VOrg3F/v44jmj9mj7a1Tsoi9LclfFkxzNW/2SHYJ573Mp5/ hpLGuuCLA31xnTDrs7IcXaNOoqWjpcjFE1mCzO+RLdcT/6rWsO4J8ZnMaU4mU+8imW7F DRCInE6c6FaETJt0BLwDP2w5Tsk69gXKPzcxI7yG7gfvcn1I41QVhGbTLWlByYBsOiuB 8nTT3r6nRDxA9lowHppksNeZGZtX5d9XI6qO4J5N3Hc+c4l7TnLxEuE9HP//9lTfTeP1 nYyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=ph9ZXz+Kvc89rTeTKzrO+YrwKHVK1JlPuPDcY2EmRzQ=; b=ZeYZ1Rrc9zarzJqrs9EilHW73I7QwfdKfgplj6a3c1rctXfZV0c9vJB6H1komprhue uLZ1eoMmOu+Iwob6zo9gIiTYfq9uxAqzBxFTDg0V5tYkxLj3FqXWAE3rzLXQEc7mjHIK 42ffs+asqeWP9pY2XdNUU5IpDmeiQpQL2Nru5m/nJ5hFv/NjVF7F+WocIldSx4WLWofr 6Xf/W3Ivs+KpeJFYwVYnBpmCe3YEXp9NMWccPHjpCEhKqynApmpnE4tDpmtjq7HmhZwM xVe/E76bZ2+z4QByNeQrh/2mM/c1SAEdtFM5r2lYQkfZiCdXWW0LhfCRO/TG3hixHFsi 6osA== X-Gm-Message-State: AHPjjUg5N3hg/0NenhRe66Ch05ikiEhMc3NxcMlJFjJd8WkwCnalfQc9 bcrhIaMdF3ycgRly X-Google-Smtp-Source: ADKCNb6BSzMqcII0x5a1HoRR3He2+oHeIaP0YdHtQ7297JqN4iX+rscJiz3OEe5QD2LSjeDkv/iHiA== X-Received: by 10.28.232.70 with SMTP id f67mr2407846wmh.144.1504432436290; Sun, 03 Sep 2017 02:53:56 -0700 (PDT) Received: from localhost.localdomain (2a01cb0886107300d49b0f6dfb1eb067.ipv6.abo.wanadoo.fr. [2a01:cb08:8610:7300:d49b:f6d:fb1e:b067]) by smtp.gmail.com with ESMTPSA id w16sm3777451wmw.2.2017.09.03.02.53.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Sep 2017 02:53:55 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sun, 3 Sep 2017 11:53:50 +0200 Message-Id: <585dda9412d61d550fc9c6fa76a29e7e878ceec0.1504432422.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: Cc: Thomas Petazzoni , "Yann E. MORIN" , Vicente Olivert Riera Subject: [Buildroot] [PATCH 1/3] arch/mips: inverse the NaN logic X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Currentlym the possibility to choose the NaN encoding is conditional to having a sufficiently recent gcc version. Which means that the architecture selection depends on the gcc version. But that's opposite to what we've always done in Buildroot: the software versions are conditional to the architecture options. There is nothing we can do about the hardware: it is there, we can't change it, while we can restrict ourselves to using software that is working on said hardware. Thus, we inverse the logic, to move the condition onto the software side: whenever NaN-2008 are selected, we restrict the toolchain selection to at least a gcc-4.9. But now, the option with the NaN type is always set, so we must enclose the code in gcc.mk inside a HAS_NAN_OPTION condition, as is already done for the external toolchain case. Signed-off-by: "Yann E. MORIN" Cc: Thomas Petazzoni Cc: Vicente Olivert Riera --- arch/Config.in.mips | 2 +- package/gcc/gcc.mk | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/Config.in.mips b/arch/Config.in.mips index c08b2a2968..13d1a477e6 100644 --- a/arch/Config.in.mips +++ b/arch/Config.in.mips @@ -176,10 +176,10 @@ config BR2_MIPS_NAN_LEGACY config BR2_MIPS_NAN_2008 bool + select BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9 choice prompt "Target NaN" - depends on BR2_TOOLCHAIN_HAS_MNAN_OPTION depends on BR2_mips_32r5 || BR2_mips_64r5 default BR2_MIPS_ENABLE_NAN_2008 help diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk index 49ccccf56f..d45b6d7a06 100644 --- a/package/gcc/gcc.mk +++ b/package/gcc/gcc.mk @@ -207,9 +207,11 @@ endif ifneq ($(call qstrip,$(BR2_GCC_TARGET_ABI)),) HOST_GCC_COMMON_CONF_OPTS += --with-abi=$(BR2_GCC_TARGET_ABI) endif +ifeq ($(BR2_TOOLCHAIN_HAS_MNAN_OPTION),y) ifneq ($(call qstrip,$(BR2_GCC_TARGET_NAN)),) HOST_GCC_COMMON_CONF_OPTS += --with-nan=$(BR2_GCC_TARGET_NAN) endif +endif ifneq ($(call qstrip,$(BR2_GCC_TARGET_FP32_MODE)),) HOST_GCC_COMMON_CONF_OPTS += --with-fp-32=$(BR2_GCC_TARGET_FP32_MODE) endif