commit:     f31b583e6e20a29b47b0cfb3a28b3dc2b2f215f6
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Thu May 29 02:31:30 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu May 29 02:45:22 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f31b583e

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 <AT> gentoo.org>

 eclass/qt6-build.eclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eclass/qt6-build.eclass b/eclass/qt6-build.eclass
index e0f85283dfc2..d0c29871f35b 100644
--- a/eclass/qt6-build.eclass
+++ b/eclass/qt6-build.eclass
@@ -336,6 +336,9 @@ _qt6-build_sanitize_cpu_flags() {
                        x86-64-v2
                        #  if (__AVX__ + __AVX2__ + __BMI__ + __BMI2__ + 
__F16C__ + __FMA__ + __LZCNT__ + __MOVBE__ + __XSAVE__) == 9
                        x86-64-v3
+                       #    if !defined(__EVEX512__) && !defined(__clang__) && 
__GNUC__ >= 16
+                       #      define __EVEX512__ 1 /* removed in gcc-16 (bug 
#956750) */
+                       #    endif
                        #    if (__AVX512BW__ + __AVX512CD__ + __AVX512DQ__ + 
__AVX512F__ + __AVX512VL__ + __EVEX256__ + __EVEX512__) == 7
                        x86-64-v4
                        #    endif

Reply via email to