diff --git a/macros b/macros index 1d0a8ce15453ae551d27c7d7d6ea4a3738bc6fa9..8ecc48ce4375ebf9b3335f80eb8d02d1024cdcfe 100644 --- a/macros +++ b/macros @@ -138,6 +138,12 @@ for k,_ in pairs(stripped_flags) do print(k .. " ") end %__global_fcflags %{build_fflags} %__global_ldflags %{build_ldflags} +# Architecture-specific support. Internal. Do not use directly. + +#%__cflags_arch_x86_64_level v2 +%__cflags_arch_x86_64 %{?__cflags_arch_x86_64_level:-march=x86-64-%{__cflags_arch_x86_64_level}} +%__cflags_arch_x86_64_common -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection + #============================================================================== # ---- configure and makeinstall. %_configure_gnuconfig_hack 1 diff --git a/openEuler-rpm-config.spec b/openEuler-rpm-config.spec index 1b8db199f9bbc54634d3e0ac316cbe99241a1b09..adc7cdc0f9387016b0dd54f526cf6631a1c36b87 100644 --- a/openEuler-rpm-config.spec +++ b/openEuler-rpm-config.spec @@ -3,7 +3,7 @@ Name: %{vendor}-rpm-config Version: 31 -Release: 20 +Release: 21 License: GPL+ AND MIT Summary: specific rpm configuration files URL: https://gitee.com/src-openeuler/openEuler-rpm-config @@ -210,6 +210,9 @@ sed -i "s|@OSCPE@|$(cat /etc/system-release-cpe)|" %{buildroot}%{rpmvdir}/%{vend %{rpmvdir}/find-requires.ksyms %changelog +* Thu Mar 20 2025 Funda Wang - 31-21 +- move out x86-64 optflags for moving towards v3 + * Sat Mar 08 2025 Funda Wang - 31-20 - Add package information on ELF objects - buildrequires vendor-release for /etc/system-release-cpe file diff --git a/rpmrc b/rpmrc index 5f87e96002885f94631390cc87f93eb5a9fa3fb3..23fff88e239deb5b1024b4e017d862e4dd5b215c 100644 --- a/rpmrc +++ b/rpmrc @@ -3,7 +3,10 @@ include: /usr/lib/rpm/rpmrc optflags: i686 %{__global_compiler_flags} -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection optflags: athlon %{__global_compiler_flags} -m32 -march=athlon -fasynchronous-unwind-tables -fstack-clash-protection optflags: ia64 %{__global_compiler_flags} -optflags: x86_64 %{__global_compiler_flags} -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection +optflags: x86_64 %{__global_compiler_flags} -m64 %{__cflags_arch_x86_64} %__cflags_arch_x86_64_common +optflags: x86_64_v2 %{__global_compiler_flags} -m64 -march=x86-64-v2 %__cflags_arch_x86_64_common +optflags: x86_64_v3 %{__global_compiler_flags} -m64 -march=x86-64-v3 %__cflags_arch_x86_64_common +optflags: x86_64_v4 %{__global_compiler_flags} -m64 -march=x86-64-v4 %__cflags_arch_x86_64_common optflags: aarch64 %{__global_compiler_flags} -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection optflags: riscv64 %{__global_compiler_flags} -fasynchronous-unwind-tables -fstack-clash-protection