summaryrefslogtreecommitdiff
path: root/system/gcc/006_as-needed-gold.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-06-28 05:34:47 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-06-28 05:34:47 +0000
commit2dbfcff7f9b528c91335b2f8ef5e7a59ada12442 (patch)
tree535678ae5dff98fd9a5011289cc133d5fc511a53 /system/gcc/006_as-needed-gold.patch
parent03e237316d0df5792ec67e6665602b6d329f0de9 (diff)
downloadpackages-2dbfcff7f9b528c91335b2f8ef5e7a59ada12442.tar.gz
packages-2dbfcff7f9b528c91335b2f8ef5e7a59ada12442.tar.bz2
packages-2dbfcff7f9b528c91335b2f8ef5e7a59ada12442.tar.xz
packages-2dbfcff7f9b528c91335b2f8ef5e7a59ada12442.zip
system/gcc: look, ma! Ada is in the house!
Diffstat (limited to 'system/gcc/006_as-needed-gold.patch')
-rw-r--r--system/gcc/006_as-needed-gold.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/system/gcc/006_as-needed-gold.patch b/system/gcc/006_as-needed-gold.patch
new file mode 100644
index 000000000..3dc0aee7a
--- /dev/null
+++ b/system/gcc/006_as-needed-gold.patch
@@ -0,0 +1,58 @@
+# DP: Use --push-state/--pop-state for gold as well when linking libtsan.
+
+Index: src/gcc/gcc.c
+===================================================================
+--- src/gcc/gcc.c
++++ src/gcc/gcc.c
+@@ -686,10 +686,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
+@@ -707,10 +707,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
+@@ -728,10 +728,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
+@@ -747,10 +747,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