Update i686 architectural baseline to include SSE2
Fedora builds its i686 packages with SSE2 support, primarily for use on x86-64 systems as multi-lib RPMs.
- Targeted release: Fedora 29
- Last updated: 2018-06-18
- Tracker bug: #1592205
- Release Notes tracking: #183
Currently, the i686 RPM packages are built in such a way that they are compatible with very old i686 systems, such as the Pentium III. The only addition over the i686/Pentium Pro baseline is a requirement to support long NOPs, for Intel CET. However, the majority of installations of i686 packages is for use on x86_64 systems, as multi-lib RPMs. Furthermore, there are reports that the i686 kernel does not run stable on old hardware which is not x86-64-capable.
This proposal suggests to accept this reality and build the i686 packages in such a way that they require the ISA level of (early) x86-64 CPUs.
The compiled binaries should still remain compatible with the i686 alternative architecture, so they do not need rebuilding. (The instructions generated by GCC are compatible with a pure 32-bit x86 platform.) However, Fedora does not currently perform automated tests to enforce this.
Benefit to Fedora
32-bit Fedora packages will be optimized for use on current x86_64 systems:
- The default compiler flags will be switched to
-march=i686 -msse2 -mtune=generic -mfpmath=sse -mstackrealign. This enables SSE2 support with optimal backwards compatibility due to automatic stack realignment. (16-byte stack alignment was introduced with SSE2 support in the i386 ABI, but old binaries only provide 4-byte stack alignment.)
- x86 packages can use SSE2 optimizations unconditionally.
- This increases compatibility with some upstreams which have mostly given up on support for non-SSE2 x86 systems.
- Excess precision problems inherent to the legacy i387 FPU disappear, and math results become more predictable.
The latter two times are primarily a benefit to those developers who work on Fedora itself.
- Proposal owners: Adjust the redhat-rpm-config, gcc, and glibc packages to switch to the new compiler flags. Except for the interaction
-mstackrealign, there is substantial experience with SSE2-enabled compilation on i686 downstream.
- Other developers:
- Other developers can enable SSE2 optimization in their packages if they want, where this has been a compile-time option only.
- The x86 SIG continues testing the i686 alternative architecture on legacy hardware.
- Release engineering: #7543
- List of deliverables: TBD
- Policies and guidelines: i686 is no longer a primary architecture. The Packaging Guidelines do not currently require support for non-SSE2 x86 systems, so no change is required there.
- Trademark approval: N/A (not needed for this Change)
32-bit x86 systems which lack SSE2 support will not be able to upgrade to Fedora 29.
This only applies to 32-bit x86 systems. For 64-bit x86 systems, SSE2 support is a required support of the baseline ABI and already extensively used by Fedora.
How To Test
Install Fedora 29 after the mass rebuild and test 32-bit (i686) packages for functionality.
Extra tests could involve old 32-bit legacy applications compiled with non-GCC compilers.
There is no expected substantial change in user experience, except for a minor performance improvements and potentially some slight reduction in power usage.
We are not aware of any dependencies at this point.
- Contingency mechanism: Back out the change.
- Contingency deadline: Before the final mass rebuild.
- Blocks release? No.
- Blocks product? No.
Documentation in a Release Note appears sufficient.
The x86 SIG will have to update the release notes for the i686 alternative architecture, noting that SSE2 support is now required. Primary architectures will not see a change.
- Release Notes tracking: #183