From c94d80a6ddd74271255c5654aa030e5c3d2780e3 Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Mon, 5 Feb 2024 10:16:05 -0600 Subject: [PATCH] simplify microarch macros for x86_64 --- macros | 6 +++--- redhat-rpm-config.spec | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/macros b/macros index dfacd55..f5c0bb5 100644 --- a/macros +++ b/macros @@ -145,9 +145,9 @@ for k,_ in pairs(stripped_flags) do print(k .. " ") end # Architecture-specific support. Internal. Do not use directly. -%__cflags_arch_x86_64_v2 %[0%{?rhel} == 9 ? "-march=x86-64-v2" : ""] -%__cflags_arch_x86_64_v3 %[0%{?rhel} > 9 ? "-march=x86-64-v3" : ""] -%__cflags_arch_x86_64 %{__cflags_arch_x86_64_v2} %{__cflags_arch_x86_64_v3} +%__cflags_arch_x86_64_level %[0%{?rhel} == 9 ? "-v2" : ""]%[0%{?rhel} > 9 ? "-v3" : ""] +%__cflags_arch_x86_64 -march=x86-64%{?__cflags_arch_x86_64_level:%{__cflags_arch_x86_64_level}} + %__cflags_arch_x86_64_common -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection %{_frame_pointers_cflags} %{_frame_pointers_cflags_x86_64} # Also used for s390. diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 5ba7783..ea35018 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -4,7 +4,7 @@ # 2) When making changes, increment the version (in baserelease) by 1. # rpmdev-bumpspec and other tools update the macro below, which is used # in Version: to get the desired effect. -%global baserelease 280 +%global baserelease 281 Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config @@ -262,6 +262,9 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora common.lua %doc buildflags.md %changelog +* Mon Feb 05 2024 Jonathan Wright - 281-1 +- simplify microarch macros for x86_64 + * Tue Jan 16 2024 Florian Weimer - 280-1 - Drop -fcf-protection for i686 because there won't be kernel support