From 5438a2afb2235a2c9161712ad1a187b35f7a7610 Mon Sep 17 00:00:00 2001 From: wolf Date: Tue, 7 May 2002 06:50:23 +0000 Subject: [PATCH] Fix bug. More on setting flags for intel icc. git-svn-id: https://svn.dealii.org/trunk@5831 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/aclocal.m4 | 63 ++++++++++++++++++++++++++++------------------ deal.II/configure | 53 +++++++++++++++++++++----------------- 2 files changed, 68 insertions(+), 48 deletions(-) diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index e1f3b86e94..889f4c05ef 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -263,13 +263,20 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl dnl #327: `NULL reference is not allowed' (this happens when we dnl write "*static_cast(0)" or some such thing, dnl which we do to create invalid references) + dnl #424: `extra ";" ignored' dnl #525: `type "DataOutBase::DataOutBase" is an inaccessible type dnl (allowed for compatibility)' (I don't understand what the dnl compiler means) - CXXFLAGSG="$CXXFLAGS -Kc++eh -Krtti -w1 -wd175 -wd525 -wd327 -DDEBUG -inline_debug_info" - CXXFLAGSO="$CXXFLAGS -Kc++eh -Krtti -O2 -tpp6 -axiMK -unroll -w0" + dnl + dnl Note: we would really like to use -ansi -Xc, since that + dnl is _very_ picky about standard C++, and is thus very efficient + dnl in detecting slight standard violations, but these flags are + dnl also very efficient in crashing the compiler (it generates a + dnl segfault) + CXXFLAGSG="$CXXFLAGS -Kc++eh -Krtti -w1 -wd175 -wd525 -wd327 -wd424 -DDEBUG -inline_debug_info" + CXXFLAGSO="$CXXFLAGS -Kc++eh -Krtti -O2 -tpp6 -axiMK -ip -unroll -w0 -wd424" CXXFLAGSPIC="-KPIC" - LDFLAGSPIC="-KPIC" + LDFLAGSPIC="-KPIC -shared" ;; compaq_cxx) @@ -737,20 +744,28 @@ AC_DEFUN(DEAL_II_SET_MULTITHREADING_FLAGS, dnl CXXFLAGSO="$CXXFLAGSO -D__USE_MALLOC" fi else - if test "x$GXX_VERSION" = "xibm_xlc" ; then - CXXFLAGSG="$CXXFLAGSG -threaded" - CXXFLAGSO="$CXXFLAGSO -threaded" - else - if test "x$GXX_VERSION" = "xcompaq_cxx" ; then - CXXFLAGSG="$CXXFLAGSG -pthread" - CXXFLAGSO="$CXXFLAGSO -pthread" - else - dnl Other compiler - AC_MSG_ERROR(No threading compiler options for this C++ compiler - specified at present) - exit 1 - fi - fi + case "$GXX_VERSION" in + ibm_xlc) + CXXFLAGSG="$CXXFLAGSG -threaded" + CXXFLAGSO="$CXXFLAGSO -threaded" + ;; + + compaq_cxx) + CXXFLAGSG="$CXXFLAGSG -pthread" + CXXFLAGSO="$CXXFLAGSO -pthread" + ;; + + intel_icc) + CXXFLAGSG="$CXXFLAGSG" + CXXFLAGSO="$CXXFLAGSO -parallel" + ;; + + *) + AC_MSG_ERROR(No threading compiler options for this C++ compiler + specified at present) + exit 1 + ;; + esac fi fi ]) @@ -1658,18 +1673,16 @@ AC_DEFUN(DEAL_II_CHECK_NAMESP_TEMPL_FRIEND_BUG, dnl [], [ AC_MSG_RESULT(no) - x="" ], [ AC_MSG_RESULT(yes. using workaround) - x="template" + AC_DEFINE_UNQUOTED(DEAL_II_NAMESP_TEMPL_FRIEND_BUG, 1, + [Define if we have to work around a bug in gcc with + marking all instances of a template class as friends + to this class if the class is inside a namespace. + See the aclocal.m4 file in the top-level directory + for a description of this bug.]) ]) - AC_DEFINE_UNQUOTED(DEAL_II_NAMESP_TEMPL_FRIEND_BUG, $x, - [Define if we have to work around a bug in gcc with - marking all instances of a template class as friends - to this class if the class is inside a namespace. - See the aclocal.m4 file in the top-level directory - for a description of this bug.]) ]) diff --git a/deal.II/configure b/deal.II/configure index a32fc806b2..01e2a82ea2 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -2841,10 +2841,10 @@ rm -f conftest.$ac_objext conftest.$ac_ext ;; intel_icc) - CXXFLAGSG="$CXXFLAGS -Kc++eh -Krtti -w1 -wd175 -wd525 -wd327 -DDEBUG -inline_debug_info" - CXXFLAGSO="$CXXFLAGS -Kc++eh -Krtti -O2 -tpp6 -axiMK -unroll -w0" + CXXFLAGSG="$CXXFLAGS -Kc++eh -Krtti -w1 -wd175 -wd525 -wd327 -wd424 -DDEBUG -inline_debug_info" + CXXFLAGSO="$CXXFLAGS -Kc++eh -Krtti -O2 -tpp6 -axiMK -ip -unroll -w0 -wd424" CXXFLAGSPIC="-KPIC" - LDFLAGSPIC="-KPIC" + LDFLAGSPIC="-KPIC -shared" ;; compaq_cxx) @@ -3120,22 +3120,31 @@ rm -f conftest.$ac_objext conftest.$ac_ext CXXFLAGSO="$CXXFLAGSO -D__USE_MALLOC" fi else - if test "x$GXX_VERSION" = "xibm_xlc" ; then - CXXFLAGSG="$CXXFLAGSG -threaded" - CXXFLAGSO="$CXXFLAGSO -threaded" - else - if test "x$GXX_VERSION" = "xcompaq_cxx" ; then - CXXFLAGSG="$CXXFLAGSG -pthread" - CXXFLAGSO="$CXXFLAGSO -pthread" - else - { { echo "$as_me:$LINENO: error: No threading compiler options for this C++ compiler - specified at present" >&5 + case "$GXX_VERSION" in + ibm_xlc) + CXXFLAGSG="$CXXFLAGSG -threaded" + CXXFLAGSO="$CXXFLAGSO -threaded" + ;; + + compaq_cxx) + CXXFLAGSG="$CXXFLAGSG -pthread" + CXXFLAGSO="$CXXFLAGSO -pthread" + ;; + + intel_icc) + CXXFLAGSG="$CXXFLAGSG" + CXXFLAGSO="$CXXFLAGSO -parallel" + ;; + + *) + { { echo "$as_me:$LINENO: error: No threading compiler options for this C++ compiler + specified at present" >&5 echo "$as_me: error: No threading compiler options for this C++ compiler - specified at present" >&2;} + specified at present" >&2;} { (exit 1); exit 1; }; } - exit 1 - fi - fi + exit 1 + ;; + esac fi fi @@ -4052,7 +4061,6 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - x="" else echo "$as_me: failed program was:" >&5 @@ -4060,16 +4068,15 @@ cat conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: yes. using workaround" >&5 echo "${ECHO_T}yes. using workaround" >&6 - x="template" - -fi -rm -f conftest.$ac_objext conftest.$ac_ext cat >>confdefs.h <<_ACEOF -#define DEAL_II_NAMESP_TEMPL_FRIEND_BUG $x +#define DEAL_II_NAMESP_TEMPL_FRIEND_BUG 1 _ACEOF +fi +rm -f conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: checking for templates and pointers to const member functions bug" >&5 echo $ECHO_N "checking for templates and pointers to const member functions bug... $ECHO_C" >&6 -- 2.39.5