summaryrefslogtreecommitdiffstats
path: root/toolchain/toolchain-wrapper.c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2018-03-31 19:54:20 +0200
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>2018-04-01 16:23:33 +0200
commit5e58509bfe497c5e85db58f8213b0a44ac79dd3f (patch)
tree8b65d84c50b0d75bf3ba6cc72cab9c54fd2966a9 /toolchain/toolchain-wrapper.c
parent6087e548007b78ead9cb73bb4d642e3fb5236bd3 (diff)
downloadbuildroot-5e58509bfe497c5e85db58f8213b0a44ac79dd3f.tar.gz
buildroot-5e58509bfe497c5e85db58f8213b0a44ac79dd3f.zip
toolchain-wrapper: use -ffp-contract=off on MIPS Xburst for gcc >= 4.6
Since gcc 4.6, GCC deprecated -mfused-madd, -ffp-contract=off should be used for the Xburst workaround. Tested with the MIPS Sourcery 2011.03 toolchain (based on gcc 4.5), the toolchain wrapper uses -mno-fused-madd, as expected: $ BR2_DEBUG_WRAPPER=2 ./output/host/bin/mips-linux-gnu-gcc -o toto toto.c Toolchain wrapper executing: '/home/thomas/toolchains/mips-2011.03/bin/mips-linux-gnu-gcc' '--sysroot' '/home/thomas/projets/buildroot/output/host/mipsel-buildroot-linux-gnu/sysroot' '-mabi=32' '-msoft-float' '-mno-fused-madd' '-EL' '-march=mips32r2' '-o' 'toto' 'toto.c' And with the MIPS Sourcery 2012.09 toolchain (based on gcc 4.7), the toolchain wrapper uses -ffp-contract=off, as expected: $ BR2_DEBUG_WRAPPER=2 ./output/host/bin/mips-linux-gnu-gcc -o toto toto.c Toolchain wrapper executing: '/home/thomas/toolchains/mips-2012.09/bin/mips-linux-gnu-gcc' '--sysroot' '/home/thomas/projets/buildroot/output/host/mipsel-buildroot-linux-gnu/sysroot' '-mabi=32' '-msoft-float' '-ffp-contract=off' '-EL' '-march=mips32r2' '-o' 'toto' 'toto.c' Fixes the ci20_defconfig build: https://gitlab.com/buildroot.org/buildroot/-/jobs/60303132 Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> [Thomas: rework to continue supporting pre-gcc-4.6 toolchains, extend the commit log after doing more testing.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'toolchain/toolchain-wrapper.c')
-rw-r--r--toolchain/toolchain-wrapper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/toolchain/toolchain-wrapper.c b/toolchain/toolchain-wrapper.c
index 2928ea42d0..c5eb813dd0 100644
--- a/toolchain/toolchain-wrapper.c
+++ b/toolchain/toolchain-wrapper.c
@@ -82,6 +82,9 @@ static char *predef_args[] = {
#ifdef BR_NO_FUSED_MADD
"-mno-fused-madd",
#endif
+#ifdef BR_FP_CONTRACT_OFF
+ "-ffp-contract=off",
+#endif
#ifdef BR_BINFMT_FLAT
"-Wl,-elf2flt",
#endif
OpenPOWER on IntegriCloud