Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/5] arch/mips: add option for toolchains supporting -mnan
@ 2017-07-21 17:06 Vicente Olivert Riera
  2017-07-21 17:06 ` [Buildroot] [PATCH 2/5] arch/mips: add option for toolchains supporting -mfpxx Vicente Olivert Riera
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Vicente Olivert Riera @ 2017-07-21 17:06 UTC (permalink / raw)
  To: buildroot

-mnan option was added in gcc-4.9.0 so make sure that users cannot
select the NaN mode when using toolchains that have a gcc older
than 4.9.0, and also make sure that the -mnan option is not passed at
all to the toolchain-wrapper and target cflags.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
 arch/Config.in.mips                                    | 1 +
 toolchain/toolchain-common.in                          | 4 ++++
 toolchain/toolchain-external/pkg-toolchain-external.mk | 2 ++
 3 files changed, 7 insertions(+)

diff --git a/arch/Config.in.mips b/arch/Config.in.mips
index de71110e08..3d2dfe3f49 100644
--- a/arch/Config.in.mips
+++ b/arch/Config.in.mips
@@ -169,6 +169,7 @@ config BR2_MIPS_NAN_2008
 
 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/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index 932eecac9a..0002682e12 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -342,6 +342,10 @@ config BR2_TOOLCHAIN_GCC_AT_LEAST
 	default "4.4"	if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
 	default "4.3"	if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
 
+config BR2_TOOLCHAIN_HAS_MNAN_OPTION
+	bool
+	default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+
 config BR2_TOOLCHAIN_HAS_SYNC_1
 	bool
 	default y
diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk
index 3263199642..23cdf30b9f 100644
--- a/toolchain/toolchain-external/pkg-toolchain-external.mk
+++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
@@ -178,10 +178,12 @@ ifneq ($(CC_TARGET_ABI_),)
 TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(CC_TARGET_ABI_)
 TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_ABI='"$(CC_TARGET_ABI_)"'
 endif
+ifeq ($(BR2_TOOLCHAIN_HAS_MNAN_OPTION),y)
 ifneq ($(CC_TARGET_NAN_),)
 TOOLCHAIN_EXTERNAL_CFLAGS += -mnan=$(CC_TARGET_NAN_)
 TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_NAN='"$(CC_TARGET_NAN_)"'
 endif
+endif
 ifneq ($(CC_TARGET_FP32_MODE_),)
 TOOLCHAIN_EXTERNAL_CFLAGS += -mfp$(CC_TARGET_FP32_MODE_)
 TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_FP32_MODE='"$(CC_TARGET_FP32_MODE_)"'
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-03-31 14:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-21 17:06 [Buildroot] [PATCH 1/5] arch/mips: add option for toolchains supporting -mnan Vicente Olivert Riera
2017-07-21 17:06 ` [Buildroot] [PATCH 2/5] arch/mips: add option for toolchains supporting -mfpxx Vicente Olivert Riera
2017-07-21 21:00   ` Thomas Petazzoni
2017-07-21 17:06 ` [Buildroot] [PATCH 3/5] arch/mips: add DSP support Vicente Olivert Riera
2018-03-31 14:57   ` Arnout Vandecappelle
2017-07-21 17:06 ` [Buildroot] [PATCH 4/5] toolchains/mips: state that Codescape toolchains support -mdspr3 Vicente Olivert Riera
2017-07-21 17:06 ` [Buildroot] [PATCH 5/5] arch/mips: add MSA support Vicente Olivert Riera
2017-07-21 20:59 ` [Buildroot] [PATCH 1/5] arch/mips: add option for toolchains supporting -mnan Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox