Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
stop checking for HAVE_GNU_LD now that we don't use the result
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 31 May 2018 09:17:08 +0000 (11:17 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 31 May 2018 09:50:56 +0000 (11:50 +0200)
The detection sometimes breaks (eg on MacOSX), and the result of this
check is not used since 2014.
See commit a79b8df1d7ee2bb82aa46cdd42cd8ae344d0f32e for why the result
is not used anymore.

CMakeLists.txt
tools/cmake/MakeLib.cmake

index 3733e2b..f45dca9 100644 (file)
@@ -428,38 +428,6 @@ else()
   SET(HAVE_SMPI 0)
 endif()
 
-#--------------------------------------------------------------------------------------------------
-### Check for GNU dynamic linker
-CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H)
-if (HAVE_DLFCN_H)
-  execute_process(COMMAND ${CMAKE_C_COMPILER} ${CMAKE_HOME_DIRECTORY}/tools/cmake/test_prog/prog_gnu_dynlinker.c ${DL_LIBRARY} -o test_gnu_ld
-                  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-                  OUTPUT_VARIABLE HAVE_GNU_LD_compil
-  )
-  if(HAVE_GNU_LD_compil)
-    set(HAVE_GNU_LD 0)
-    message(STATUS "Warning: test program toward GNU ld failed to compile:")
-    message(STATUS "${HAVE_GNU_LD_comp_output}")
-  else()
-    execute_process(COMMAND ./test_gnu_ld
-                    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-                    RESULT_VARIABLE HAVE_GNU_LD_run
-                    OUTPUT_VARIABLE var_exec
-                   )
-
-    if(NOT HAVE_GNU_LD_run)
-      set(HAVE_GNU_LD 1)
-      message(STATUS "We are using GNU dynamic linker")
-    else()
-      set(HAVE_GNU_LD 0)
-      message(STATUS "Warning: error while checking for GNU ld:")
-      message(STATUS "Test output: '${var_exec}'")
-      message(STATUS "Exit status: ${HAVE_GNU_LD_run}")
-    endif()
-    file(REMOVE test_gnu_ld)
-  endif()
-endif()
-
 #--------------------------------------------------------------------------------------------------
 ### Initialize of CONTEXT THREADS
 
index 8d65b90..b6af7e7 100644 (file)
@@ -68,7 +68,7 @@ if(HAVE_GRAPHVIZ)
   endif()
 endif()
 
-if(SIMGRID_HAVE_MC AND HAVE_GNU_LD AND NOT ${DL_LIBRARY} STREQUAL "")
+if(SIMGRID_HAVE_MC AND NOT ${DL_LIBRARY} STREQUAL "")
   SET(SIMGRID_DEP "${SIMGRID_DEP} ${DL_LIBRARY}")
 endif()