2022-08-13 15:17:36 +00:00
|
|
|
From bbd5c529ef878c2d6096fd4949616714eb82683a Mon Sep 17 00:00:00 2001
|
2020-08-21 10:18:02 +00:00
|
|
|
From: Ariadne Conill <ariadne@dereferenced.org>
|
|
|
|
Date: Fri, 21 Aug 2020 07:03:42 +0000
|
2021-04-25 11:08:48 +00:00
|
|
|
Subject: [PATCH] DP: Use --push-state/--pop-state for gold as well when
|
2020-08-21 10:18:02 +00:00
|
|
|
linking libtsan.
|
2018-12-12 17:14:55 +00:00
|
|
|
|
2020-08-21 10:18:02 +00:00
|
|
|
---
|
2022-08-13 15:17:36 +00:00
|
|
|
gcc/gcc.cc | 16 ++++++++--------
|
2020-08-21 10:18:02 +00:00
|
|
|
1 file changed, 8 insertions(+), 8 deletions(-)
|
|
|
|
|
2022-08-13 15:17:36 +00:00
|
|
|
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
|
|
|
index c60a75371f8..735b2b1bba1 100644
|
|
|
|
--- a/gcc/gcc.cc
|
|
|
|
+++ b/gcc/gcc.cc
|
|
|
|
@@ -745,10 +745,10 @@ proper position among the other output files. */
|
2018-12-12 17:14:55 +00:00
|
|
|
#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
|
2022-08-13 15:17:36 +00:00
|
|
|
@@ -784,10 +784,10 @@ proper position among the other output files. */
|
2018-12-12 17:14:55 +00:00
|
|
|
#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
|
2022-08-13 15:17:36 +00:00
|
|
|
@@ -805,10 +805,10 @@ proper position among the other output files. */
|
2018-12-12 17:14:55 +00:00
|
|
|
#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
|
2022-08-13 15:17:36 +00:00
|
|
|
@@ -824,10 +824,10 @@ proper position among the other output files. */
|
2018-12-12 17:14:55 +00:00
|
|
|
" %{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
|