[gcc-6] 309/401: * Use --push-state/--pop-state for gold as well when linking libtsan.

Ximin Luo infinity0 at debian.org
Wed Apr 5 15:50:16 UTC 2017


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

infinity0 pushed a commit to branch pu/reproducible_builds
in repository gcc-6.

commit 571526718615fd4b3122e74d02332e89057ed054
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date:   Fri Dec 2 22:17:29 2016 +0000

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

diff --git a/debian/changelog b/debian/changelog
index 0ee1fac..1506068 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ gcc-6 (6.2.1-6) UNRELEASED; urgency=medium
   * Fix dependency generation for libgphobos multilib builds.
   * Install missing vecintrin.h header on s390x.
   * Fix PR target/77267 (x86), taken from the trunk.
+  * Use --push-state/--pop-state for gold as well when linking libtsan.
 
   [ Svante Signell ]
   * GNU/Hurd port for gccgo.
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 3a477f9..5dd285e 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -338,6 +338,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-6.git



More information about the Reproducible-commits mailing list