git: 5a5e869eaeed - main - devel/qt6-base: fix build on amd64 with non-default CPUTYPE

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Thu, 05 Jan 2023 23:03:29 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5a5e869eaeed7c3823c1cf97ddcc172470b85b9b

commit 5a5e869eaeed7c3823c1cf97ddcc172470b85b9b
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-01-05 23:02:00 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-01-05 23:03:02 +0000

    devel/qt6-base: fix build on amd64 with non-default CPUTYPE
    
    With bdver2:
    /wrkdirs/usr/ports/devel/qt6-base/work/.build/include/QtCore/6.4.2/QtCore/private/../../../../../../qtbase-everywhere-src-6.4.2/src/corelib/global/qsimd_
    p.h:218:8: error: "Please enable all x86-64-v3 extensions; you probably want to use -march=haswell or -march=x86-64-v3 instead of -mavx2"
---
 .../files/patch-src_corelib_global_qsimd__p.h      | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/devel/qt6-base/files/patch-src_corelib_global_qsimd__p.h b/devel/qt6-base/files/patch-src_corelib_global_qsimd__p.h
new file mode 100644
index 000000000000..fd5106bd40b0
--- /dev/null
+++ b/devel/qt6-base/files/patch-src_corelib_global_qsimd__p.h
@@ -0,0 +1,34 @@
+--- src/corelib/global/qsimd_p.h.orig	2023-01-05 22:52:06 UTC
++++ src/corelib/global/qsimd_p.h
+@@ -212,15 +212,6 @@ asm(
+ //
+ // macOS's fat binaries support the "x86_64h" sub-architecture and the GNU libc
+ // ELF loader also supports a "haswell/" subdir (e.g., /usr/lib/haswell).
+-#  define ARCH_HASWELL_MACROS       (__AVX2__ + __BMI2__ + __FMA__ + __LZCNT__)
+-#  if ARCH_HASWELL_MACROS != 0
+-#    if ARCH_HASWELL_MACROS != 4
+-#      error "Please enable all x86-64-v3 extensions; you probably want to use -march=haswell or -march=x86-64-v3 instead of -mavx2"
+-#    endif
+-static_assert(ARCH_HASWELL_MACROS, "Undeclared identifiers indicate which features are missing.");
+-#    define __haswell__       1
+-#  endif
+-#  undef ARCH_HASWELL_MACROS
+ 
+ // x86-64 sub-architecture version 4
+ //
+@@ -228,15 +219,6 @@ static_assert(ARCH_HASWELL_MACROS, "Undeclared identif
+ // 6th generation (codename "Skylake"). AMD Zen4 is the their first processor
+ // with AVX512 support and it includes all of these too.
+ //
+-#  define ARCH_SKX_MACROS           (__AVX512F__ + __AVX512BW__ + __AVX512CD__ + __AVX512DQ__ + __AVX512VL__)
+-#  if ARCH_SKX_MACROS != 0
+-#    if ARCH_SKX_MACROS != 5
+-#      error "Please enable all x86-64-v4 extensions; you probably want to use -march=skylake-avx512 or -march=x86-64-v4 instead of -mavx512f"
+-#    endif
+-static_assert(ARCH_SKX_MACROS, "Undeclared identifiers indicate which features are missing.");
+-#    define __skylake_avx512__  1
+-#  endif
+-#  undef ARCH_SKX_MACROS
+ #endif  /* Q_PROCESSOR_X86 */
+ 
+ // NEON intrinsics