diff options
| author | Vicente Olivert Riera <Vincent.Riera@imgtec.com> | 2017-07-21 18:06:31 +0100 |
|---|---|---|
| committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2017-07-21 22:48:51 +0200 |
| commit | 0af741187f6e273664da202936e79082071866f8 (patch) | |
| tree | 6f89efc85cfba8d0b9234f7808fe009b7a79b21e /toolchain | |
| parent | 1ddd41f231861bb28cfd56be55f7647fde3dd93d (diff) | |
| download | buildroot-0af741187f6e273664da202936e79082071866f8.tar.gz buildroot-0af741187f6e273664da202936e79082071866f8.zip | |
arch/mips: add option for toolchains supporting -mnan
-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>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'toolchain')
| -rw-r--r-- | toolchain/toolchain-common.in | 4 | ||||
| -rw-r--r-- | toolchain/toolchain-external/pkg-toolchain-external.mk | 2 |
2 files changed, 6 insertions, 0 deletions
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_)"' |

