From 07457bf2f1660f5d04437aecde3dcdf0cb44567d Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 20 Jul 2021 17:20:14 +0200 Subject: [PATCH] cmake: Remove linker override This was a workaround for an error that has been removed in glibc 2.32 (by removing sys_errlist and friends, which it complained about). Other than that, it's an attempt at performance optimization that should just be fixed at the system level - if your linker is bad, replace it with a better linker. No need for fish to work around it. Closes #8152 --- CMakeLists.txt | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fda837cd3..59a75069f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,22 +56,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra \ # Disable exception handling. add_compile_options(-fno-exceptions) -# Prefer lld or the gold linker because they don't emit useless warnings about sys_nerr and -# _sys_errlist. They're also faster (significantly so in the case of lld). -if (UNIX) - execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=lld -Wl,--version - ERROR_QUIET OUTPUT_VARIABLE LD_VERSION) - if ("${LD_VERSION}" MATCHES "LLD ") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld") - elseif (NOT APPLE) - execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version - ERROR_QUIET OUTPUT_VARIABLE LD_VERSION) - if ("${LD_VERSION}" MATCHES "GNU gold") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold") - endif() - endif() -endif() - # Hide the CMake Rules directories in Xcode projects. source_group("CMake Rules" REGULAR_EXPRESSION "^$")