Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
third time's the charm. It was already done properly for smpicc, so just port it...
[simgrid.git] / src / smpi / smpif90.in
index 859db13..4039065 100644 (file)
@@ -19,6 +19,11 @@ 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
+       list_add LINKARGS "-Wl,-z,defs"
+   else
+       list_add LINKARGS "-Wl,-undefined,error"
+   fi
 else
    echo "Warning: smpif90 pretends to be a regular compiler (SMPI_PRETEND_CC is set). Produced binaries will not be usable in SimGrid."
 fi