From: mquinson Date: Tue, 17 Jul 2007 14:12:08 +0000 (+0000) Subject: disable buggy option for gcc 3.x, but use it for gcc 4.x since it was fixed since... X-Git-Tag: v3.3~1525 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/2ef44ad1ef520a0d1ade150a0dfd1e8f6d60807f disable buggy option for gcc 3.x, but use it for gcc 4.x since it was fixed since then git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3835 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/acmacro/compiler-flags.m4 b/acmacro/compiler-flags.m4 index 335791869a..2189861f07 100644 --- a/acmacro/compiler-flags.m4 +++ b/acmacro/compiler-flags.m4 @@ -72,9 +72,10 @@ AC_DEFUN([SG_COMPILE_FLAGS],[ GCC_VER=`gcc --version | head -n 1 | sed 's/^[^0-9]*\([^ ]*\).*$/\1/'` GCC_VER_MAJ=`echo $GCC_VER | sed 's/^\(.\).*$/\1/'` - if test "x$target_cpu" = "xpowerpc" && test "x$GCC_VER_MAJ" != "x2" ; then - # avoid gcc bug #12828, which is fixed in 3.4.0, but this version - # isn't propagated enough to desserve an extra check + if test "x$target_cpu" = "xpowerpc" && test "x$GCC_VER_MAJ" == "x3" ; then + # avoid gcc bug #12828, which apeared in 3.x branch and is fixed in 3.4.0 + # but the check would be too complicated to get 3.4. + # Instead, rule out any 3.x compiler. # Note that the flag didn't exist before gcc 3.0 optCFLAGS="$optCFLAGS -fno-loop-optimize"