-march=native gets reduced down to -march=x86-64-v3 instead of -march=x86-64-v4 when using GCC 16 on my Ryzen 7 7800X3D, it's probably because the eclass checks for evex512 which got removed: https://gcc.gnu.org/pipermail/gcc-cvs/2025-May/423589.html
Didn't realise the eclass bit included that.
That was done by diffing x86-64-v3 with v4 and checking the differences to ensure passing -v4 does not enable anything that was disabled by *FLAGS. That means may(?) need to check __EVEX512__ for old gcc still, passing x86-64-v4 would enable it when it's possibly not usable -- or is it safe to ignore it? Can't say I've read about evex512 much. Could just extend the test to check gcc version anyway. Probably need to recheck what clang does too (it does have -mevex512). I'll look at this a bit later though, on the bright side falling back to v3 is safe unlike wrongly detecting v4.
(In reply to Ionen Wolkens from comment #2) > Probably need to recheck what clang does too (it does have -mevex512). Well, did a quick look, and clang does set __EVEX512__ with -march=x86-64-v4 still, so only >=gcc-16 may need a special rule if want to stay safe and not do -v4 if it's missing. Haven't checked gcc-16 itself though, will compile it later.
(In reply to Ionen Wolkens from comment #2) > Could just extend the test to check gcc version anyway. ...an alternate option could be to live test the compiler to generate what to check, would future-proof (if e.g. clang drops it too) but may end up just being mostly unneeded complexity over little.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f31b583e6e20a29b47b0cfb3a28b3dc2b2f215f6 commit f31b583e6e20a29b47b0cfb3a28b3dc2b2f215f6 Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2025-05-29 02:31:30 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2025-05-29 02:45:22 +0000 qt6-build.eclass: fix x86-64-v4 detection with gcc-16 Could probably improve the detection method if needed, but going with the simplest solution unless there's more problems. May need to revisiting if clang follows suit to match gcc (or if gcc-16 changes something before release) given x86-64-v4 now means something different. Closes: https://bugs.gentoo.org/956750 Signed-off-by: Ionen Wolkens <ionen@gentoo.org> eclass/qt6-build.eclass | 3 +++ 1 file changed, 3 insertions(+)