summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Pedroni <paolo.pedroni@iol.it>2022-03-30 18:03:13 +0200
committerMatt Turner <mattst88@gentoo.org>2022-04-05 23:26:46 -0700
commite6426d5f35e2fb9cc596fe69425c0338ca5b4496 (patch)
treed0420fb9e932c8a1a075cd8590dd68befb2b8952 /dev-cpp/highway
parentprofiles/arch/riscv: Umnask media-libs/opencv[contribsfm,glog] (diff)
downloadgentoo-e6426d5f35e2fb9cc596fe69425c0338ca5b4496.tar.gz
gentoo-e6426d5f35e2fb9cc596fe69425c0338ca5b4496.tar.bz2
gentoo-e6426d5f35e2fb9cc596fe69425c0338ca5b4496.zip
dev-cpp/highway: Fix detection of AVX512 for IceLake Client CPUs
Closes: https://bugs.gentoo.org/836373 Closes: https://github.com/gentoo/gentoo/pull/24819 Signed-off-by: Paolo Pedroni <paolo.pedroni@iol.it> Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'dev-cpp/highway')
-rw-r--r--dev-cpp/highway/files/highway-0.16.0-fix-AVX512-detection-on-IceLakeClient.patch17
-rw-r--r--dev-cpp/highway/highway-0.16.0-r1.ebuild (renamed from dev-cpp/highway/highway-0.16.0.ebuild)4
2 files changed, 21 insertions, 0 deletions
diff --git a/dev-cpp/highway/files/highway-0.16.0-fix-AVX512-detection-on-IceLakeClient.patch b/dev-cpp/highway/files/highway-0.16.0-fix-AVX512-detection-on-IceLakeClient.patch
new file mode 100644
index 000000000000..de157925c6ef
--- /dev/null
+++ b/dev-cpp/highway/files/highway-0.16.0-fix-AVX512-detection-on-IceLakeClient.patch
@@ -0,0 +1,17 @@
+https://github.com/google/highway/commit/daf441c78191b3433410498d27a5bfdfdf93a142
+
+diff --git a/hwy/targets.cc b/hwy/targets.cc
+index 2a0ab4ef..7e7e2d79 100644
+--- a/hwy/targets.cc
++++ b/hwy/targets.cc
+@@ -328,8 +328,8 @@ uint32_t SupportedTargets() {
+ if (!IsBitSet(xcr0, 2)) {
+ bits &= ~uint32_t(HWY_AVX2 | HWY_AVX3 | HWY_AVX3_DL);
+ }
+- // ZMM + opmask
+- if ((xcr0 & 0x70) != 0x70) {
++ // opmask, ZMM lo/hi
++ if (!IsBitSet(xcr0, 5) || !IsBitSet(xcr0, 6) || !IsBitSet(xcr0, 7)) {
+ bits &= ~uint32_t(HWY_AVX3 | HWY_AVX3_DL);
+ }
+ }
diff --git a/dev-cpp/highway/highway-0.16.0.ebuild b/dev-cpp/highway/highway-0.16.0-r1.ebuild
index 89b07a85a587..52fb0b16d961 100644
--- a/dev-cpp/highway/highway-0.16.0.ebuild
+++ b/dev-cpp/highway/highway-0.16.0-r1.ebuild
@@ -25,6 +25,10 @@ DEPEND="test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )"
RESTRICT="!test? ( test )"
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-AVX512-detection-on-IceLakeClient.patch
+)
+
multilib_src_configure() {
local mycmakeargs=(
-DBUILD_TESTING=$(usex test)