View Issue Details

IDProjectCategoryView StatusLast Update
0000543AlmaLinux-10Generalpublic2025-09-05 14:21
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

eabdullin

2025-09-05 14:20

developer   ~0001161

Last edited: 2025-09-05 14:21

Fixed in AlmaLinux-Kitten-10 with almalinux-kitten-release-10.0-9.el10.0.1.x86_64_v2.rpm.
It will be fixed in AlmaLinux-10 a little later.
If you have a chance to test it and confirm that this solution works for you, please let me know.

Issue History

Date Modified Username Field Change
2025-07-10 22:09 tim-theisen New Issue
2025-09-05 14:20 eabdullin Note Added: 0001161
2025-09-05 14:21 eabdullin Note Edited: 0001161