diff --git a/ports/libdeflate/fix_gcc.patch b/ports/libdeflate/fix_gcc.patch new file mode 100644 index 0000000000..5b3a593e7b --- /dev/null +++ b/ports/libdeflate/fix_gcc.patch @@ -0,0 +1,21 @@ +diff --git a/lib/x86/adler32_impl.h b/lib/x86/adler32_impl.h +index ba559e6..00967e8 100644 +--- a/lib/x86/adler32_impl.h ++++ b/lib/x86/adler32_impl.h +@@ -52,8 +52,15 @@ + /* + * AVX-VNNI implementation. This is used on CPUs that have AVX2 and AVX-VNNI + * but don't have AVX-512, for example Intel Alder Lake. ++ * ++ * Unusually for a new CPU feature, gcc added support for the AVX-VNNI ++ * intrinsics (in gcc 11.1) slightly before binutils added support for ++ * assembling AVX-VNNI instructions (in binutils 2.36). Distros can reasonably ++ * have gcc 11 with binutils 2.35. Because of this issue, we check for gcc 12 ++ * instead of gcc 11. (libdeflate supports direct compilation without a ++ * configure step, so checking the binutils version is not always an option.) + */ +-#if GCC_PREREQ(11, 1) || CLANG_PREREQ(12, 0, 13000000) || MSVC_PREREQ(1930) ++#if GCC_PREREQ(12, 1) || CLANG_PREREQ(12, 0, 13000000) || MSVC_PREREQ(1930) + # define adler32_x86_avx2_vnni adler32_x86_avx2_vnni + # define SUFFIX _avx2_vnni + # define ATTRIBUTES _target_attribute("avx2,avxvnni") diff --git a/ports/libdeflate/portfile.cmake b/ports/libdeflate/portfile.cmake index d1888b8069..04a34a81a2 100644 --- a/ports/libdeflate/portfile.cmake +++ b/ports/libdeflate/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_github( HEAD_REF master PATCHES remove_wrong_c_flags_modification.diff + fix_gcc.patch #https://github.com/ebiggers/libdeflate/pull/366 ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS diff --git a/ports/libdeflate/vcpkg.json b/ports/libdeflate/vcpkg.json index 27d0f449bc..6a527f7366 100644 --- a/ports/libdeflate/vcpkg.json +++ b/ports/libdeflate/vcpkg.json @@ -1,6 +1,7 @@ { "name": "libdeflate", "version": "1.20", + "port-version": 1, "description": "libdeflate is a library for fast, whole-buffer DEFLATE-based compression and decompression.", "homepage": "https://github.com/ebiggers/libdeflate", "license": "MIT", diff --git a/versions/baseline.json b/versions/baseline.json index 10686d21a3..dfc6bc421b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4322,7 +4322,7 @@ }, "libdeflate": { "baseline": "1.20", - "port-version": 0 + "port-version": 1 }, "libdisasm": { "baseline": "0.23", diff --git a/versions/l-/libdeflate.json b/versions/l-/libdeflate.json index 9a75513276..f28d05d7f2 100644 --- a/versions/l-/libdeflate.json +++ b/versions/l-/libdeflate.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "3964afb8d5220a6fe2693f3cebdf85f83d3c0b1f", + "version": "1.20", + "port-version": 1 + }, { "git-tree": "021898704c19afd68d49fb56f26db8061e3c7957", "version": "1.20",