mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
zstd: bump version
This commit is contained in:
@@ -1,48 +0,0 @@
|
||||
From f7a4d711282e01c88e2da068d7d64974359490e5 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 29 Sep 2021 17:14:40 -0400
|
||||
Subject: [PATCH] Various GCC2 fixes.
|
||||
|
||||
---
|
||||
lib/common/compiler.h | 4 ++--
|
||||
lib/compress/zstd_lazy.c | 2 +-
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/common/compiler.h b/lib/common/compiler.h
|
||||
index a951d0a..a02ce59 100644
|
||||
--- a/lib/common/compiler.h
|
||||
+++ b/lib/common/compiler.h
|
||||
@@ -151,7 +151,7 @@
|
||||
|
||||
/* vectorization
|
||||
* older GCC (pre gcc-4.3 picked as the cutoff) uses a different syntax */
|
||||
-#if !defined(__INTEL_COMPILER) && !defined(__clang__) && defined(__GNUC__)
|
||||
+#if !defined(__INTEL_COMPILER) && !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 3)
|
||||
# if (__GNUC__ == 4 && __GNUC_MINOR__ > 3) || (__GNUC__ >= 5)
|
||||
# define DONT_VECTORIZE __attribute__((optimize("no-tree-vectorize")))
|
||||
# else
|
||||
@@ -166,7 +166,7 @@
|
||||
* If you can remove a LIKELY/UNLIKELY annotation without speed changes in gcc
|
||||
* and clang, please do.
|
||||
*/
|
||||
-#if defined(__GNUC__)
|
||||
+#if defined(__GNUC__) && (__GNUC__ >= 3)
|
||||
#define LIKELY(x) (__builtin_expect((x), 1))
|
||||
#define UNLIKELY(x) (__builtin_expect((x), 0))
|
||||
#else
|
||||
diff --git a/lib/compress/zstd_lazy.c b/lib/compress/zstd_lazy.c
|
||||
index 3d523e8..9e13f37 100644
|
||||
--- a/lib/compress/zstd_lazy.c
|
||||
+++ b/lib/compress/zstd_lazy.c
|
||||
@@ -1081,7 +1081,7 @@ static U32 ZSTD_VecMask_next(ZSTD_VecMask val) {
|
||||
0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8,
|
||||
31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9
|
||||
};
|
||||
- return multiplyDeBruijnBitPosition[((U32)((v & -(int)v) * 0x077CB531U)) >> 27];
|
||||
+ return multiplyDeBruijnBitPosition[((U32)((val & -(int)val) * 0x077CB531U)) >> 27];
|
||||
# endif
|
||||
}
|
||||
|
||||
--
|
||||
2.28.0
|
||||
|
||||
31
app-arch/zstd/patches/zstd-1.5.2-gcc2.patchset
Normal file
31
app-arch/zstd/patches/zstd-1.5.2-gcc2.patchset
Normal file
@@ -0,0 +1,31 @@
|
||||
From e64e22a7a976256c67f37c8a851d7b57c63d0894 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 29 Sep 2021 17:14:40 -0400
|
||||
Subject: Various GCC2 fixes.
|
||||
|
||||
|
||||
diff --git a/lib/common/compiler.h b/lib/common/compiler.h
|
||||
index 516930c..abd7dcb 100644
|
||||
--- a/lib/common/compiler.h
|
||||
+++ b/lib/common/compiler.h
|
||||
@@ -142,7 +142,7 @@
|
||||
/* vectorization
|
||||
* older GCC (pre gcc-4.3 picked as the cutoff) uses a different syntax,
|
||||
* and some compilers, like Intel ICC and MCST LCC, do not support it at all. */
|
||||
-#if !defined(__INTEL_COMPILER) && !defined(__clang__) && defined(__GNUC__) && !defined(__LCC__)
|
||||
+#if !defined(__INTEL_COMPILER) && !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 3) && !defined(__LCC__)
|
||||
# if (__GNUC__ == 4 && __GNUC_MINOR__ > 3) || (__GNUC__ >= 5)
|
||||
# define DONT_VECTORIZE __attribute__((optimize("no-tree-vectorize")))
|
||||
# else
|
||||
@@ -157,7 +157,7 @@
|
||||
* If you can remove a LIKELY/UNLIKELY annotation without speed changes in gcc
|
||||
* and clang, please do.
|
||||
*/
|
||||
-#if defined(__GNUC__)
|
||||
+#if defined(__GNUC__) && (__GNUC__ >= 3)
|
||||
#define LIKELY(x) (__builtin_expect((x), 1))
|
||||
#define UNLIKELY(x) (__builtin_expect((x), 0))
|
||||
#else
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
From d10c479911497738d482862559b94c7617d57a61 Mon Sep 17 00:00:00 2001
|
||||
From 5257fb075ae7afac0edadbdca0ddf25ad15237ec Mon Sep 17 00:00:00 2001
|
||||
From: Augustin Cavalier <waddlesplash@gmail.com>
|
||||
Date: Wed, 29 Sep 2021 17:58:52 -0400
|
||||
Subject: Disable weak symbols; they do not seem to behave correctly.
|
||||
|
||||
|
||||
diff --git a/lib/common/zstd_trace.h b/lib/common/zstd_trace.h
|
||||
index 2da5640..aeb126a 100644
|
||||
index f9121f7..96d48fc 100644
|
||||
--- a/lib/common/zstd_trace.h
|
||||
+++ b/lib/common/zstd_trace.h
|
||||
@@ -20,7 +20,7 @@ extern "C" {
|
||||
/* weak symbol support */
|
||||
#if !defined(ZSTD_HAVE_WEAK_SYMBOLS) && defined(__GNUC__) && \
|
||||
@@ -29,7 +29,7 @@ extern "C" {
|
||||
defined(__GNUC__) && defined(__ELF__) && \
|
||||
(defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86)) && \
|
||||
!defined(__APPLE__) && !defined(_WIN32) && !defined(__MINGW32__) && \
|
||||
- !defined(__CYGWIN__)
|
||||
+ !defined(__CYGWIN__) && !defined(__HAIKU__)
|
||||
- !defined(__CYGWIN__) && !defined(_AIX)
|
||||
+ !defined(__CYGWIN__) && !defined(_AIX) && !defined(__HAIKU__)
|
||||
# define ZSTD_HAVE_WEAK_SYMBOLS 1
|
||||
#else
|
||||
# define ZSTD_HAVE_WEAK_SYMBOLS 0
|
||||
--
|
||||
2.28.0
|
||||
2.30.2
|
||||
|
||||
@@ -11,10 +11,10 @@ HOMEPAGE="https://facebook.github.io/zstd/"
|
||||
COPYRIGHT="2016-2018 Facebook, Inc."
|
||||
LICENSE="BSD (2-clause)
|
||||
GNU GPL v2"
|
||||
REVISION="2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/facebook/zstd/archive/v$portVersion.tar.gz"
|
||||
SOURCE_FILENAME="zstd-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="0d9ade222c64e912d6957b11c923e214e2e010a18f39bec102f572e693ba2867"
|
||||
CHECKSUM_SHA256="f7de13462f7a82c29ab865820149e778cbfe01087b3a55b5332707abf9db4a6e"
|
||||
PATCHES="zstd-$portVersion.patchset"
|
||||
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
|
||||
PATCHES="$PATCHES
|
||||
Reference in New Issue
Block a user