Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
SMPI : Allow to deactivate link-time definitions check with an environment var
[simgrid.git] / src / smpi / smpiff.in
index 7c419de..7ce663c 100644 (file)
@@ -19,11 +19,13 @@ list_set FFLAGS @SMPI_Fortran_FLAGS@
 list_set LINKARGS "-lsimgrid" @SMPI_Fortran_LIBS@ "-lm"
 if [ "x${SMPI_PRETEND_CC}" = "x" ]; then
    list_add LINKARGS "-shared"
-   if [ "x@APPLE@" != "x1" ]; then
+   if [ "x${SMPI_NO_UNDEFINED_CHECK}" = "x" ]; then
+     if [ "x@APPLE@" != "x1" ]; then
        list_add LINKARGS "-Wl,-z,defs"
-   else
+     else
        list_add LINKARGS "-Wl,-undefined,error"
-   fi 
+     fi
+   fi
 else
    echo "Warning: smpiff pretends to be a regular compiler (SMPI_PRETEND_CC is set). Produced binaries will not be usable in SimGrid."
 fi