Update to version 1.4.8 to fix i586+s390x
OBS-URL: https://build.opensuse.org/package/show/Archiving/zstd?expand=0&rev=54
This commit is contained in:
parent
d16a102468
commit
48170d5a65
44
2430.patch
44
2430.patch
@ -1,44 +0,0 @@
|
||||
From ae85676d44baee3d12168a5c929347b3836f2cf2 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Terrell <terrelln@fb.com>
|
||||
Date: Thu, 17 Dec 2020 14:27:53 -0800
|
||||
Subject: [PATCH] Fix alignment of scratchBuffer in HUF_compressWeights()
|
||||
|
||||
The scratch buffer must be 4-byte aligned. This causes test failures in
|
||||
32-bit systems, where the stack isn't aligned.
|
||||
|
||||
Fixes Issue #2428.
|
||||
---
|
||||
lib/common/fse.h | 5 +++--
|
||||
lib/compress/huf_compress.c | 2 +-
|
||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/common/fse.h b/lib/common/fse.h
|
||||
index 83a07847a..dd5fc44e8 100644
|
||||
--- a/lib/common/fse.h
|
||||
+++ b/lib/common/fse.h
|
||||
@@ -335,9 +335,10 @@ size_t FSE_buildCTable_rle (FSE_CTable* ct, unsigned char symbolValue);
|
||||
|
||||
/* FSE_buildCTable_wksp() :
|
||||
* Same as FSE_buildCTable(), but using an externally allocated scratch buffer (`workSpace`).
|
||||
- * `wkspSize` must be >= `FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog)`.
|
||||
+ * `wkspSize` must be >= `FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog)` of `unsigned`.
|
||||
*/
|
||||
-#define FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog) (sizeof(unsigned) * (maxSymbolValue + 2) + (1ull << tableLog))
|
||||
+#define FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog) (maxSymbolValue + 2 + (1ull << (tableLog - 2)))
|
||||
+#define FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog) (sizeof(unsigned) * FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog))
|
||||
size_t FSE_buildCTable_wksp(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize);
|
||||
|
||||
#define FSE_BUILD_DTABLE_WKSP_SIZE(maxTableLog, maxSymbolValue) (sizeof(short) * (maxSymbolValue + 1) + (1ULL << maxTableLog) + 8)
|
||||
diff --git a/lib/compress/huf_compress.c b/lib/compress/huf_compress.c
|
||||
index abbcc3192..00c593d7e 100644
|
||||
--- a/lib/compress/huf_compress.c
|
||||
+++ b/lib/compress/huf_compress.c
|
||||
@@ -69,7 +69,7 @@ static size_t HUF_compressWeights (void* dst, size_t dstSize, const void* weight
|
||||
U32 tableLog = MAX_FSE_TABLELOG_FOR_HUFF_HEADER;
|
||||
|
||||
FSE_CTable CTable[FSE_CTABLE_SIZE_U32(MAX_FSE_TABLELOG_FOR_HUFF_HEADER, HUF_TABLELOG_MAX)];
|
||||
- BYTE scratchBuffer[FSE_BUILD_CTABLE_WORKSPACE_SIZE(HUF_TABLELOG_MAX, MAX_FSE_TABLELOG_FOR_HUFF_HEADER)];
|
||||
+ U32 scratchBuffer[FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(HUF_TABLELOG_MAX, MAX_FSE_TABLELOG_FOR_HUFF_HEADER)];
|
||||
|
||||
unsigned count[HUF_TABLELOG_MAX+1];
|
||||
S16 norm[HUF_TABLELOG_MAX+1];
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:085500c8d0b9c83afbc1dc0d8b4889336ad019eba930c5d6a9c6c86c20c769c8
|
||||
size 1817193
|
3
zstd-1.4.8.tar.gz
Normal file
3
zstd-1.4.8.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f176f0626cb797022fbf257c3c644d71c1c747bb74c32201f9203654da35e9fa
|
||||
size 1816546
|
@ -1,7 +1,7 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 18 06:30:18 UTC 2020 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||
Sat Dec 19 04:01:08 UTC 2020 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||
|
||||
- Add upstream 2430.patch to fix i586+s390x
|
||||
- Update to version 1.4.8 to fix i586+s390x
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 17 04:04:42 UTC 2020 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||
|
@ -19,7 +19,7 @@
|
||||
%define major 1
|
||||
%define libname lib%{name}%{major}
|
||||
Name: zstd
|
||||
Version: %{major}.4.7
|
||||
Version: %{major}.4.8
|
||||
Release: 0
|
||||
Summary: Zstandard compression tools
|
||||
License: BSD-3-Clause AND GPL-2.0-only
|
||||
@ -28,7 +28,6 @@ URL: https://github.com/facebook/zstd
|
||||
Source0: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Source99: baselibs.conf
|
||||
Patch1: pzstd.1.patch
|
||||
Patch2: 2430.patch
|
||||
BuildRequires: gcc
|
||||
# C++ is needed for pzstd only
|
||||
BuildRequires: gcc-c++
|
||||
@ -85,7 +84,6 @@ Needed for compiling programs that link with the library.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
||||
|
Loading…
Reference in New Issue
Block a user