[openwrt/openwrt] tools: zstd: override max safe compression level
LEDE Commits
lede-commits at lists.infradead.org
Sat Apr 6 02:24:29 PDT 2024
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ed149717eec3bfe42d4cc32ee1d74cc53a19bad5
commit ed149717eec3bfe42d4cc32ee1d74cc53a19bad5
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 5 14:29:50 2024 +0200
tools: zstd: override max safe compression level
ZTSD limits the safe compression level to a max of 19 as 20 to 22 cause
increased RAM usage. Higher levels require --ultra arg passed.
There isn't currently a way to set --ultra using ENV options similar to
ZSTD_CLEVEL and ZSTD_CLEVEL is limited to 19.
To fix this, we can increase the max safe compression level by providing
a custom ZSTDCLI_CLEVEL_MAX value with CFLAGS.
The max safe level is increased to 20.
Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
tools/zstd/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/zstd/Makefile b/tools/zstd/Makefile
index 3f69c6d497..d194ecd005 100644
--- a/tools/zstd/Makefile
+++ b/tools/zstd/Makefile
@@ -17,6 +17,9 @@ include $(INCLUDE_DIR)/host-build.mk
HOSTCC:= $(HOSTCC_NOCACHE)
+HOST_CFLAGS += \
+ -DZSTDCLI_CLEVEL_MAX=20
+
HOST_MAKE_FLAGS += \
ZSTD_LEGACY_SUPPORT=7 \
BACKTRACE=0 \
More information about the lede-commits
mailing list