From 82a897325fb283a60eff051eae0d2e9676b88baa Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Wed, 13 May 2020 13:15:24 +0200 Subject: [PATCH] add definitions check to link phase in SMPI (gh #342).. let's see how many ci workers complain --- src/smpi/smpicc.in | 2 +- src/smpi/smpicxx.in | 2 +- src/smpi/smpif90.in | 2 +- src/smpi/smpiff.in | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/smpi/smpicc.in b/src/smpi/smpicc.in index dcf80e7db4..60c0e45ff8 100755 --- a/src/smpi/smpicc.in +++ b/src/smpi/smpicc.in @@ -32,7 +32,7 @@ elif [ "x@APPLE@" = "x1" ]; then list_add CFLAGS "-include" "@includedir@/smpi/smpi_helpers.h" list_add CFLAGS "-fPIC" if [ "x${SMPI_PRETEND_CC}" = "x" ]; then - list_add LINKARGS "-shared" + list_add LINKARGS "-shared" "-Wl,-z,defs" else echo "Warning: smpicc pretends to be a regular compiler (SMPI_PRETEND_CC is set). Produced binaries will not be usable in SimGrid." fi diff --git a/src/smpi/smpicxx.in b/src/smpi/smpicxx.in index 1e09148e9d..414b1f3d7f 100755 --- a/src/smpi/smpicxx.in +++ b/src/smpi/smpicxx.in @@ -22,7 +22,7 @@ if [ "@WIN32@" != "1" ]; then list_add CXXFLAGS "-include" "@includedir@/smpi/smpi_helpers.h" list_add CXXFLAGS "-fPIC" if [ "x${SMPI_PRETEND_CC}" = "x" ]; then - list_add LINKARGS "-shared" + list_add LINKARGS "-shared" "-Wl,-z,defs" else echo "Warning: smpicxx pretends to be a regular compiler (SMPI_PRETEND_CC is set). Produced binaries will not be usable in SimGrid." fi diff --git a/src/smpi/smpif90.in b/src/smpi/smpif90.in index 859db13287..61494c3467 100644 --- a/src/smpi/smpif90.in +++ b/src/smpi/smpif90.in @@ -18,7 +18,7 @@ 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" + list_add LINKARGS "-shared" "-Wl,-z,defs" else echo "Warning: smpif90 pretends to be a regular compiler (SMPI_PRETEND_CC is set). Produced binaries will not be usable in SimGrid." fi diff --git a/src/smpi/smpiff.in b/src/smpi/smpiff.in index 91f1afe5e3..2c2b152965 100644 --- a/src/smpi/smpiff.in +++ b/src/smpi/smpiff.in @@ -18,7 +18,7 @@ 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" + list_add LINKARGS "-shared" "-Wl,-z,defs" else echo "Warning: smpiff pretends to be a regular compiler (SMPI_PRETEND_CC is set). Produced binaries will not be usable in SimGrid." fi -- 2.20.1