From nobody Sat Aug 5 16:00:35 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RJ6kC5Rc8z4mD0V; Sat, 5 Aug 2023 16:00:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RJ6kC4fMqz4H7k; Sat, 5 Aug 2023 16:00:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691251235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UqBK0mUljuYq3eFpyJRLToJLUSKZgFrTSkmKGwUvIC8=; b=XeK1VZaKFHjD2AujrmwlqirP2GVz4wt8eTnXCB42aOVGmlHdEkROcbVoWzLhlONXrCumH/ WTDFii1WXGMX+JnGIwdvFdYbOtjZWwhVz8gJt6ZrCfOJxzO/bqT6sJuq+rM2aYM1bl8DGH RIHF3hLWh11rsI/U+LP4KlcxaTq/3G7HTMEW2ySscprRip3lahH8ZefIkL/DoWc8+TKyec dslXgrHYQj0BMJSn4W7RNu8VZ6u8aJYnF8341x2vM5CEAfLY/jWBf73uj4Q5qkmTlyQ5Cx 9tc/5egfSGGt7N4ZUv8luUCqB5THECwb0pl/mHuP23leqWDflcufGN5+JQgzvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691251235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UqBK0mUljuYq3eFpyJRLToJLUSKZgFrTSkmKGwUvIC8=; b=ZcxqEtIhPkO3r9D0pXjK8MeoDfwmQXN1o1rpPyRcYU/61d/0u6OO7zY6MlpeIuiZRjfBJ+ arFKz7TyEmo08jliCbtID9WfOruUni1C/psqAc8JySk/CA2ii8Zv8Awgb10WowllRsV+rE LaGxtztN917W0FlcC0OXQuhdBAHxBrgbaMrwYdfePYzZX3V8XBXZiXC1xWpTqSwoN4puJs qmXjc6Wup1YBvFgW+Xt7ciBUPhRouQDJJRA7yuHDlyfdevHlRfZSh2so35UQswgLdbXHfx 8QCyx/rdKIO5wLR0JASo1YMh1uqviBL3dH3evuSPRsLHc8n3uT+dMTJ3nabdaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691251235; a=rsa-sha256; cv=none; b=EcLylQztWXYYHCO67cY4pphlmeGDARXukHQAFa0stOUWrPumL2Ww+gO4WfqYO6ppgHri0P F26CpBtcIHiN6qk5XbU//dLjKfcbND3RfLocQBSrbNuA30LDVU9/c3DzQOIVdMHh8uFPcb ieJ27ZxBDalIzroeVCE1KGI8Ft/6+UVxBysvQlDk9BpO5RdECQc9z/V0+6F9LoP3PvctMJ +CcUachoT7K5srX4xk67khL0DrhaJpdUM5Hz61TSrYM8U3T5aK5XLoNh28qbag4uLLIW1p wla8QGUXsN98iuWCxwXTe9iKW7YJNWuOTpMhec8UzLZBNQaB4yKXi+2GY/mDqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RJ6kC3hqLzbHT; Sat, 5 Aug 2023 16:00:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 375G0Zk6086188; Sat, 5 Aug 2023 16:00:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 375G0ZnO086187; Sat, 5 Aug 2023 16:00:35 GMT (envelope-from git) Date: Sat, 5 Aug 2023 16:00:35 GMT Message-Id: <202308051600.375G0ZnO086187@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Jason E. Hale" Subject: git: 5d569342f960 - main - devel/qt6-base: Re-enable AVX2 after d2283436a461 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhale X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d569342f960a5229be3f8007bfcc6208d0a0621 Auto-Submitted: auto-generated The branch main has been updated by jhale: URL: https://cgit.FreeBSD.org/ports/commit/?id=5d569342f960a5229be3f8007bfcc6208d0a0621 commit 5d569342f960a5229be3f8007bfcc6208d0a0621 Author: Jason E. Hale AuthorDate: 2023-08-05 15:43:03 +0000 Commit: Jason E. Hale CommitDate: 2023-08-05 16:00:28 +0000 devel/qt6-base: Re-enable AVX2 after d2283436a461 The original code incorrectly assumes that all CPUs with FMA instruction sets also have AVX2 instruction sets. This is true for Intel CPUs, but not for AMD bdver[23] which have FMA, but not AVX2. All Intel and AMD CPUs that have AVX2 also have BMI2, so use that as a check instead of disabling newer instruction sets entirely. --- .../files/patch-src_corelib_global_qsimd__p.h | 42 +++++++--------------- 1 file changed, 13 insertions(+), 29 deletions(-) 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 index 41e3e87b731c..12b61be865da 100644 --- a/devel/qt6-base/files/patch-src_corelib_global_qsimd__p.h +++ b/devel/qt6-base/files/patch-src_corelib_global_qsimd__p.h @@ -1,34 +1,18 @@ ---- src/corelib/global/qsimd_p.h.orig 2023-08-04 22:13:36 UTC +Fix build with CPUTYPE?=bdver[23]. + +It is incorrectly assumed here that all CPUs with FMA instruction sets +also have AVX2 instruction sets. This is true for Intel CPUs, but not +for AMD bdver[23] which have FMA, but not AVX2. All Intel and AMD CPUs +that have AVX2 also have BMI2, so use that as a check instead. + +--- src/corelib/global/qsimd_p.h.orig 2023-08-05 14:03:16 UTC +++ src/corelib/global/qsimd_p.h -@@ -226,15 +226,6 @@ asm( +@@ -226,7 +226,7 @@ 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__ + __FMA__) --# if ARCH_HASWELL_MACROS != 0 --# if ARCH_HASWELL_MACROS != 2 --# 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 - // -@@ -242,15 +233,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 ++# define ARCH_HASWELL_MACROS (__AVX2__ + __BMI2__) + # if ARCH_HASWELL_MACROS != 0 + # if ARCH_HASWELL_MACROS != 2 + # error "Please enable all x86-64-v3 extensions; you probably want to use -march=haswell or -march=x86-64-v3 instead of -mavx2"