diff options
author | Timo Teräs <timo.teras@iki.fi> | 2016-07-01 12:28:16 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-07-05 17:56:14 +0000 |
commit | 5b7befa1b989315a57f4fb49b8381ce06ded96c9 (patch) | |
tree | ef08980d3525ee01131078415e2f553f7d58c156 /main/gcc/207-static-pie.patch | |
parent | 25c19fed5767953094db3d80079717b8c83baa05 (diff) | |
download | aports-5b7befa1b989315a57f4fb49b8381ce06ded96c9.tar.bz2 aports-5b7befa1b989315a57f4fb49b8381ce06ded96c9.tar.xz |
main/gcc: upgrade to 6.1.0
- use --enable-default-pie
- patch bind now, ssp-strong, fortify and as-needed to be defaults
- remove gentoo esp patches as unneeded (deprecated by the above)
- update ecj
- remove upstreamed musl patches, add current musl patches
- support musl's static pie
- fix some bootstrapping related issues
Diffstat (limited to 'main/gcc/207-static-pie.patch')
-rw-r--r-- | main/gcc/207-static-pie.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/main/gcc/207-static-pie.patch b/main/gcc/207-static-pie.patch new file mode 100644 index 0000000000..44c6c70152 --- /dev/null +++ b/main/gcc/207-static-pie.patch @@ -0,0 +1,40 @@ +diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h +index b0bf40a..d4b56fe 100644 +--- a/gcc/config/gnu-user.h ++++ b/gcc/config/gnu-user.h +@@ -51,10 +51,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #if defined HAVE_LD_PIE + #define GNU_USER_TARGET_STARTFILE_SPEC \ + "%{!shared: %{pg|p|profile:gcrt1.o%s;: \ +- %{" PIE_SPEC ":Scrt1.o%s} %{" NO_PIE_SPEC ":crt1.o%s}}} \ +- crti.o%s %{static:crtbeginT.o%s;: %{shared:crtbeginS.o%s} \ ++ %{" PIE_SPEC ":%{static:rcrt1.o%s;:Scrt1.o%s}} %{" NO_PIE_SPEC ":crt1.o%s}}} \ ++ crti.o%s %{shared:crtbeginS.o%s;: \ + %{" PIE_SPEC ":crtbeginS.o%s} \ +- %{" NO_PIE_SPEC ":crtbegin.o%s}} \ ++ %{" NO_PIE_SPEC ":%{static:crtbeginT.o%s;:crtbegin.o%s}}} \ + %{fvtable-verify=none:%s; \ + fvtable-verify=preinit:vtv_start_preinit.o%s; \ + fvtable-verify=std:vtv_start.o%s} \ +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 0208d61..731564e 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -870,7 +870,7 @@ proper position among the other output files. */ + #endif + + #ifdef ENABLE_DEFAULT_PIE +-#define NO_PIE_SPEC "no-pie|static" ++#define NO_PIE_SPEC "no-pie" + #define PIE_SPEC NO_PIE_SPEC "|r|shared:;" + #define NO_FPIE1_SPEC "fno-pie" + #define FPIE1_SPEC NO_FPIE1_SPEC ":;" +@@ -916,7 +916,7 @@ proper position among the other output files. */ + #ifndef LINK_PIE_SPEC + #ifdef HAVE_LD_PIE + #ifndef LD_PIE_SPEC +-#define LD_PIE_SPEC "-pie" ++#define LD_PIE_SPEC "-pie %{static:--no-dynamic-linker}" + #endif + #else + #define LD_PIE_SPEC "" |