On Wed, Jun 12, 2024 at 5:47 PM Daniel P. Berrangé berrange@redhat.com wrote:
On Wed, Jun 12, 2024 at 10:05:13AM -0400, Ben Beasley wrote:
This never made it to the packaging guidelines, but FESCo made a relevant decision a few years ago:
Libraries packaged in Fedora may require ISA extensions, however any packaged application must not crash on any officially supported architecture, either by providing a generic fallback implementation OR by cleanly exiting when the requisite hardware support is unavailable.
Wow, that is incredibly *loosely* written. That allows for glibc to build itself with '-march=x86-64-v2', or for systemd to build itself with '-march=x86_64-v2 -mneeded', at the discretion of the maintainer. This would effectively reverse the entire decision to reject the x86-64-v2 baseline feature proposal for.
Surely that is not what they meant to permit ? Surely this exception was only intended to be scoped more narrowly ? Perhaps to non-critical path libraries, or only packages outside the default release media ?
It has been some time since I was part of this discussion (IIRC both in FPC and FESCo at the time), and yes, I don't think your interpretation matches our intentions, even though it *could* be read that way. IIRC this was mostly about adding *new* packages that have higher ISA requirements than x86_64-v1 (the current Fedora baseline). I don't think we considered that existing packages might want to push their requirements, too. But as I said, it's been some time, so I might mis-remember.
So in the situation with QEMU, IMO it would be best to do detection of AVX2 (or whatever x86_64-v2 features are required) at *runtime* and provide a slower fallback code path. Alternatively, patch the build system to build without the assumption that x86_64-v2 instructions are available.
Fabio