From 5079de279988b12b5653d6ed229367ef1c08b8c8 Mon Sep 17 00:00:00 2001 From: "4 of 7 (Leah Rowe)" Date: Fri, 23 Dec 2016 11:24:48 +0000 Subject: Fix build error on latest GCC in Debian Stretch, when building GCC --- resources/libreboot/patch/crossgcc/gccfix.diff | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 resources/libreboot/patch/crossgcc/gccfix.diff (limited to 'resources/libreboot') diff --git a/resources/libreboot/patch/crossgcc/gccfix.diff b/resources/libreboot/patch/crossgcc/gccfix.diff new file mode 100644 index 00000000..49e6227b --- /dev/null +++ b/resources/libreboot/patch/crossgcc/gccfix.diff @@ -0,0 +1,27 @@ +From ea0c2d76c4f16eccaafcb2c0741f76825505bafc Mon Sep 17 00:00:00 2001 +From: Nico Huber +Date: Thu, 22 Dec 2016 16:05:54 +0100 +Subject: [PATCH] DONOTMERGE buildgcc: Build GMP `--with-pic` if GCC defaults to `-pie` + +Change-Id: I5f3185af9c8d599379a628e18724b217b88be974 +Signed-off-by: Nico Huber +--- + +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 @@ + } + + 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 -- cgit v1.2.3-70-g09d2