[coreboot-gerrit] New patch to review for coreboot: buildgcc: Fix nds32le-elf cross toolchain on OS X

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Thu Apr 14 20:17:12 CEST 2016


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14365

-gerrit

commit 2fca3a56fc2f6708c0b91858a91317902f036247
Author: Stefan Reinauer <stefan.reinauer at coreboot.org>
Date:   Thu Apr 14 11:15:09 2016 -0700

    buildgcc: Fix nds32le-elf cross toolchain on OS X
    
    This is a mere workaround for the following bug in gcc:
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70668
    
    It will prevent gcc to fail with a crashing cc1 during the build
    of libgcc.
    
    Change-Id: I78b08b601a264e8d98a087beaa276cd267290dfa
    Signed-off-by: Stefan Reinauer <stefan.reinauer at coreboot.org>
---
 util/crossgcc/buildgcc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 0222b4c..e567faa 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -466,6 +466,10 @@ build_BINUTILS() {
 
 
 build_GCC() {
+	CFLAGS_FOR_TARGET="-O2 -Dinhibit_libc"
+	test $UNAME = "Darwin" -a $TARGETARCH = "nds32le-elf" && \
+		CFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET -fno-jump-tables"
+
 	# Work around crazy code generator in GCC that confuses CLANG.
 	$CC --version | grep clang >/dev/null 2>&1 && \
 		HOSTCFLAGS="$HOSTCFLAGS -fbracket-depth=1024"
@@ -477,7 +481,7 @@ build_GCC() {
 	# libiberty is not compiled with CFLAGS_FOR_BUILD.
 	# Also set the CXX version of the flags because GCC is now compiled
 	# using C++.
-	CC="$CC" CFLAGS_FOR_TARGET="-O2 -Dinhibit_libc" CFLAGS="$HOSTCFLAGS" \
+	CC="$CC" CFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET" CFLAGS="$HOSTCFLAGS" \
 		CFLAGS_FOR_BUILD="$HOSTCFLAGS" CXXFLAGS="$HOSTCFLAGS" \
 		CXXFLAGS_FOR_BUILD="$HOSTCFLAGS" ../gcc-${GCC_VERSION}/configure \
 		--prefix=$TARGETDIR --libexecdir=$TARGETDIR/lib \



More information about the coreboot-gerrit mailing list