]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix bug. More on setting flags for intel icc.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 7 May 2002 06:50:23 +0000 (06:50 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 7 May 2002 06:50:23 +0000 (06:50 +0000)
git-svn-id: https://svn.dealii.org/trunk@5831 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/configure

index e1f3b86e943387d478bdf938100d28e823dbc14c..889f4c05efbbb8000c41de97cfed03779216e114 100644 (file)
@@ -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<double*>(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.])
 ])
 
 
index a32fc806b2eaefc3b065feb41a5b15aa2e0c2fdd..01e2a82ea2f833593fb615f56e25a3ee607e2e6c 100755 (executable)
@@ -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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.