Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Try to fix MC with recent GNU ld (>= 2.30).
[simgrid.git] / tools / cmake / MakeLib.cmake
index c72e6d5..9fa3a60 100644 (file)
@@ -120,6 +120,10 @@ if(CMAKE_COMPILER_IS_GNUCC AND GCCLIBATOMIC_LIBRARY)
     set(SIMGRID_DEP   "${SIMGRID_DEP}   -Wl,--as-needed -latomic -Wl,--no-as-needed")
 endif()
 
+if(enable_model-checking AND CMAKE_COMPILER_IS_GNUCC AND LINKER_VERSION VERSION_GREATER_EQUAL "2.30")
+    set(SIMGRID_DEP   "${SIMGRID_DEP}   -Wl,-znoseparate-code")
+endif()
+
 target_link_libraries(simgrid  ${SIMGRID_DEP})
 
 # Dependencies from maintainer mode