force static link for ifort libs
authorGengbin Zheng <gzheng@illinois.edu>
Tue, 7 Aug 2012 18:10:38 +0000 (13:10 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Tue, 7 Aug 2012 18:10:38 +0000 (13:10 -0500)
src/arch/common/cc-iccstatic.sh
src/arch/common/conv-mach-ifort.sh

index 6fb00c46ab22f9b58fce08a0a535ea841c60061a..5a6af59857d21689f4b3c817ec8a7eaa755f1830 100644 (file)
@@ -3,6 +3,8 @@ ICC_ver=`icc --version | awk -F'.' '{print $1; exit}' | awk '{print $NF}'`
 test -z "$ICC_ver" && echo "ICC compiler not found!" && exit 1
 #echo version:$ICC_ver
 
+ICC_STATIC=true
+
 if test $ICC_ver  -ge 10
 then
   ICCOPTS="-static-intel"
@@ -21,11 +23,6 @@ CMK_LD="icc $ICCOPTS"
 CMK_LDXX="icpc $ICCOPTS"
 CMK_LD_LIBRARY_PATH="-Wl,-rpath,$CHARMLIBSO/"
 
-CMK_CF90='ifc -auto '
-CMK_CF90_FIXED="$CMK_CF90 -132 -FI "
-CMK_F90LIBS='-L/usr/local/intel/compiler70/ia32/lib -L/opt/intel/compiler70/ia32/lib -lintrins -lIEPCF90 -lF90 -lintrins -limf  '
-CMK_F90_USE_MODDIR=""
-
 CMK_NATIVE_CC="$CMK_CC"
 CMK_NATIVE_CXX="$CMK_CXX"
 CMK_NATIVE_LD="$CMK_LD"
@@ -37,3 +34,10 @@ CMK_SEQ_CXX="$CMK_NATIVE_CXX"
 CMK_SEQ_LD="$CMK_NATIVE_LD"
 CMK_SEQ_LDXX="$CMK_NATIVE_LDXX"
 
+#CMK_CF90='ifc -auto '
+#CMK_CF90_FIXED="$CMK_CF90 -132 -FI "
+#CMK_F90LIBS='-L/usr/local/intel/compiler70/ia32/lib -L/opt/intel/compiler70/ia32/lib -lintrins -lIEPCF90 -lF90 -lintrins -limf  '
+#CMK_F90_USE_MODDIR=""
+
+. $CHARMINC/conv-mach-ifort.sh
+
index b2b759386b90bb14b1e00faa43abe1f87bc84b93..1d5346375bb60b2f774306630c94bdfef6244f6d 100644 (file)
@@ -23,7 +23,12 @@ then
 fi
 # for_main.o is important for main() in f90 code
 CMK_F90MAINLIBS="$F90MAIN "
+if test -z "$ICC_STATIC"
+then
 CMK_F90LIBS="-L$F90LIBDIR -lifcore -lifport "
+else
+CMK_F90LIBS="$F90LIBDIR/libifcore.a $F90LIBDIR/libifport.a "
+fi
 CMK_F77LIBS="$CMK_F90LIBS"
 
 CMK_F90_USE_MODDIR=""