From da8f64117d99c1a659a5f3682a8101de4c13439b Mon Sep 17 00:00:00 2001 From: wolf Date: Wed, 27 Jun 2001 12:12:56 +0000 Subject: [PATCH] Detect the bug in gcc3.0 (bug reports 615 and 2938) and work around it by special casing the compilation of tria_accessor_3d.o git-svn-id: https://svn.dealii.org/branches/Branch-3-1@4763 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/configure | 130 ++++++++++++++++++++------------------- deal.II/configure.in | 4 ++ deal.II/deal.II/Makefile | 9 ++- 3 files changed, 79 insertions(+), 64 deletions(-) diff --git a/deal.II/configure b/deal.II/configure index bc8debb292..36d2c6ea0f 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in Revision: 1.41.2.2 +# From configure.in Revision: 1.41.2.5 @@ -1209,6 +1209,10 @@ if test "$GXX" = yes ; then echo "$ac_t""compiler is gcc-2.97" 1>&6 GXX_VERSION=gcc2.97 ;; + *3.0*) + echo "$ac_t""compiler is gcc-3.0" 1>&6 + GXX_VERSION=gcc3.0 + ;; *2.4* | *2.5* | *2.6* | *2.7* | *2.8*) echo "$ac_t""compiler is $GXX_VERSION_STRING" 1>&6 { echo "configure: error: compiler is not supported" 1>&2; exit 1; } @@ -1237,7 +1241,7 @@ fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1241: checking for $ac_word" >&5 +echo "configure:1245: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1327,12 +1331,12 @@ fi if test "$GXX" = yes ; then echo $ac_n "checking whether -ggdb works for long symbols""... $ac_c" 1>&6 -echo "configure:1331: checking whether -ggdb works for long symbols" >&5 +echo "configure:1335: checking whether -ggdb works for long symbols" >&5 case "$target" in alpha*-osf*) CXXFLAGS="-ggdb $CXXFLAGSG" cat > conftest.$ac_ext < @@ -1353,7 +1357,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* CXXFLAGSG="-ggdb $CXXFLAGSG" @@ -1382,7 +1386,7 @@ else fi echo $ac_n "checking whether lrand48 needs to be declared with -ansi""... $ac_c" 1>&6 -echo "configure:1386: checking whether lrand48 needs to be declared with -ansi" >&5 +echo "configure:1390: checking whether lrand48 needs to be declared with -ansi" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -1392,7 +1396,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS="$CXXFLAGSG" cat > conftest.$ac_ext < @@ -1408,7 +1412,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 @@ -1429,11 +1433,11 @@ rm -f conftest* echo $ac_n "checking whether AssertThrow works with debug flags""... $ac_c" 1>&6 -echo "configure:1433: checking whether AssertThrow works with debug flags" >&5 +echo "configure:1437: checking whether AssertThrow works with debug flags" >&5 CXXFLAGS=$CXXFLAGSG cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -1461,11 +1465,11 @@ fi rm -f conftest* echo $ac_n "checking whether AssertThrow works with optimized flags""... $ac_c" 1>&6 -echo "configure:1465: checking whether AssertThrow works with optimized flags" >&5 +echo "configure:1469: checking whether AssertThrow works with optimized flags" >&5 CXXFLAGS=$CXXFLAGSO cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -1494,7 +1498,7 @@ rm -f conftest* echo $ac_n "checking for std::vector bug""... $ac_c" 1>&6 -echo "configure:1498: checking for std::vector bug" >&5 +echo "configure:1502: checking for std::vector bug" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -1504,7 +1508,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS="$CXXFLAGSG" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 @@ -1545,7 +1549,7 @@ rm -f conftest* echo $ac_n "checking for std::iterator class""... $ac_c" 1>&6 -echo "configure:1549: checking for std::iterator class" >&5 +echo "configure:1553: checking for std::iterator class" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -1555,7 +1559,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS="$CXXFLAGSG" cat > conftest.$ac_ext < @@ -1566,7 +1570,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -1603,7 +1607,7 @@ if test "$enablemultithreading" = yes ; then if test "$GXX" = yes ; then echo $ac_n "checking for platform specific thread flags""... $ac_c" 1>&6 -echo "configure:1607: checking for platform specific thread flags" >&5 +echo "configure:1611: checking for platform specific thread flags" >&5 for i in threads mt pthread pthreads mthreads Kthread kthread invalid_last_entry; do CXXFLAGS="$CXXFLAGSG -$i" @@ -1639,10 +1643,10 @@ echo "configure:1607: checking for platform specific thread flags" >&5 echo $ac_n "checking for platform specific multi-threading defines""... $ac_c" 1>&6 -echo "configure:1643: checking for platform specific multi-threading defines" >&5 +echo "configure:1647: checking for platform specific multi-threading defines" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""not necessary"" 1>&6 @@ -1708,7 +1712,7 @@ fi if test "$withmultithreading" != no ; then echo $ac_n "checking for ACE""... $ac_c" 1>&6 -echo "configure:1712: checking for ACE" >&5 +echo "configure:1716: checking for ACE" >&5 if test -d "$withmultithreading" ; then echo "$ac_t""found" 1>&6 else @@ -1728,7 +1732,7 @@ if test "${with_blas+set}" = set; then withval="$with_blas" if test "$withval" != no ; then echo $ac_n "checking for BLAS""... $ac_c" 1>&6 -echo "configure:1732: checking for BLAS" >&5 +echo "configure:1736: checking for BLAS" >&5 if test -r "$withval" ; then echo "$ac_t""found" 1>&6 else @@ -1744,7 +1748,7 @@ EOF else echo $ac_n "checking for main in -lblas""... $ac_c" 1>&6 -echo "configure:1748: checking for main in -lblas" >&5 +echo "configure:1752: checking for main in -lblas" >&5 ac_lib_var=`echo blas'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1752,14 +1756,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lblas $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1791,7 +1795,7 @@ if test "${with_lapack+set}" = set; then withval="$with_lapack" if test "$withval" != no ; then echo $ac_n "checking for LAPACK""... $ac_c" 1>&6 -echo "configure:1795: checking for LAPACK" >&5 +echo "configure:1799: checking for LAPACK" >&5 if test -r "$withval" ; then echo "$ac_t""found" 1>&6 else @@ -1807,7 +1811,7 @@ EOF else echo $ac_n "checking for dgels_ in -llapack""... $ac_c" 1>&6 -echo "configure:1811: checking for dgels_ in -llapack" >&5 +echo "configure:1815: checking for dgels_ in -llapack" >&5 ac_lib_var=`echo lapack'_'dgels_ | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1815,7 +1819,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llapack $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1896,7 +1900,7 @@ else fi echo $ac_n "checking for kdoc""... $ac_c" 1>&6 -echo "configure:1900: checking for kdoc" >&5 +echo "configure:1904: checking for kdoc" >&5 if test "$kdocdir" != ${DEAL2_DIR}/contrib/kdoc/bin ; then if test -r $kdocdir/kdoc ; then echo "$ac_t""found" 1>&6 @@ -1932,7 +1936,7 @@ if test "$docxx" = to-be-determined ; then # Extract the first word of ""doc++"", so it can be a program name with args. set dummy "doc++"; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1936: checking for $ac_word" >&5 +echo "configure:1940: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_docxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1966,7 +1970,7 @@ fi else echo $ac_n "checking for doc++""... $ac_c" 1>&6 -echo "configure:1970: checking for doc++" >&5 +echo "configure:1974: checking for doc++" >&5 if test -x "$docxx" ; then echo "$ac_t""yes" 1>&6 else @@ -1981,7 +1985,7 @@ fi echo $ac_n "checking whether getrusage is properly declared""... $ac_c" 1>&6 -echo "configure:1985: checking whether getrusage is properly declared" >&5 +echo "configure:1989: checking whether getrusage is properly declared" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -1991,7 +1995,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < @@ -2003,7 +2007,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -2021,12 +2025,12 @@ fi rm -f conftest* echo $ac_n "checking whether isnan is declared with debug flags""... $ac_c" 1>&6 -echo "configure:2025: checking whether isnan is declared with debug flags" >&5 +echo "configure:2029: checking whether isnan is declared with debug flags" >&5 CXXFLAGS=$CXXFLAGSG deal_II_isnan_flag="" cat > conftest.$ac_ext < @@ -2038,7 +2042,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -2054,7 +2058,7 @@ rm -f conftest* if test "x$deal_II_isnan_flag" = "x" ; then cat > conftest.$ac_ext < @@ -2066,7 +2070,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -2086,7 +2090,7 @@ rm -f conftest* for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do CXXFLAGS="$CXXFLAGSG $testflag" cat > conftest.$ac_ext < @@ -2098,7 +2102,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* deal_II_isnan_flag="-DHAVE_ISNAN $testflag" @@ -2111,7 +2115,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < @@ -2123,7 +2127,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* deal_II_isnan_flag="-DHAVE_UNDERSCORE_ISNAN $testflag" @@ -2145,12 +2149,12 @@ rm -f conftest* fi echo $ac_n "checking whether isnan is declared with optimized flags""... $ac_c" 1>&6 -echo "configure:2149: checking whether isnan is declared with optimized flags" >&5 +echo "configure:2153: checking whether isnan is declared with optimized flags" >&5 CXXFLAGS=$CXXFLAGSO deal_II_isnan_flag="" cat > conftest.$ac_ext < @@ -2162,7 +2166,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -2178,7 +2182,7 @@ rm -f conftest* if test "x$deal_II_isnan_flag" = "x" ; then cat > conftest.$ac_ext < @@ -2190,7 +2194,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -2210,7 +2214,7 @@ rm -f conftest* for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do CXXFLAGS="$CXXFLAGSO $testflag" cat > conftest.$ac_ext < @@ -2222,7 +2226,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* deal_II_isnan_flag="-DHAVE_ISNAN $testflag" @@ -2235,7 +2239,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < @@ -2247,7 +2251,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* deal_II_isnan_flag="-DHAVE_UNDERSCORE_ISNAN $testflag" @@ -2275,16 +2279,16 @@ rm -f conftest* CXXFLAGS="$CXXFLAGSG" echo $ac_n "checking for consistency of CXXFLAGSG flags""... $ac_c" 1>&6 -echo "configure:2279: checking for consistency of CXXFLAGSG flags" >&5 +echo "configure:2283: checking for consistency of CXXFLAGSG flags" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -2302,16 +2306,16 @@ rm -f conftest* CXXFLAGS="$CXXFLAGSO" echo $ac_n "checking for consistency of CXXFLAGSO flags""... $ac_c" 1>&6 -echo "configure:2306: checking for consistency of CXXFLAGSO flags" >&5 +echo "configure:2310: checking for consistency of CXXFLAGSO flags" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 diff --git a/deal.II/configure.in b/deal.II/configure.in index e92c0ae6d9..9e4359dd3d 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -133,6 +133,10 @@ if test "$GXX" = yes ; then AC_MSG_RESULT(compiler is gcc-2.97) GXX_VERSION=gcc2.97 ;; + *3.0*) + AC_MSG_RESULT(compiler is gcc-3.0) + GXX_VERSION=gcc3.0 + ;; *2.4* | *2.5* | *2.6* | *2.7* | *2.8*) dnl These compilers are too old to support a useful subset dnl of modern C++, so we don't support them diff --git a/deal.II/deal.II/Makefile b/deal.II/deal.II/Makefile index 8459c93322..0726713e8c 100644 --- a/deal.II/deal.II/Makefile +++ b/deal.II/deal.II/Makefile @@ -94,12 +94,19 @@ lib/3d/o/q1_mapping.jacobians_3d.o: @echo =====deal.II====3d====opt==spec==$(MT)== $(<:source/%=%) @$(CXX) $(filter-out -O2 -Wuninitialized,$(CXXFLAGS.o)) -Ddeal_II_dimension=3 -c $< -o $@ -ifeq ($(GXX-Version),gcc2.95) +ifeq ($(GXX-VERSION),gcc2.95) lib/2d/o/fe_lib.quartic_2d.o: @echo =====deal.II====2d====opt==spec==$(MT)== $(<:source/%=%) @$(CXX) $(filter-out -O2 -Wuninitialized,$(CXXFLAGS.o)) -Ddeal_II_dimension=2 -c $< -o $@ endif +# work around a bug in gcc (see gcc bug reports 615 and 2938) +ifeq ($(GXX-VERSION),gcc3.0) +lib/3d/o/tria_accessor_3d.o: + @echo =====deal.II====3d====opt==spec==$(MT)== $(<:source/%=%) + @$(CXX) $(filter-out -O2 -Wuninitialized,$(CXXFLAGS.o)) -Ddeal_II_dimension=3 -c $< -o $@ +endif + # rules how to make the libraries themselves -- 2.39.5