925b78ae16
* Fix hardcoded `armhf` in pmb/aportgen/binutils.py * Generate aports: `binutils-aarch64`, `musl-aarch64`, `gcc-aarch64` * Distccd: Remember the cross-compiler architecture (currently armhf or aarch64), that the current distccd is running as, and restart distccd with the correct architecture, in case a different arch is needed than what it is currently running as. (Depending on the cross-compiler arch, the PATH variable gets adjusted before starting distccd) * Testcases: add aport generation for aarch64, add cross-compiling to aarch64 * pmb/parse/arch.py: Add aarch64 to the mapping
33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
# 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\
|