From 029c7edfcb1541a87db355184e969726c4d1ae3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jani=20V=C3=A4limaa?= Date: Mon, 11 Nov 2024 15:25:00 +0200 Subject: macros: add redhat-hardened-clang-ld.cfg (from Fedora) to pass -pie when linking with clang --- macros.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'macros.in') 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 -- cgit v1.2.1