]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commit
toolchain-wrapper: use -ffp-contract=off on MIPS Xburst for gcc >= 4.6
authorWaldemar Brodkorb <wbx@openadk.org>
Sat, 31 Mar 2018 17:54:20 +0000 (19:54 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 8 Apr 2018 14:54:49 +0000 (16:54 +0200)
commit66238cb41351c9393fa2c68120bcb8218d90705a
tree12a480c086be3237570a94abacf5af912787731e
parent277072758a9c0de9919b1c5d17665cd9bdcb93d3
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>
(cherry picked from commit 5e58509bfe497c5e85db58f8213b0a44ac79dd3f)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
toolchain/toolchain-wrapper.c
toolchain/toolchain-wrapper.mk