work around ICE in gcc 4.4.x

This commit is contained in:
Martin Reinecke 2013-04-15 08:56:20 +02:00
parent 96999dcf00
commit 40ca46800e
2 changed files with 13 additions and 12 deletions

View file

@ -1,10 +1,7 @@
GNU make is required for compilation.
Libsharp compilation has been successfully tested with GNU and Intel compilers.
When using gcc, version 4.x is required.
NOTE: Some versions of the gcc 4.4.x release series contain a bug which causes
the compiler to crash during libsharp compilation. This appears to be fixed
in the gcc 4.4.7 release.
When using gcc, version 4.x is required [1].
Since libsharp was written in standard C99, other compilers should work fine,
but SSE2/AVX support will most likely be deactivated.
@ -24,3 +21,10 @@ Documentation can be created by the command "(g)make doc".
However this requires the doxygen application to be installed
on your system.
The documentation will be created in the subdirectory doc/.
[1] Some versions of the gcc 4.4.x release series contain a bug which causes
the compiler to crash during libsharp compilation. This appears to be fixed
in the gcc 4.4.7 release. It is possible to work around this problem by adding
the compiler flag "-fno-tree-fre" after the other optimization flags - the
configure script should do this automatically.

View file

@ -53,19 +53,16 @@ case $CCTYPE in
GCCVERSION="`$CC -dumpversion 2>&1`"
echo "Using gcc version $GCCVERSION"
AC_SUBST(GCCVERSION)
case $system in
Darwin-*)
;;
*)
CCFLAGS="$CCFLAGS -ffunction-sections -fdata-sections"
;;
esac
changequote(,)
gcc43=`echo $GCCVERSION | grep -c '4\.[3456789]'`
gcc43=`echo $GCCVERSION | grep -c '^4\.[3456789]'`
gcc44=`echo $GCCVERSION | grep -c '^4\.4'`
changequote([,])
if test $gcc43 -gt 0; then
CCFLAGS="$CCFLAGS -march=native"
fi
if test $gcc44 -gt 0; then
CCFLAGS="$CCFLAGS -fno-tree-fre"
fi
;;
icc)
CCFLAGS="-O3 -xHOST -std=c99 -ip -Wbrief -Wall -vec-report0 -openmp-report0 -wd383,981,1419,1572"