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/002_all_default-relro.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/002_all_default-relro.patch')
-rw-r--r-- | main/gcc/002_all_default-relro.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/main/gcc/002_all_default-relro.patch b/main/gcc/002_all_default-relro.patch new file mode 100644 index 0000000000..c461017dc6 --- /dev/null +++ b/main/gcc/002_all_default-relro.patch @@ -0,0 +1,33 @@ +# Turn on -Wl,-z,relro,-z,now by default. + +--- + gcc/doc/invoke.texi | 3 +++ + gcc/gcc.c | 1 + + 2 files changed, 4 insertions(+), 0 deletions(-) + +Index: b/gcc/doc/invoke.texi +=================================================================== +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -11424,6 +11424,9 @@ For example, @option{-Wl,-Map,output.map + linker. When using the GNU linker, you can also get the same effect with + @option{-Wl,-Map=output.map}. + ++NOTE: In Alpine Linux, for LDFLAGS, the option ++@option{-Wl,-z,relro,now} is used. To disable, use @option{-Wl,-z,norelro}. ++ + @item -u @var{symbol} + @opindex u + Pretend the symbol @var{symbol} is undefined, to force linking of +Index: b/gcc/gcc.c +=================================================================== +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -890,6 +890,7 @@ proper position among the other output f + "%{flto|flto=*:%<fcompare-debug*} \ + %{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \ + "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ ++ "-z relro -z now " \ + "%X %{o*} %{e*} %{N} %{n} %{r}\ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \ + %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\ |