summaryrefslogtreecommitdiff
path: root/util/crossgcc/buildgcc
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2015-07-04 17:45:54 +0200
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-07-04 23:39:34 +0200
commitddb8f808940899240411282d0feb1e2f65ef43a9 (patch)
tree77e69af9310f0ebe9db18b02a228d14500bd9343 /util/crossgcc/buildgcc
parent8d7b719c0e8c6f50315e6ea8f13ddb188130aa53 (diff)
downloadcoreboot-ddb8f808940899240411282d0feb1e2f65ef43a9.tar.xz
buildgcc: Deal with gmp on 32bit Linux on 64bit CPUs
GMP is overeager to detect 64bit ABIs even if the entire running codebase is 32bit (but on a 64bit CPU). Enforce a 32bit build in that situation. Change-Id: I23e9e57f3c8b0e3ad2e4e1e3eb106f7830aa76a1 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/10792 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/crossgcc/buildgcc')
-rwxr-xr-xutil/crossgcc/buildgcc6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index b78b14194b..e0b4ed40eb 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -615,6 +615,12 @@ if [ $UNAME = "Darwin" ]; then
if $CC -v 2>&1 | grep -q LLVM; then
CC=llvm-gcc
fi
+elif [ $UNAME = "Linux" ]; then
+ # gmp is overeager with detecting 64bit CPUs even if they run
+ # a 32bit kernel and userland.
+ if [ "$(uname -m 2>/dev/null)" = "i686" ]; then
+ OPTIONS="ABI=32"
+ fi
fi
fi # GCC