Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
disable on osx as -z is not supported there
[simgrid.git] / src / smpi / smpicxx.in
index dafc880..85463d9 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env sh
 
-# Copyright (c) 2014-2019. The SimGrid Team.
+# Copyright (c) 2014-2020. The SimGrid Team.
 # All rights reserved.
 
 # This program is free software; you can redistribute it and/or modify it
@@ -23,6 +23,9 @@ if [ "@WIN32@" != "1" ]; then
     list_add CXXFLAGS "-fPIC"
     if [ "x${SMPI_PRETEND_CC}" = "x" ]; then
        list_add LINKARGS "-shared"
+       if [ "@APPLE@" != "1" ]; then
+           list_add LINKARGS "-Wl,-z,defs"
+       fi
     else
        echo "Warning: smpicxx pretends to be a regular compiler (SMPI_PRETEND_CC is set). Produced binaries will not be usable in SimGrid."
     fi
@@ -32,9 +35,6 @@ else
     list_add LINKARGS "@libdir@\libsimgrid.dll"
 fi
 
-# By default, we execute the commands instead of only showing them to cmake
-show=
-
 list_set CMDARGS
 while [ $# -gt 0 ]; do
     ARG="$1"