Nico Huber (nico.h@gmx.de) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17936
-gerrit
commit ea0c2d76c4f16eccaafcb2c0741f76825505bafc Author: Nico Huber nico.huber@secunet.com Date: Thu Dec 22 16:05:54 2016 +0100
DONOTMERGE buildgcc: Build GMP `--with-pic` if GCC defaults to `-pie`
Change-Id: I5f3185af9c8d599379a628e18724b217b88be974 Signed-off-by: Nico Huber nico.huber@secunet.com --- util/crossgcc/buildgcc | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index 97c38b8..4eefd43 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -515,6 +515,13 @@ set_hostcflags_from_gmp() { }
build_GMP() { + # Check if GCC enables `-pie` by default (likely on Debian Stretch). + # We have to use `--with-pic` then. + if "${CC}" -dumpspecs 2>/dev/null | grep -q '[{;][[:space:]]*:-pie>' + then + OPTIONS="$OPTIONS --with-pic" + fi + CC="$CC" ../${GMP_DIR}/configure --disable-shared --enable-fat \ --prefix=$TARGETDIR $OPTIONS \ || touch .failed