Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Created attachment 853963[details]
a mock config
Description of problem: The rhel7 redhat-rpm-config rpmrc sets -m32 -march=x86-64 -mfpmath=sse to provide more optimized binaries. However, when compiling x86_64 binaries with -m64 -march=x86_64 the -msse -msse2 options are automatically enabled.
On i686 builds, where sse would be used, no sse is enabled by default and the build fails due to the use of '-mfpmath=sse'
Version-Release number of selected component (if applicable):redhat-rpm-config-9.1.0-56.el7
How reproducible: 100%
Steps to Reproduce:
1. populate minimal buildroot for i686 with redhat-rpm-config (Fed 19 gcc and friends are fine)
2. find source using sse (tboot-1.7.3-3.el7.src.rpm)
3. rpmbuild --rebuild --target=i686 tboot-1.7.3-3.el7.src.rpm
4. build fails
5. add -msse -msse2 to /usr/lib/rpm/redhat/rpmrc's i686 line
6. rpmbuild --rebuild --target=i686 tboot-1.7.3-3.el7.src.rpm
7. build succeeds
8. rpmbuild --rebuild --target=x86_64 tboot-1.7.3-3.el7.src.rpm
9. build succeeds
Actual results:
cannot build certian i686 C files due to compile opts
Expected results:
sse enabled when -mfpmath=sse is used
Additional info:
My tests show -msse -msse2 does not alter the size or configuration of the binary when sse instructions are not in use
Created attachment 854045[details]
Spec file for quick demonstration
The attached spec is extra simple, but demonstrates the problem in a clean way - i think....
Comment 3RHEL Program Management
2014-03-22 06:10:27 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
-mfpmath=sse should be of course only used with -msse2, unless it is implied by -march. -msse is implied by -msse2.
On x86_64, -mfpmath=sse as well as -msse2 are the default, no need to specify them. On i686, if we only support x86_64 capable CPUs, we should either use
-march=x86-64 -mtune=generic -mfpmath=sse, or -mfpmath=sse -msse2 (or do we tune for something else, in Fedora for atom?).
Note that RHEL7 gcc defaults to -march=x86-64, and that option already implies SSE and SSE2 (and MMX, FXSR and NO_SAHF).
You can easily check if SSE2 is enabled by running gcc -E -dD -xc /dev/null | grep SSE
and check for __SSE__, __SSE2__, __SSE_MATH__ and __SSE2_MATH__ macros.
Perhaps the tboot package (whatever it is) adds -march=i386 or similar option to flags, then obviously the build would fail. But it would be a package then, if it wants to change the arch, it should either filter out -mfpmath=sse, or add -msse2.
I don't feel really confident to change the flags as this has compatibility implications for all our 32 bit code. Packages that rely on these flags should just set them manually in the spec file for now.
Created attachment 853963 [details] a mock config Description of problem: The rhel7 redhat-rpm-config rpmrc sets -m32 -march=x86-64 -mfpmath=sse to provide more optimized binaries. However, when compiling x86_64 binaries with -m64 -march=x86_64 the -msse -msse2 options are automatically enabled. On i686 builds, where sse would be used, no sse is enabled by default and the build fails due to the use of '-mfpmath=sse' Version-Release number of selected component (if applicable):redhat-rpm-config-9.1.0-56.el7 How reproducible: 100% Steps to Reproduce: 1. populate minimal buildroot for i686 with redhat-rpm-config (Fed 19 gcc and friends are fine) 2. find source using sse (tboot-1.7.3-3.el7.src.rpm) 3. rpmbuild --rebuild --target=i686 tboot-1.7.3-3.el7.src.rpm 4. build fails 5. add -msse -msse2 to /usr/lib/rpm/redhat/rpmrc's i686 line 6. rpmbuild --rebuild --target=i686 tboot-1.7.3-3.el7.src.rpm 7. build succeeds 8. rpmbuild --rebuild --target=x86_64 tboot-1.7.3-3.el7.src.rpm 9. build succeeds Actual results: cannot build certian i686 C files due to compile opts Expected results: sse enabled when -mfpmath=sse is used Additional info: My tests show -msse -msse2 does not alter the size or configuration of the binary when sse instructions are not in use