[gcc-6] 106/401: - Turn on pie on amd64 and ppc64el for the Ubuntu y-series
Ximin Luo
infinity0 at debian.org
Wed Apr 5 15:48:09 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 e6d288450d883499b3085c2f876c879f21693886
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date: Thu Apr 21 17:05:00 2016 +0000
- Turn on pie on amd64 and ppc64el for the Ubuntu y-series
git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-6@8763 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
debian/patches/bind_now_when_pie-ubuntu.diff | 20 ++++++++++++++++++++
debian/rules.defs | 3 +++
debian/rules.patch | 4 ++++
3 files changed, 27 insertions(+)
diff --git a/debian/patches/bind_now_when_pie-ubuntu.diff b/debian/patches/bind_now_when_pie-ubuntu.diff
new file mode 100644
index 0000000..f7cf162
--- /dev/null
+++ b/debian/patches/bind_now_when_pie-ubuntu.diff
@@ -0,0 +1,20 @@
+Author: Steve Beattie <steve.beattie at canonical.com>
+Description: enable bind now by default when linking with pie by default
+
+---
+ src/gcc/gcc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: b/src/gcc/gcc.c
+===================================================================
+--- a/src/gcc/gcc.c
++++ b/src/gcc/gcc.c
+@@ -795,7 +795,7 @@ proper position among the other output f
+
+ #ifndef LINK_PIE_SPEC
+ #ifdef HAVE_LD_PIE
+-#define LD_PIE_SPEC "-pie"
++#define LD_PIE_SPEC "-pie -z now"
+ #else
+ #define LD_PIE_SPEC ""
+ #endif
diff --git a/debian/rules.defs b/debian/rules.defs
index 5cc1701..8b428d9 100644
--- a/debian/rules.defs
+++ b/debian/rules.defs
@@ -1215,6 +1215,9 @@ ifeq ($(distribution),Ubuntu)
ifeq (,$(filter $(distrelease),lucid precise trusty utopic vivid wily))
pie_archs = s390x
endif
+ ifeq (,$(filter $(distrelease),lucid precise trusty utopic vivid wily xenial))
+ pie_archs += amd64 ppc64el
+ endif
ifneq (,$(filter $(DEB_TARGET_ARCH),$(pie_archs)))
with_pie := yes
endif
diff --git a/debian/rules.patch b/debian/rules.patch
index 40da8c9..c148eee 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -112,6 +112,10 @@ ifeq ($(distribution),Ubuntu)
testsuite-hardening-printf-types \
testsuite-hardening-updates \
testsuite-glibc-warnings
+ ifeq ($(with_pie),yes)
+ hardening_patches += \
+ bind_now_when_pie-ubuntu
+ endif
endif
endif
--
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