From 349c2ca5c8a058b30d42c537faa4c9e94e997106 Mon Sep 17 00:00:00 2001 From: Julius Bairaktaris Date: Sun, 4 Oct 2026 00:29:15 +0200 Subject: [PATCH] xz: use --enable-small only on SMALL_FLASH targets --enable-small builds only the resumable mode of the LZMA decoder and a single-table CRC32/CRC64 without the architecture-specific CRC code. Keep it for SMALL_FLASH targets and build the fast variants elsewhere. xz -dc -T1 of a 32 MiB file (3.3 MiB .xz), median of 5: 966 -> 880 ms on Cortex-A53, 813 -> 634 ms on Cortex-A72 in AArch32. liblzma grows by 11.5 KiB (aarch64) to 19.6 KiB (mips_24kc), compressed with xz. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Julius Bairaktaris --- utils/xz/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/xz/Makefile b/utils/xz/Makefile index 948d3f7e4b..dc3645121f 100644 --- a/utils/xz/Makefile +++ b/utils/xz/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xz PKG_VERSION:=5.8.4 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/tukaani-project/xz/releases/download/v$(PKG_VERSION) \ @@ -25,6 +25,7 @@ PKG_CPE_ID:=cpe:/a:tukaani:xz PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 PKG_BUILD_FLAGS:=lto +PKG_CONFIG_DEPENDS:=CONFIG_SMALL_FLASH include $(INCLUDE_DIR)/package.mk @@ -76,7 +77,7 @@ endef TARGET_LDFLAGS += -Wl,--gc-sections CONFIGURE_ARGS += \ - --enable-small \ + $(if $(CONFIG_SMALL_FLASH),--enable-small) \ --enable-assume-ram=4 \ --disable-assembler \ --disable-debug \