Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Try to fix MC with recent GNU ld (>= 2.30).
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 16 Jul 2018 13:15:43 +0000 (15:15 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 16 Jul 2018 13:15:47 +0000 (15:15 +0200)
It's failing with:
./src/mc/sosp/mc_checkpoint.cpp:205: [root/CRITICAL] Multiple read only segments for [...], not supported.

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