From e112c497ecbd7d5747a70fa7a2837f6d502584c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jani=20V=C3=A4limaa?= Date: Tue, 5 Dec 2023 18:48:25 +0200 Subject: macros: use -Wl,-z,now with -Wl,-z,relro unless _disable_ld_now is defined --- NEWS | 1 + macros.in | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index bd5602e..66b0510 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ +- macros: use -Wl,-z,now with -Wl,-z,relro unless _disable_ld_now is defined - mangle script shebangs Version 2.73 - 22 November 2023, by Jani Välimaa diff --git a/macros.in b/macros.in index d257826..18178c0 100644 --- a/macros.in +++ b/macros.in @@ -218,7 +218,7 @@ GCONF_CONFIG_SOURCE=`%{_gconftool_bin} --get-default-source` %{_gconftool_bin} - # the flags, while intended for ld, are still passed through the gcc # compiler driver. At the beginning of %%build, the environment # variable RPM_LD_FLAGS to this value. -%build_ldflags %{?!_disable_ld_as_needed: -Wl,--as-needed}%{?!_disable_ld_no_undefined: -Wl,--no-undefined}%{?!_disable_ld_relro: -Wl,-z,relro}%{?!_disable_ld_O1: -Wl,-O1}%{?!_disable_ld_build_id: %_build_id_flags}%{?!_disable_ld_enable_new_dtags: -Wl,--enable-new-dtags} +%build_ldflags %{?!_disable_ld_as_needed: -Wl,--as-needed}%{?!_disable_ld_no_undefined: -Wl,--no-undefined}%{?!_disable_ld_relro: -Wl,-z,relro%{?!_disable_ld_now: -Wl,-z,now}}%{?!_disable_ld_O1: -Wl,-O1}%{?!_disable_ld_build_id: %_build_id_flags}%{?!_disable_ld_enable_new_dtags: -Wl,--enable-new-dtags} # For compatibility %ldflags %build_ldflags -- cgit v1.2.1