From: Augustin Degomme Date: Sat, 24 Oct 2020 15:30:39 +0000 (+0200) Subject: add -lm to flags on smpicc smpicxx. X-Git-Tag: v3.26~242 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7b21162e1dde8f8d4b9d85c53fdbb6b5bd2eca6e add -lm to flags on smpicc smpicxx. We already had these in smpif90/ff, anf gcc10 seems to not be using it by default. So this could help compatibility with some (proxy apps) codes, if harmless on other setups. Let's see. --- diff --git a/src/smpi/smpicc.in b/src/smpi/smpicc.in index 7661c53e15..19e6f14f0d 100755 --- a/src/smpi/smpicc.in +++ b/src/smpi/smpicc.in @@ -37,7 +37,7 @@ elif [ "x@APPLE@" = "x1" ]; then echo "Warning: smpicc pretends to be a regular compiler (SMPI_PRETEND_CC is set). Produced binaries will not be usable in SimGrid." fi if [ "x${SMPI_NO_UNDEFINED_CHECK}" = "x" ]; then - list_add LINKARGS "-lsimgrid" ${LINKER_UNDEFINED_ERROR:+"-Wl,-undefined,error"} + list_add LINKARGS "-lsimgrid" "-lm" ${LINKER_UNDEFINED_ERROR:+"-Wl,-undefined,error"} fi else list_add CFLAGS "-fPIC" @@ -48,7 +48,7 @@ else echo "Warning: smpicc pretends to be a regular compiler (SMPI_PRETEND_CC is set). Produced binaries will not be usable in SimGrid." fi if [ "x${SMPI_NO_UNDEFINED_CHECK}" = "x" ]; then - list_add LINKARGS "-lsimgrid" ${LINKER_UNDEFINED_ERROR:+"-Wl,-z,defs"} + list_add LINKARGS "-lsimgrid" "-lm" ${LINKER_UNDEFINED_ERROR:+"-Wl,-z,defs"} fi fi diff --git a/src/smpi/smpicxx.in b/src/smpi/smpicxx.in index c4af9cff96..5c7d39c210 100755 --- a/src/smpi/smpicxx.in +++ b/src/smpi/smpicxx.in @@ -37,7 +37,7 @@ elif [ "x@APPLE@" = "x1" ]; then echo "Warning: smpicc pretends to be a regular compiler (SMPI_PRETEND_CC is set). Produced binaries will not be usable in SimGrid." fi if [ "x${SMPI_NO_UNDEFINED_CHECK}" = "x" ]; then - list_add LINKARGS "-lsimgrid" ${LINKER_UNDEFINED_ERROR:+"-Wl,-undefined,error"} + list_add LINKARGS "-lsimgrid" "-lm" ${LINKER_UNDEFINED_ERROR:+"-Wl,-undefined,error"} fi else list_add CXXFLAGS "-fPIC" @@ -48,7 +48,7 @@ else echo "Warning: smpicc pretends to be a regular compiler (SMPI_PRETEND_CC is set). Produced binaries will not be usable in SimGrid." fi if [ "x${SMPI_NO_UNDEFINED_CHECK}" = "x" ]; then - list_add LINKARGS "-lsimgrid" ${LINKER_UNDEFINED_ERROR:+"-Wl,-z,defs"} + list_add LINKARGS "-lsimgrid" "-lm" ${LINKER_UNDEFINED_ERROR:+"-Wl,-z,defs"} fi fi