summaryrefslogtreecommitdiff
path: root/app-shells/fish/files/3.3.1-don-t-override-linker.patch
blob: cb67498fd2ba628b318cc0b01c72aaaeecb57020 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From c9ab706be64439d1a03f978d3a47450135c87002 Mon Sep 17 00:00:00 2001
From: Georgy Yakovlev <ya@sysdump.net>
Date: Tue, 29 Jun 2021 09:40:44 -0700
Subject: [PATCH] don't override linker

---
 CMakeLists.txt | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index fda837cd3..507dc8817 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 "^$")
 
@@ -128,7 +112,7 @@ set(FISH_SRCS
     src/proc.cpp src/reader.cpp src/redirection.cpp src/sanity.cpp src/screen.cpp
     src/signal.cpp src/termsize.cpp src/timer.cpp src/tinyexpr.cpp
     src/tokenizer.cpp src/topic_monitor.cpp src/trace.cpp src/utf8.cpp src/util.cpp
-    src/wait_handle.cpp src/wcstringutil.cpp src/wgetopt.cpp src/wildcard.cpp 
+    src/wait_handle.cpp src/wcstringutil.cpp src/wgetopt.cpp src/wildcard.cpp
     src/wutil.cpp src/fds.cpp
 )
 
-- 
2.32.0