View Issue Details

IDProjectCategoryView StatusLast Update
0000543AlmaLinux-10Generalpublic2025-07-10 22:09
Reportertim-theisen Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Summary0000543: gcc may compile for x86-64-v3 on x86_64_v2 system
DescriptionI was suprised to find that gcc was producing code using -march=x86-64-v3 on an AlmaLinux x86_64_v2 system. I traced the problem to having redhat-rpm-config installed. We like to get the additional flags from redhat-rpm-config for security, hardening, etc. I see that you provide /etc/rpm/macros.x86_64_v2 that defines %target_platform and %x86_64_v2.

I think that you should add the following line to select -march=x86-64-v2 whenever redhat-rpm-config is installed:

%__cflags_arch_x86_64_level -v2

That way, the correct microarchitecture is always selected by gcc.
Steps To ReproduceCheck the value of CFLAGS and CXXFLAGS when building a package with rpmbuild and redhat-rpm-config is installed.
Additional InformationI tried to select AlmaLinux-10 for the category. However, only "[All Projects] General" was available to me.
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2025-07-10 22:09 tim-theisen New Issue