aboutsummaryrefslogtreecommitdiffstats
path: root/macros.in
diff options
context:
space:
mode:
authorJani Välimaa <wally@mageia.org>2024-11-11 15:25:00 +0200
committerJani Välimaa <wally@mageia.org>2024-11-11 15:25:00 +0200
commit029c7edfcb1541a87db355184e969726c4d1ae3b (patch)
treede54bf97bcfeeef7eaa2e4940983fffc481f9ade /macros.in
parent6ef9080904b39d3a2b4450660e3d88a2536fd16c (diff)
downloadrpm-setup-029c7edfcb1541a87db355184e969726c4d1ae3b.tar
rpm-setup-029c7edfcb1541a87db355184e969726c4d1ae3b.tar.gz
rpm-setup-029c7edfcb1541a87db355184e969726c4d1ae3b.tar.bz2
rpm-setup-029c7edfcb1541a87db355184e969726c4d1ae3b.tar.xz
rpm-setup-029c7edfcb1541a87db355184e969726c4d1ae3b.zip
macros: add redhat-hardened-clang-ld.cfg (from Fedora) to pass -pie when linking with clang
Diffstat (limited to 'macros.in')
-rw-r--r--macros.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/macros.in b/macros.in
index 041f1ac..35168fa 100644
--- a/macros.in
+++ b/macros.in
@@ -222,10 +222,12 @@ GCONF_CONFIG_SOURCE=`%{_gconftool_bin} --get-default-source` %{_gconftool_bin} -
# ---- compiler flags.
%_hardening_gcc_cflags -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-%_hardening_clang_cflags --config /usr/lib/rpm/redhat/redhat-hardened-clang.cfg
+%_hardening_clang_cflags --config=/usr/lib/rpm/redhat/redhat-hardened-clang.cfg
%_hardening_cflags %{expand:%%{_hardening_%{toolchain}_cflags}}
-%_hardening_ldflags %[ "%{toolchain}" == "gcc" ? "-specs=/usr/lib/rpm/redhat/redhat-hardened-ld" : "" ]
+%_hardening_gcc_ldflags -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
+%_hardening_clang_ldflags --config=/usr/lib/rpm/redhat/redhat-hardened-clang-ld.cfg
+%_hardening_ldflags %{expand:%%{_hardening_%{toolchain}_ldflags}}
# Use "%undefine _hardened_build" to disable.
%_hardened_build 1