[gcc-7] 66/354: * Use --push-state/--pop-state for gold as well when linking libtsan.

Ximin Luo infinity0 at debian.org
Thu Nov 23 15:50:31 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository gcc-7.

commit 2c13c061dd36aee85dea22c17fefee5abdf145ea
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date:   Fri Dec 2 22:19:36 2016 +0000

      * Use --push-state/--pop-state for gold as well when linking libtsan.
    
    
    git-svn-id: svn+ssh://svn.debian.org/svn/gcccvs/branches/sid/gcc-7@9167 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
 debian/changelog                       |  2 +-
 debian/patches/gcc-as-needed-gold.diff | 17 +++++++++++++++++
 debian/rules.patch                     |  3 +++
 3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 12444d6..c8fe521 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,7 @@
 gcc-7 (7-20161201-2) UNRELEASED; urgency=medium
 
-  * Non-maintainer upload.
   * Build the cilk runtime on armel, armhf, sparc and sparc64.
+  * Use --push-state/--pop-state for gold as well when linking libtsan.
 
  -- Matthias Klose <doko at debian.org>  Thu, 01 Dec 2016 20:10:32 +0100
 
diff --git a/debian/patches/gcc-as-needed-gold.diff b/debian/patches/gcc-as-needed-gold.diff
new file mode 100644
index 0000000..fb3e57f
--- /dev/null
+++ b/debian/patches/gcc-as-needed-gold.diff
@@ -0,0 +1,17 @@
+# DP: Use --push-state/--pop-state for gold as well when linking libtsan.
+
+--- a/src/gcc/gcc.c
++++ b/src/gcc/gcc.c
+@@ -700,10 +700,10 @@
+ #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
diff --git a/debian/rules.patch b/debian/rules.patch
index ac3be21..65a6d57 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -251,6 +251,9 @@ debian_patches += gcc-multilib-multiarch
 ifneq (,$(filter $(derivative),Ubuntu))
   ifeq (,$(filter $(distrelease),dapper hardy intrepid jaunty karmic lucid maverick))
     debian_patches += gcc-as-needed
+    ifeq (,$(filter $(distrelease),dapper hardy intrepid jaunty karmic lucid maverick precise trusty utopic vivid wily xenial yakkety))
+      debian_patches += gcc-as-needed-gold
+    endif
   endif
 else # Debian
     #debian_patches += gcc-as-needed

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/gcc-7.git



More information about the Reproducible-commits mailing list