Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
New option to detect dangerous code mixing collectives and P2P in a deadlocking way
[simgrid.git] / src / smpi / smpicc.in
index 6463ec80fbe95b929610757cfc06e21d1486d26c..0c16eebd98c4258b03e8866fb7fbb44112957bf4 100755 (executable)
@@ -29,7 +29,6 @@ if [ "x@WIN32@" = "x1" ]; then
     list_add CFLAGS "-include" "@includedir@/smpi/smpi_main.h"
     list_add LINKARGS "@libdir@\libsimgrid.dll"
 elif [ "x@APPLE@" = "x1" ]; then
-    list_add CFLAGS "-fPIC"
     if [ "x${SMPI_PRETEND_CC}" = "x" ]; then
        list_add CFLAGS "-include" "@includedir@/smpi/smpi_helpers.h"
        list_add LINKARGS "-shared"
@@ -40,7 +39,6 @@ elif [ "x@APPLE@" = "x1" ]; then
       list_add LINKARGS "-lsimgrid" "-lm" ${LINKER_UNDEFINED_ERROR:+"-Wl,-undefined,error"}
     fi
 else
-    list_add CFLAGS "-fPIC"
     if [ "x${SMPI_PRETEND_CC}" = "x" ]; then
        list_add CFLAGS "-include" "@includedir@/smpi/smpi_helpers.h"
        list_add LINKARGS "-shared"
@@ -78,7 +76,7 @@ while [ $# -gt 0 ]; do
             exit 0
             ;;
         '-trace-call-location')
-            list_add_not_empty CMDARGS "-DTRACE_CALL_LOCATION"
+            list_add CMDARGS "-DTRACE_CALL_LOCATION"
             ;;
         '-compiler-version' | '--compiler-version')
             ${CC} --version
@@ -93,6 +91,10 @@ while [ $# -gt 0 ]; do
     esac
 done
 
+if [ "x@WIN32@" != "x1" ]; then
+    list_add CMDARGS "-fPIC"
+fi
+
 list_set CMDLINE "${CC}"
 list_add_not_empty CMDLINE "${CFLAGS}"
 list_add_not_empty CMDLINE "${INCLUDEARGS}"