diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2016-06-17 21:41:00 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2016-07-21 11:49:25 +0200 |
commit | 7899db23557cc5eacadf42b53eaad5ebc0fe0c0e (patch) | |
tree | 56b309af12a3717cbd899c861d63261f0dbd8b95 /util/crossgcc | |
parent | 67870f508fbec35be393efccdac2c658cbc40ed0 (diff) | |
download | coreboot-7899db23557cc5eacadf42b53eaad5ebc0fe0c0e.tar.xz |
buildgcc: Never set GMP CFLAGS manually in order to get the right flags
When no CFLAGS are explicitly provided to it, the GMP configure script
will figure out the best optimization flags to use on its own. In
particular, it will setup the march, mfpu and mtune flags based on
hardware detection.
However, when CFLAGS are provided, they are used as-is and such
detection doesn't happen. When the march, mfpu and mtune flags are not
provided (which happens when GMP wasn't built already), not only will
related optimizations be disabled, but some code might not build because
of missing support. This happens with NEON instructions on ARMv7 hosts.
Thus, it is better not to set CFLAGS and leave it up to the GMP
configure script to get them right and still reuse those later.
Change-Id: I6ffcbac1298523d1b8ddf29a8bca1b00298828a7
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-on: https://review.coreboot.org/15452
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'util/crossgcc')
-rwxr-xr-x | util/crossgcc/buildgcc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index da3f0f2b3a..49f6f4cc10 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -440,8 +440,7 @@ set_hostcflags_from_gmp() { } build_GMP() { - CC="$CC" CFLAGS="$HOSTCFLAGS" \ - ../${GMP_DIR}/configure --disable-shared --enable-fat \ + CC="$CC" ../${GMP_DIR}/configure --disable-shared --enable-fat \ --prefix=$TARGETDIR $OPTIONS \ || touch .failed $MAKE $JOBS || touch .failed |