diff options
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | macros.in | 6 | ||||
-rw-r--r-- | redhat-hardened-clang-ld.cfg | 1 |
4 files changed, 8 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index d745843..12e24a3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -52,8 +52,9 @@ redhat_scripts = \ redhat_hardened = \ redhat-hardened-cc1 \ + redhat-hardened-ld \ redhat-hardened-clang.cfg \ - redhat-hardened-ld + redhat-hardened-clang-ld.cfg BUILT_SOURCES = macros-perarch make_arch_macrosfiles.sh rpmgenplatform @@ -1,3 +1,4 @@ +- macros: add redhat-hardened-clang-ld.cfg (from Fedora) to pass -pie when linking with clang - macros: add %dist_vendor (Mageia) and %dist_name (Mageia Linux) macros Version 2.80 - 5 July 2024, by Jani Välimaa @@ -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 diff --git a/redhat-hardened-clang-ld.cfg b/redhat-hardened-clang-ld.cfg new file mode 100644 index 0000000..f31f324 --- /dev/null +++ b/redhat-hardened-clang-ld.cfg @@ -0,0 +1 @@ +-pie |