aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/0003-specs-turn-on-Wl-z-now-by-default.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/gcc/0003-specs-turn-on-Wl-z-now-by-default.patch')
-rw-r--r--main/gcc/0003-specs-turn-on-Wl-z-now-by-default.patch24
1 files changed, 12 insertions, 12 deletions
diff --git a/main/gcc/0003-specs-turn-on-Wl-z-now-by-default.patch b/main/gcc/0003-specs-turn-on-Wl-z-now-by-default.patch
index f6d3774552a..bfb0a6eba77 100644
--- a/main/gcc/0003-specs-turn-on-Wl-z-now-by-default.patch
+++ b/main/gcc/0003-specs-turn-on-Wl-z-now-by-default.patch
@@ -1,7 +1,7 @@
-From 9675297b3a46b65a54e9df97f26ea445d53c67c6 Mon Sep 17 00:00:00 2001
+From ff4dd4ce33133e675b7bedc86b73357c04631cb9 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:45:49 +0000
-Subject: [PATCH] specs: turn on -Wl,-z,now by default
+Subject: [PATCH 03/35] specs: turn on -Wl,-z,now by default
Previously, we also used to turn on -z relro here, but we now build
binutils with --enable-relro, which is functionally equivalent.
@@ -10,28 +10,28 @@ Binutils does not appear to have a similar option for enabling -z
now by default.
---
gcc/doc/invoke.texi | 3 +++
- gcc/gcc.c | 1 +
+ gcc/gcc.cc | 1 +
2 files changed, 4 insertions(+)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 7d3f1ccddf3..485d2d6b742 100644
+index b6731a4673c..f393c7846c6 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
-@@ -15921,6 +15921,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
+@@ -17961,6 +17961,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
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,now} is used. To disable, use @option{-Wl,-z,nonow}.
+
- @item -u @var{symbol}
@opindex u
+ @item -u @var{symbol}
Pretend the symbol @var{symbol} is undefined, to force linking of
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index a83ba34ac4b..faf9ce76b3d 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1150,6 +1150,7 @@ proper position among the other output files. */
+diff --git a/gcc/gcc.cc b/gcc/gcc.cc
+index 33b56e721d2..f82fae23c22 100644
+--- a/gcc/gcc.cc
++++ b/gcc/gcc.cc
+@@ -1144,6 +1144,7 @@ proper position among the other output files. */
"%{flto|flto=*:%<fcompare-debug*} \
%{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
@@ -40,5 +40,5 @@ index a83ba34ac4b..faf9ce76b3d 100644
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
%{Wno-poison-system-directories:--no-poison-system-directories} \
--
-2.35.1
+2.41.0