aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThan McIntosh <thanm@google.com>2015-09-18 16:47:32 -0400
committerThan McIntosh <thanm@google.com>2015-09-24 14:06:51 -0400
commit08a14db5158fa3c3dd5b7a2828dec06b54b4e916 (patch)
treef3c187e2ce3d0eacaa46fea845a1b57863c637ee
parent81762471dff662de3066037f425d4dadc20be40f (diff)
downloadtoolchain_gcc-08a14db5158fa3c3dd5b7a2828dec06b54b4e916.tar.gz
toolchain_gcc-08a14db5158fa3c3dd5b7a2828dec06b54b4e916.tar.bz2
toolchain_gcc-08a14db5158fa3c3dd5b7a2828dec06b54b4e916.zip
Fix selected issues with non-4.9 gcc builds
Fix some issues that crop up when using build-gcc.sh on post-4.9 versions of GCC (for triage/bug-reproduction purposes): trunk gcc calls isl directly, no longer through "cloog", and requires updated version of ISL. Resulting build still fails compiling libatomic, however the cross compiler itself is still usable. Change-Id: I8caa936172a4b2093938bda44a452aa4d841df8d
-rwxr-xr-xbuild-gcc.sh17
1 files changed, 13 insertions, 4 deletions
diff --git a/build-gcc.sh b/build-gcc.sh
index 81cc58978..6a48195b8 100755
--- a/build-gcc.sh
+++ b/build-gcc.sh
@@ -300,9 +300,6 @@ if [ "$TOOLCHAIN" != mips* -a "$MINGW" != "yes" ]; then
EXTRA_CONFIG_FLAGS=$EXTRA_CONFIG_FLAGS" --enable-threads"
fi
-# Enable Graphite
-EXTRA_CONFIG_FLAGS=$EXTRA_CONFIG_FLAGS" --enable-graphite=yes --with-cloog-version=$CLOOG_VERSION --with-isl-version=$ISL_VERSION"
-
# Enable linker option -eh-frame-hdr also for static executable
EXTRA_CONFIG_FLAGS=$EXTRA_CONFIG_FLAGS" --enable-eh-frame-hdr-for-static"
@@ -325,8 +322,20 @@ case "$TOOLCHAIN" in
*4.8l)
CONFIGURE_GCC_VERSION=4.8l
;;
+ *)
+ ;;
esac
+GCC_MAJOR_VERSION=`echo $GCC_VERSION | cut -f1 -d.`
+
+# Enable Graphite
+EXTRA_CONFIG_FLAGS=$EXTRA_CONFIG_FLAGS" --enable-graphite=yes --with-isl-version=$ISL_VERSION"
+
+# Graphite requires cloog for gcc 4.x, but only isl for post-4.x
+if [ $GCC_MAJOR_VERSION -le 4 ]; then
+ EXTRA_CONFIG_FLAGS=$EXTRA_CONFIG_FLAGS" --with-cloog-version=$CLOOG_VERSION"
+fi
+
# Build GNU sed so the configure script works for MIPS/MIPS64 on Darwin.
# http://b/22099482
cd $BUILD_OUT && run $SRC_DIR/sed/configure
@@ -517,7 +526,7 @@ do_relink_bin gcc-$GCC_VERSION gcc
case "$TOOLCHAIN" in
aarch64*)
# Don't make ld.gold as default for now because it's new
- do_relink_bin ld ld.bfd ld.gold
+ do_relink_bin ld ld.bfd ld.gold
;;
*)
do_relink_bin ld ld.gold ld.bfd