diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-10-13 07:41:53 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-10-13 07:41:53 +0100 |
commit | 4b91667ebe695e6fdfbef3962d099f17484b8806 (patch) | |
tree | 0af842488d683612bd9eae3f406ec839bcbc0cf9 /media-libs/kvazaar/files | |
parent | b89a664f266dab3b9b5ddac2cb874f8869142370 (diff) |
gentoo auto-resync : 13:10:2022 - 07:41:53
Diffstat (limited to 'media-libs/kvazaar/files')
-rw-r--r-- | media-libs/kvazaar/files/kvazaar-2.0.0-fix-avx2-flags.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/media-libs/kvazaar/files/kvazaar-2.0.0-fix-avx2-flags.patch b/media-libs/kvazaar/files/kvazaar-2.0.0-fix-avx2-flags.patch new file mode 100644 index 000000000000..f2ae8ae44150 --- /dev/null +++ b/media-libs/kvazaar/files/kvazaar-2.0.0-fix-avx2-flags.patch @@ -0,0 +1,33 @@ +From 99423a825027c862bbfd50e112a1846a013b01a7 Mon Sep 17 00:00:00 2001 +From: "Francisco Blas (klondike) Izquierdo Riera" <klondike@klondike.es> +Date: Tue, 4 Oct 2022 10:03:44 +0200 +Subject: [PATCH] Enable -mpopcnt and -mlzcnt on AVX2 + +When -mpopcnt or -mlzcnt are explicitly enabled or disabled +(when using -march=native for example), kvazaar builds fail +on older CPUs without support for these flags (see +https://github.com/ultravideo/kvazaar/issues/228 and +https://bugs.gentoo.org/739776 ). + +Ensuring these flags are on as done with the rest of AVX2 flags +solves the compilation issues, although it may be a better +approach to provide a configuration option so that only the +specific version matching the build system supported flags is +created in such cases. +--- + src/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 79880a98..c972c5be 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -226,7 +226,7 @@ endif #HAVE_PPC + if HAVE_X86 + + if HAVE_AVX2_GCC +-libavx2_la_CFLAGS = -mavx2 -mbmi -mabm -mbmi2 ++libavx2_la_CFLAGS = -mavx2 -mbmi -mabm -mpopcnt -mlzcnt -mbmi2 + endif + if HAVE_AVX2_CLANG + libavx2_la_CFLAGS = -mavx2 -mbmi -mpopcnt -mlzcnt -mbmi2 |