]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Adjust command line options to gcc-style as used in more recent icc versions.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 30 Jun 2007 01:17:01 +0000 (01:17 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 30 Jun 2007 01:17:01 +0000 (01:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@14831 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 8ee9a8282536e7a562ee3185576f653677bf59f7..8739cb90e5cdd537b8c18044c659a99e4fd4c2af 100644 (file)
@@ -592,6 +592,26 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl
           ;;
   
       intel_icc*)
+          dnl Earlier icc versions used -Kxxx for flags. Later versions use
+          dnl the gcc convention -fxxx
+         dnl
+         dnl Exception handling is also standard in later versions, as is rtti
+         case "$GXX_VERSION" in
+           intel_icc[56789])
+             CXXFLAGSG="$CXXFLAGS -Kc++eh -Krtti -DDEBUG -inline_debug_info"
+              CXXFLAGSO="$CXXFLAGS -Kc++eh -Krtti -O2 -unroll"
+              CXXFLAGSPIC="-KPIC"
+              LDFLAGSPIC="-KPIC"
+              ;;
+
+           intel_icc*)
+             CXXFLAGSG="$CXXFLAGS -DDEBUG -inline_debug_info"
+              CXXFLAGSO="$CXXFLAGS -O2 -unroll"
+              CXXFLAGSPIC="-fPIC"
+              LDFLAGSPIC="-fPIC"
+              ;;
+          esac
+
           dnl Disable some compiler warnings, as they often are wrong on
           dnl our code:
          dnl  #11: ` unrecognized preprocessing directive" (we use
@@ -610,10 +630,8 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl
          dnl       (valid, but annoying and sometimes hard to work around)
          dnl #858: `type qualifier on return type is meaningless'
          dnl       (on conversion operators to types that are already const)
-          CXXFLAGSG="$CXXFLAGS -Kc++eh -Krtti -w1 -wd175 -wd525 -wd327 -wd424 -wd11 -wd734 -wd858 -DDEBUG -inline_debug_info"
-          CXXFLAGSO="$CXXFLAGS -Kc++eh -Krtti -O2 -unroll -w0 -wd424 -wd11"
-          CXXFLAGSPIC="-KPIC"
-          LDFLAGSPIC="-KPIC"
+          CXXFLAGSG="$CXXFLAGSG -w1 -wd175 -wd525 -wd327 -wd424 -wd11 -wd734 -wd858"
+          CXXFLAGSO="$CXXFLAGSO -w0 -wd424 -wd11"
 
           dnl To reduce output, use -opt_report_levelmin where possible,
           dnl i.e. post icc5
index c26ddc4af29a809c5ce7b4c46560452d6f295023..8cef10269d947a5e254bd7f3828f78ed4f76770d 100755 (executable)
@@ -4187,10 +4187,24 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
           ;;
 
       intel_icc*)
-                                                                                                                                                                           CXXFLAGSG="$CXXFLAGS -Kc++eh -Krtti -w1 -wd175 -wd525 -wd327 -wd424 -wd11 -wd734 -wd858 -DDEBUG -inline_debug_info"
-          CXXFLAGSO="$CXXFLAGS -Kc++eh -Krtti -O2 -unroll -w0 -wd424 -wd11"
-          CXXFLAGSPIC="-KPIC"
-          LDFLAGSPIC="-KPIC"
+                                         case "$GXX_VERSION" in
+           intel_icc56789)
+             CXXFLAGSG="$CXXFLAGS -Kc++eh -Krtti -DDEBUG -inline_debug_info"
+              CXXFLAGSO="$CXXFLAGS -Kc++eh -Krtti -O2 -unroll"
+              CXXFLAGSPIC="-KPIC"
+              LDFLAGSPIC="-KPIC"
+              ;;
+
+           intel_icc*)
+             CXXFLAGSG="$CXXFLAGS -DDEBUG -inline_debug_info"
+              CXXFLAGSO="$CXXFLAGS -O2 -unroll"
+              CXXFLAGSPIC="-fPIC"
+              LDFLAGSPIC="-fPIC"
+              ;;
+          esac
+
+                                                                                                                                                                           CXXFLAGSG="$CXXFLAGSG -w1 -wd175 -wd525 -wd327 -wd424 -wd11 -wd734 -wd858"
+          CXXFLAGSO="$CXXFLAGSO -w0 -wd424 -wd11"
 
                               if test "x$GXX_VERSION" != "xintel_icc5" ; then
             CXXFLAGSO="$CXXFLAGSO -opt_report_levelmin"

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.