From 08a14db5158fa3c3dd5b7a2828dec06b54b4e916 Mon Sep 17 00:00:00 2001 From: Than McIntosh Date: Fri, 18 Sep 2015 16:47:32 -0400 Subject: 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 --- build-gcc.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'build-gcc.sh') 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 -- cgit v1.2.3