[gcc-6] 98/401: * When configured to link with --as-needed by default, always link the sanitizer libraries with --no-as-needed.

Ximin Luo infinity0 at debian.org
Wed Apr 5 15:48:07 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 e04659404df78d5ecf5dd79c868dd8906d674ba7
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date:   Sat Mar 12 09:21:56 2016 +0000

      * When configured to link with --as-needed by default, always link the
        sanitizer libraries with --no-as-needed.
    
    
    git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-6@8712 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
 debian/changelog                  |  8 ++++++--
 debian/patches/gcc-as-needed.diff | 38 +++++++++++++++++++++++++++++++++++++-
 2 files changed, 43 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 8a5c8ed..30dca1f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
-gcc-6 (6-20160228-2) UNRELEASED; urgency=medium
+gcc-6 (6-20160312-1) experimental; urgency=medium
 
+  * GCC 6 snapshot build, taken from the trunk 20160312.
+  * Update gdc to the trunk 20160306.
   * Remove powerpcspe specific patch, integrated upstream. Addresses: #816048.
+  * When configured to link with --as-needed by default, always link the
+    sanitizer libraries with --no-as-needed.
 
- -- Matthias Klose <doko at debian.org>  Sun, 28 Feb 2016 22:34:46 +0100
+ -- Matthias Klose <doko at debian.org>  Sat, 12 Mar 2016 10:21:28 +0100
 
 gcc-6 (6-20160228-1) experimental; urgency=medium
 
diff --git a/debian/patches/gcc-as-needed.diff b/debian/patches/gcc-as-needed.diff
index 153dcf3..b6b8e99 100644
--- a/debian/patches/gcc-as-needed.diff
+++ b/debian/patches/gcc-as-needed.diff
@@ -1,5 +1,41 @@
-# DP: On linux targets pass --as-needed by default to the linker.
+# DP: On linux targets pass --as-needed by default to the linker, but always
+# DP: link the sanitizer libraries with --no-as-needed.
 
+--- a/src/gcc/gcc.c
++++ b/src/gcc/gcc.c
+@@ -568,8 +568,11 @@ proper position among the other output f
+ #ifdef LIBTSAN_EARLY_SPEC
+ #define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
+ #elif defined(HAVE_LD_STATIC_DYNAMIC)
+-#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION \
+-		     "} -ltsan %{static-libtsan:" LD_DYNAMIC_OPTION "}" \
++#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \
++		     " %{!static-libtsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
++		     " -ltsan " \
++		     " %{static-libtsan:" LD_DYNAMIC_OPTION "}" \
++		     " %{!static-libtsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
+ 		     STATIC_LIBTSAN_LIBS
+ #else
+ #define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
+--- a/src/gcc/config/gnu-user.h
++++ b/src/gcc/config/gnu-user.h
+@@ -124,13 +124,13 @@
+ #define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
+   "%{static-libasan:%{!shared:" \
+   LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
+-  LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
++  LD_DYNAMIC_OPTION "}}%{!static-libasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lasan %{fuse-ld=gold:--as-needed;:--pop-state}}"
+ #undef LIBTSAN_EARLY_SPEC
+ #define LIBTSAN_EARLY_SPEC "%{static-libtsan:%{!shared:" \
+   LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
+-  LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
++  LD_DYNAMIC_OPTION "}}%{!static-libtsan:%{!fuse-ld=gold:--push-state} --no-as-needed -ltsan %{fuse-ld=gold:--as-needed;:--pop-state}}"
+ #undef LIBLSAN_EARLY_SPEC
+ #define LIBLSAN_EARLY_SPEC "%{static-liblsan:%{!shared:" \
+   LD_STATIC_OPTION " --whole-archive -llsan --no-whole-archive " \
+-  LD_DYNAMIC_OPTION "}}%{!static-liblsan:-llsan}"
++  LD_DYNAMIC_OPTION "}}%{!static-liblsan:%{!fuse-ld=gold:--push-state} --no-as-needed -llsan %{fuse-ld=gold:--as-needed;:--pop-state}}"
+ #endif
 Index: b/src/gcc/config/aarch64/aarch64-linux.h
 ===================================================================
 --- a/src/gcc/config/aarch64/aarch64-linux.h

-- 
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