]> https://gitweb.dealii.org/ - dealii.git/commitdiff
do not use gold linker by default
authorTimo Heister <timo.heister@gmail.com>
Thu, 13 Feb 2025 14:58:09 +0000 (09:58 -0500)
committerTimo Heister <timo.heister@gmail.com>
Thu, 13 Feb 2025 14:58:09 +0000 (09:58 -0500)
We have been detecting the existence of the gold linker and
automatically try to use it. This PR removes this for the following
reasons:
1. gold linker is now deprecated,
https://lists.gnu.org/archive/html/info-gnu/2025-02/msg00001.html
2. it sometimes breaks linking, especially with MPI
3. lld and especially mold are much better

cmake/checks/check_02_compiler_features.cmake
cmake/setup_sanity_checks.cmake

index 2a9cf3d709e6a1b246f38180746c060b3f9c5144..0b5d14e8f633a0b83ae1cb0fdcfd928698dc16d6 100644 (file)
@@ -401,8 +401,6 @@ if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
     add_flags(DEAL_II_LINKER_FLAGS "-fuse-ld=mold")
   elseif(DEAL_II_COMPILER_HAS_FUSE_LD_LLD)
     add_flags(DEAL_II_LINKER_FLAGS "-fuse-ld=lld")
-  elseif(DEAL_II_COMPILER_HAS_FUSE_LD_GOLD)
-    add_flags(DEAL_II_LINKER_FLAGS "-fuse-ld=gold")
   endif()
 
   reset_cmake_required()
index 16f7988834ca927eb1448f10b07f2a075d81f41e..99697666d18389460c7eac3d00ebf760d451dd78 100644 (file)
@@ -63,8 +63,6 @@ foreach(build ${DEAL_II_BUILD_TYPES})
     set(_replacement "")
     if(DEAL_II_COMPILER_HAS_FUSE_LD_LLD)
       set(_replacement "-fuse-ld=lld")
-    elseif(DEAL_II_COMPILER_HAS_FUSE_LD_GOLD)
-      set(_replacement "-fuse-ld=gold")
     endif()
     _drop_linker_flag(
       "-fuse-ld=mold" ${_replacement}
@@ -75,9 +73,6 @@ foreach(build ${DEAL_II_BUILD_TYPES})
 
   if(NOT DEAL_II_HAVE_USABLE_FLAGS_${build} AND DEAL_II_COMPILER_HAS_FUSE_LD_LLD)
     set(_replacement "")
-    if(DEAL_II_COMPILER_HAS_FUSE_LD_GOLD)
-      set(_replacement "-fuse-ld=gold")
-    endif()
     _drop_linker_flag(
       "-fuse-ld=lld" ${_replacement}
       DEAL_II_COMPILER_HAS_FUSE_LD_LLD

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.