From 57b3454125ff268fb900c0d60b267535857bcd93 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 2 Jul 2022 18:51:15 -0500 Subject: legacy/gcc6: add buildable patches --- legacy/gcc6/002_all_default-relro.patch | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 legacy/gcc6/002_all_default-relro.patch (limited to 'legacy/gcc6/002_all_default-relro.patch') diff --git a/legacy/gcc6/002_all_default-relro.patch b/legacy/gcc6/002_all_default-relro.patch new file mode 100644 index 000000000..c461017dc --- /dev/null +++ b/legacy/gcc6/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=*:%