The ISL version we download from download_prerequesites on the GCC 6 
branch (0.15) has a trailing comma at the end of an enumerator list.
This causes GCC 4.3.4 to error as we are compiling with -pedantic
(GCC 4.4 and up just warn).  The following fixes this bootstrap issue
by patching the ISL sources after downloading them.

Tested on SLE11 SP4 with GCC 4.3.4 host compiler (where I also reproduced
the issue).

As we control ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.15.tar.bz2
the sed expression is quite simplistic.

Ok for the GCC 6 branch?

I hope mv can reliably overwrite the destination on all supported
hosts (not sure if -f is portable).  I can use cp as well, of course.
I hope && outside of 'if' is portable as well.

Thanks,
Richard.

2016-08-17  Richard Biener  <rguent...@suse.de>

        * download_prerequisites: Patch ISL 0.15 to remove trailing comma
        which causes PR77297.

Index: contrib/download_prerequisites
===================================================================
--- contrib/download_prerequisites      (revision 239479)
+++ contrib/download_prerequisites      (working copy)
@@ -52,5 +52,7 @@ if [ "$GRAPHITE_LOOP_OPT" = "yes" ] ; th
 
   wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$ISL.tar.bz2 || exit 1
   tar xjf $ISL.tar.bz2  || exit 1
+  # Fix trailing comma which errors with -pedantic for host GCC <= 4.3
+  sed -e 's/isl_stat_ok = 0,/isl_stat_ok = 0/' isl-0.15/include/isl/ctx.h > 
isl-0.15/include/isl/ctx.h.tem && mv isl-0.15/include/isl/ctx.h.tem 
isl-0.15/include/isl/ctx.h
   ln -sf $ISL isl || exit 1
 fi

Reply via email to