aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/gcc-as-needed-gold.patch
blob: e22e59bce0cc86071ed65c48f1a0595c3dc618fc (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
49
50
51
52
53
54
55
56
57
58
# DP: Use --push-state/--pop-state for gold as well when linking libtsan.

Index: b/gcc/gcc.c
===================================================================
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -693,10 +693,10 @@ proper position among the other output f
 #define LIBASAN_SPEC STATIC_LIBASAN_LIBS
 #elif defined(HAVE_LD_STATIC_DYNAMIC)
 #define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \
-		     " %{!static-libasan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+		     " %{!static-libasan:--push-state --no-as-needed}" \
 		     " -lasan " \
 		     " %{static-libasan:" LD_DYNAMIC_OPTION "}" \
-		     " %{!static-libasan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
+		     " %{!static-libasan:--pop-state}" \
 		     STATIC_LIBASAN_LIBS
 #else
 #define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
@@ -714,10 +714,10 @@ proper position among the other output f
 #define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
 #elif defined(HAVE_LD_STATIC_DYNAMIC)
 #define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \
-		     " %{!static-libtsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+		     " %{!static-libtsan:--push-state --no-as-needed}" \
 		     " -ltsan " \
 		     " %{static-libtsan:" LD_DYNAMIC_OPTION "}" \
-		     " %{!static-libtsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
+		     " %{!static-libtsan:--pop-state}" \
 		     STATIC_LIBTSAN_LIBS
 #else
 #define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
@@ -735,10 +735,10 @@ proper position among the other output f
 #define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
 #elif defined(HAVE_LD_STATIC_DYNAMIC)
 #define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \
-		     " %{!static-liblsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+		     " %{!static-liblsan:--push-state --no-as-needed}" \
 		     " -llsan " \
 		     " %{static-liblsan:" LD_DYNAMIC_OPTION "}" \
-		     " %{!static-liblsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
+		     " %{!static-liblsan:--pop-state}" \
 		     STATIC_LIBLSAN_LIBS
 #else
 #define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
@@ -754,10 +754,10 @@ proper position among the other output f
   " %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
 #ifdef HAVE_LD_STATIC_DYNAMIC
 #define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \
-		     " %{!static-libubsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+		     " %{!static-libubsan:--push-state --no-as-needed}" \
 		     " -lubsan " \
 		     " %{static-libubsan:" LD_DYNAMIC_OPTION "}" \
-		     " %{!static-libubsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
+		     " %{!static-libubsan:--pop-state}" \
 		     STATIC_LIBUBSAN_LIBS
 #else
 #define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS