aboutsummaryrefslogtreecommitdiffstats
path: root/build.macros.in
diff options
context:
space:
mode:
authorJani Välimaa <wally@mageia.org>2022-06-19 16:47:44 +0300
committerJani Välimaa <wally@mageia.org>2022-06-19 16:47:44 +0300
commit9407cf4ef240978eb4d4927169bb54523c088b7f (patch)
treef61656244a0e96184d842ddec65e808c6427219a /build.macros.in
parent825f30bd262c071d29b1b271d0e70b5edbcb1275 (diff)
downloadrpm-setup-9407cf4ef240978eb4d4927169bb54523c088b7f.tar
rpm-setup-9407cf4ef240978eb4d4927169bb54523c088b7f.tar.gz
rpm-setup-9407cf4ef240978eb4d4927169bb54523c088b7f.tar.bz2
rpm-setup-9407cf4ef240978eb4d4927169bb54523c088b7f.tar.xz
rpm-setup-9407cf4ef240978eb4d4927169bb54523c088b7f.zip
build.macros: use -Wl,--build-id=sha1 with %build_ldflags
Diffstat (limited to 'build.macros.in')
-rw-r--r--build.macros.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/build.macros.in b/build.macros.in
index fb33f5f..486bc69 100644
--- a/build.macros.in
+++ b/build.macros.in
@@ -158,12 +158,16 @@ GCONF_CONFIG_SOURCE=`%{_gconftool_bin} --get-default-source` %{_gconftool_bin} -
# the corresponding variable names.
%build_fflags %{optflags} %{?_fmoddir:-I%_fmoddir}
+# Some linkers default to a build-id algoritim that is not supported by rpmbuild,
+# so we need to specify the right algorithm to use.
+%_build_id_flags -Wl,--build-id=sha1
+
# Link editor flags. This is usually called LDFLAGS in makefiles.
# (Some makefiles use LFLAGS instead.) The default value assumes that
# 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: -Wl,--build-id}%{?!_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_O1: -Wl,-O1}%{?!_disable_ld_build_id: %_build_id_flags}%{?!_disable_ld_enable_new_dtags: -Wl,--enable-new-dtags}
# For compatibility
%ldflags %build_ldflags