From 6d75c35b7893493c43b62e19626e2ec1059748fd Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Thu, 13 Feb 2025 09:58:09 -0500 Subject: [PATCH] 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 --- cmake/checks/check_02_compiler_features.cmake | 2 -- cmake/setup_sanity_checks.cmake | 5 ----- 2 files changed, 7 deletions(-) diff --git a/cmake/checks/check_02_compiler_features.cmake b/cmake/checks/check_02_compiler_features.cmake index 2a9cf3d709..0b5d14e8f6 100644 --- a/cmake/checks/check_02_compiler_features.cmake +++ b/cmake/checks/check_02_compiler_features.cmake @@ -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() diff --git a/cmake/setup_sanity_checks.cmake b/cmake/setup_sanity_checks.cmake index 16f7988834..99697666d1 100644 --- a/cmake/setup_sanity_checks.cmake +++ b/cmake/setup_sanity_checks.cmake @@ -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 -- 2.39.5