From ddb8f808940899240411282d0feb1e2f65ef43a9 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sat, 4 Jul 2015 17:45:54 +0200 Subject: 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 Reviewed-on: http://review.coreboot.org/10792 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Stefan Reinauer --- util/crossgcc/buildgcc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'util/crossgcc') 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 -- cgit v1.2.3