diff options
| author | Khem Raj <raj.khem@gmail.com> | 2017-06-13 16:15:49 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-08 13:34:45 +0100 |
| commit | fb3be142ce224ba972e3217cf6938373c6f081b5 (patch) | |
| tree | 410c1e2ace8f8bd327955d7feed542483f5f18cc /meta/recipes-devtools/gcc | |
| parent | 9deacd7f9ebc2762544f923b55d9f1406cb3bc7a (diff) | |
| download | poky-fb3be142ce224ba972e3217cf6938373c6f081b5.tar.gz | |
gcc7: Enable static PIE
(From OE-Core rev: 85557ab7bac7db80174205b7969965b7a6bece24)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc')
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-7.1.inc | 1 | ||||
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-7.1/0048-gcc-Enable-static-PIE.patch | 37 |
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-7.1.inc b/meta/recipes-devtools/gcc/gcc-7.1.inc index 4098d6a2c1..b52d51fba6 100644 --- a/meta/recipes-devtools/gcc/gcc-7.1.inc +++ b/meta/recipes-devtools/gcc/gcc-7.1.inc | |||
| @@ -72,6 +72,7 @@ SRC_URI = "\ | |||
| 72 | file://0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \ | 72 | file://0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \ |
| 73 | file://0046-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \ | 73 | file://0046-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \ |
| 74 | file://0047-sync-gcc-stddef.h-with-musl.patch \ | 74 | file://0047-sync-gcc-stddef.h-with-musl.patch \ |
| 75 | file://0048-gcc-Enable-static-PIE.patch \ | ||
| 75 | ${BACKPORTS} \ | 76 | ${BACKPORTS} \ |
| 76 | " | 77 | " |
| 77 | BACKPORTS = "\ | 78 | BACKPORTS = "\ |
diff --git a/meta/recipes-devtools/gcc/gcc-7.1/0048-gcc-Enable-static-PIE.patch b/meta/recipes-devtools/gcc/gcc-7.1/0048-gcc-Enable-static-PIE.patch new file mode 100644 index 0000000000..879e360cf3 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-7.1/0048-gcc-Enable-static-PIE.patch | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | From 44ef80688b56beea85c0070840dea1e2a4e34aed Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 13 Jun 2017 12:12:52 -0700 | ||
| 4 | Subject: [PATCH 49/49] gcc: Enable static PIE | ||
| 5 | |||
| 6 | Static PIE support in GCC | ||
| 7 | see | ||
| 8 | https://gcc.gnu.org/ml/gcc/2015-06/msg00008.html | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | |||
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 13 | --- | ||
| 14 | gcc/config/gnu-user.h | 6 +++--- | ||
| 15 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h | ||
| 18 | index 2787a3d16be..ee7b781319e 100644 | ||
| 19 | --- a/gcc/config/gnu-user.h | ||
| 20 | +++ b/gcc/config/gnu-user.h | ||
| 21 | @@ -51,10 +51,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | ||
| 22 | #if defined HAVE_LD_PIE | ||
| 23 | #define GNU_USER_TARGET_STARTFILE_SPEC \ | ||
| 24 | "%{!shared: %{pg|p|profile:gcrt1.o%s;: \ | ||
| 25 | - %{" PIE_SPEC ":Scrt1.o%s} %{" NO_PIE_SPEC ":crt1.o%s}}} \ | ||
| 26 | - crti.o%s %{static:crtbeginT.o%s;: %{shared:crtbeginS.o%s} \ | ||
| 27 | + %{" PIE_SPEC ":%{static:rcrt1.o%s;:Scrt1.o%s}} %{" NO_PIE_SPEC ":crt1.o%s}}} \ | ||
| 28 | + crti.o%s %{shared:crtbeginS.o%s;: \ | ||
| 29 | %{" PIE_SPEC ":crtbeginS.o%s} \ | ||
| 30 | - %{" NO_PIE_SPEC ":crtbegin.o%s}} \ | ||
| 31 | + %{" NO_PIE_SPEC ":%{static:crtbeginT.o%s;:crtbegin.o%s}}} \ | ||
| 32 | %{fvtable-verify=none:%s; \ | ||
| 33 | fvtable-verify=preinit:vtv_start_preinit.o%s; \ | ||
| 34 | fvtable-verify=std:vtv_start.o%s} \ | ||
| 35 | -- | ||
| 36 | 2.13.1 | ||
| 37 | |||
