summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch b/meta/recipes-devtools/gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch
new file mode 100644
index 0000000000..a96e91339b
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch
@@ -0,0 +1,46 @@
1From 44ef80688b56beea85c0070840dea1e2a4e34aed Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 13 Jun 2017 12:12:52 -0700
4Subject: [PATCH 49/49] gcc: Enable static PIE
5
6Static PIE support in GCC
7see
8https://gcc.gnu.org/ml/gcc/2015-06/msg00008.html
9
10startfiles before patch:
11 -static -> crt1.o crti.o crtbeginT.o
12 -static -PIE -> crt1.o crti.o crtbeginT.o
13
14after patch:
15 -static -> crt1.o crti.o crtbeginT.o
16 -static -PIE -> rcrt1.o crti.o crtbeginS.o
17
18Upstream-Status: Pending
19
20Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
21
22---
23 gcc/config/gnu-user.h | 6 +++---
24 1 file changed, 3 insertions(+), 3 deletions(-)
25
26diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
27index de605b0..b035bbe 100644
28--- a/gcc/config/gnu-user.h
29+++ b/gcc/config/gnu-user.h
30@@ -52,11 +52,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
31 #define GNU_USER_TARGET_STARTFILE_SPEC \
32 "%{shared:; \
33 pg|p|profile:gcrt1.o%s; \
34- static:crt1.o%s; \
35+ static: %{" PIE_SPEC ": rcrt1.o%s; :crt1.o%s}; \
36 " PIE_SPEC ":Scrt1.o%s; \
37 :crt1.o%s} \
38 crti.o%s \
39- %{static:crtbeginT.o%s; \
40+ %{static: %{" PIE_SPEC ": crtbeginS.o%s; :crtbeginT.o%s}; \
41 shared|" PIE_SPEC ":crtbeginS.o%s; \
42 :crtbegin.o%s} \
43 %{fvtable-verify=none:%s; \
44
452.13.1
46