Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make smpif90 support SMPI_NO_UNDEFINED_CHECK too.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 27 May 2020 08:07:06 +0000 (10:07 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 27 May 2020 08:07:06 +0000 (10:07 +0200)
src/smpi/smpif90.in

index 4039065..f1725a9 100644 (file)
@@ -19,10 +19,12 @@ 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"
+   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."