Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add -lm to flags on smpicc smpicxx.
[simgrid.git] / src / smpi / smpicc.in
index 7661c53..19e6f14 100755 (executable)
@@ -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