Skip to content

Commit 4057485

Browse files
authored
Update the vendored libdeflate to 1.25 (AcademySoftwareFoundation#2274)
1 parent 3b4cd1a commit 4057485

8 files changed

Lines changed: 26 additions & 19 deletions

File tree

external/current_deflate_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.24
1+
v1.25

external/deflate/NEWS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# libdeflate release notes
22

3+
## Version 1.25
4+
5+
* Fixed a build error with gcc 16.
6+
7+
* The libdeflate CMake package is now relocatable.
8+
39
## Version 1.24
410

511
* The CMake-based build system now supports Apple Framework builds.

external/deflate/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ following bindings:
154154
* Python: [deflate](https://github.com/dcwatson/deflate)
155155
* Ruby: [libdeflate-ruby](https://github.com/kaorimatz/libdeflate-ruby)
156156
* Rust: [libdeflater](https://github.com/adamkewley/libdeflater)
157+
* Swift: [SwiftDeflate](https://github.com/dcwatson/SwiftDeflate)
157158

158159
Note: these are third-party projects which haven't necessarily been vetted by
159160
the authors of libdeflate. Please direct all questions, bugs, and improvements

external/deflate/lib/x86/adler32_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
*/
8383
# define adler32_x86_avx512_vl256_vnni adler32_x86_avx512_vl256_vnni
8484
# define SUFFIX _avx512_vl256_vnni
85-
# define ATTRIBUTES _target_attribute("avx512bw,avx512vl,avx512vnni" NO_EVEX512)
85+
# define ATTRIBUTES _target_attribute("avx512bw,avx512vl,avx512vnni")
8686
# define VL 32
8787
# define USE_VNNI 1
8888
# define USE_AVX512 1
@@ -94,7 +94,7 @@
9494
*/
9595
# define adler32_x86_avx512_vl512_vnni adler32_x86_avx512_vl512_vnni
9696
# define SUFFIX _avx512_vl512_vnni
97-
# define ATTRIBUTES _target_attribute("avx512bw,avx512vnni" EVEX512)
97+
# define ATTRIBUTES _target_attribute("avx512bw,avx512vnni")
9898
# define VL 64
9999
# define USE_VNNI 1
100100
# define USE_AVX512 1

external/deflate/lib/x86/cpu_features.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,6 @@ static inline u32 get_x86_cpu_features(void) { return 0; }
165165
# define HAVE_AVXVNNI(features) ((features) & X86_CPU_FEATURE_AVXVNNI)
166166
#endif
167167

168-
#if (GCC_PREREQ(14, 0) || CLANG_PREREQ(18, 0, 18000000)) \
169-
&& !defined(__EVEX512__) /* avoid subtracting the evex512 feature */
170-
# define EVEX512 ",evex512" /* needed to override potential -mno-evex512 */
171-
# define NO_EVEX512 ",no-evex512"
172-
#else
173-
# define EVEX512 ""
174-
# define NO_EVEX512 ""
175-
#endif
176-
177168
#endif /* ARCH_X86_32 || ARCH_X86_64 */
178169

179170
#endif /* LIB_X86_CPU_FEATURES_H */

external/deflate/lib/x86/crc32_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static const u8 MAYBE_UNUSED shift_tab[48] = {
104104
*/
105105
# define crc32_x86_vpclmulqdq_avx512_vl256 crc32_x86_vpclmulqdq_avx512_vl256
106106
# define SUFFIX _vpclmulqdq_avx512_vl256
107-
# define ATTRIBUTES _target_attribute("vpclmulqdq,pclmul,avx512bw,avx512vl" NO_EVEX512)
107+
# define ATTRIBUTES _target_attribute("vpclmulqdq,pclmul,avx512bw,avx512vl")
108108
# define VL 32
109109
# define USE_AVX512 1
110110
# include "crc32_pclmul_template.h"
@@ -117,7 +117,7 @@ static const u8 MAYBE_UNUSED shift_tab[48] = {
117117
*/
118118
# define crc32_x86_vpclmulqdq_avx512_vl512 crc32_x86_vpclmulqdq_avx512_vl512
119119
# define SUFFIX _vpclmulqdq_avx512_vl512
120-
# define ATTRIBUTES _target_attribute("vpclmulqdq,pclmul,avx512bw,avx512vl" EVEX512)
120+
# define ATTRIBUTES _target_attribute("vpclmulqdq,pclmul,avx512bw,avx512vl")
121121
# define VL 64
122122
# define USE_AVX512 1
123123
# include "crc32_pclmul_template.h"

external/deflate/libdeflate.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ extern "C" {
1313
#endif
1414

1515
#define LIBDEFLATE_VERSION_MAJOR 1
16-
#define LIBDEFLATE_VERSION_MINOR 24
17-
#define LIBDEFLATE_VERSION_STRING "1.24"
16+
#define LIBDEFLATE_VERSION_MINOR 25
17+
#define LIBDEFLATE_VERSION_STRING "1.25"
1818

1919
/*
2020
* Users of libdeflate.dll on Windows can define LIBDEFLATE_DLL to cause

share/util/check_deflate.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
# SPDX-License-Identifier: BSD-3-Clause
44
# Copyright Contributors to the OpenEXR Project.
55

6+
# Portable sed -i: macOS requires '' argument, GNU sed doesn't
7+
sedi() {
8+
if [[ "$OSTYPE" == "darwin"* ]]; then
9+
sed -i '' "$@"
10+
else
11+
sed -i "$@"
12+
fi
13+
}
14+
615
if [[ -e current_deflate_version ]]; then
716
curl https://api.github.com/repos/ebiggers/libdeflate/releases/latest > /tmp/exr_latest_deflate
817
latest=`cat /tmp/exr_latest_deflate | jq -r .name`
@@ -26,9 +35,9 @@ if [[ -e current_deflate_version ]]; then
2635
rm -f libdeflate.pc.in
2736
rm -f libdeflate-config.cmake.in
2837
rm -rf scripts
29-
sed -i -f ../patchup_deflate_lib.sed lib/lib_common.h
30-
sed -i -f ../patchup_deflate_lib.sed common_defs.h
31-
sed -i -f ../patchup_deflate_lib.sed lib/utils.c
38+
sedi -f ../patchup_deflate_lib.sed lib/lib_common.h
39+
sedi -f ../patchup_deflate_lib.sed common_defs.h
40+
sedi -f ../patchup_deflate_lib.sed lib/utils.c
3241
cd ..
3342

3443
rm "${filename}"

0 commit comments

Comments
 (0)