Skip to content

Commit 6d75c35

Browse files
committed
do not use gold linker by default
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
1 parent cecf710 commit 6d75c35

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

cmake/checks/check_02_compiler_features.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,6 @@ if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
401401
add_flags(DEAL_II_LINKER_FLAGS "-fuse-ld=mold")
402402
elseif(DEAL_II_COMPILER_HAS_FUSE_LD_LLD)
403403
add_flags(DEAL_II_LINKER_FLAGS "-fuse-ld=lld")
404-
elseif(DEAL_II_COMPILER_HAS_FUSE_LD_GOLD)
405-
add_flags(DEAL_II_LINKER_FLAGS "-fuse-ld=gold")
406404
endif()
407405

408406
reset_cmake_required()

cmake/setup_sanity_checks.cmake

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ foreach(build ${DEAL_II_BUILD_TYPES})
6363
set(_replacement "")
6464
if(DEAL_II_COMPILER_HAS_FUSE_LD_LLD)
6565
set(_replacement "-fuse-ld=lld")
66-
elseif(DEAL_II_COMPILER_HAS_FUSE_LD_GOLD)
67-
set(_replacement "-fuse-ld=gold")
6866
endif()
6967
_drop_linker_flag(
7068
"-fuse-ld=mold" ${_replacement}
@@ -75,9 +73,6 @@ foreach(build ${DEAL_II_BUILD_TYPES})
7573

7674
if(NOT DEAL_II_HAVE_USABLE_FLAGS_${build} AND DEAL_II_COMPILER_HAS_FUSE_LD_LLD)
7775
set(_replacement "")
78-
if(DEAL_II_COMPILER_HAS_FUSE_LD_GOLD)
79-
set(_replacement "-fuse-ld=gold")
80-
endif()
8176
_drop_linker_flag(
8277
"-fuse-ld=lld" ${_replacement}
8378
DEAL_II_COMPILER_HAS_FUSE_LD_LLD

0 commit comments

Comments
 (0)