Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Try to fix python tests failing with python 3.9 on fedora-rawhide.
[simgrid.git] / src / smpi / smpif90.in
index 61494c346781a04faa9e0a70560b64da2b8bd330..f1725a990fef9a690d5f679fcf89b7f79e05b2f4 100644 (file)
@@ -18,7 +18,14 @@ CMAKE_LINKARGS="-L@libdir@"
 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" "-Wl,-z,defs"
+   list_add LINKARGS "-shared"
+   if [ "x${SMPI_NO_UNDEFINED_CHECK}" = "x" ]; then
+      if [ "x@APPLE@" != "x1" ]; then
+          list_add LINKARGS "-Wl,-z,defs"
+      else
+          list_add LINKARGS "-Wl,-undefined,error"
+      fi
+   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