summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2023-12-28 00:04:14 -0500
committerIonen Wolkens <ionen@gentoo.org>2023-12-28 01:29:00 -0500
commit44db9a32adb0632ae6ae77dd63c83c010387bb5d (patch)
treeea2bec52a67c54dea090708545f0fe9576a45f21 /eclass/linux-mod-r1.eclass
parentdev-python/rapidfuzz: Bump to 3.6.0 (diff)
downloadgentoo-44db9a32adb0632ae6ae77dd63c83c010387bb5d.tar.gz
gentoo-44db9a32adb0632ae6ae77dd63c83c010387bb5d.tar.bz2
gentoo-44db9a32adb0632ae6ae77dd63c83c010387bb5d.zip
linux-mod-r1.eclass: use kernel compatible xz settings for >=kmod-31
When the non-default CONFIG_KERNEL_DECOMPRESS option is set in kernel >6.4, >=kmod-31 will let the kernel handle decompression rather than use xz-utils. ...but kernel XZ decompressor is more limited, so need to use the same options the kernel does. -T/--threads fortunately is harmless to keep on top. Note crc32 is already the default and main problem was dict size, but still specify in case someone has e.g. XZ_DEFAULTS="--check=sha256". Closes: https://bugs.gentoo.org/920837 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'eclass/linux-mod-r1.eclass')
-rw-r--r--eclass/linux-mod-r1.eclass9
1 files changed, 8 insertions, 1 deletions
diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
index 858fb0628070..44fc927c3a70 100644
--- a/eclass/linux-mod-r1.eclass
+++ b/eclass/linux-mod-r1.eclass
@@ -837,7 +837,14 @@ _modules_prepare_toolchain() {
_modules_process_compress() {
local -a compress
if linux_chkconfig_present MODULE_COMPRESS_XZ; then
- compress=(xz -qT"$(makeopts_jobs)" --memlimit-compress=50%)
+ compress=(
+ xz -q
+ --memlimit-compress=50%
+ --threads="$(makeopts_jobs)"
+ # match options from kernel's Makefile.modinst (bug #920837)
+ --check=crc32
+ --lzma2=dict=1MiB
+ )
elif linux_chkconfig_present MODULE_COMPRESS_GZIP; then
if type -P pigz &>/dev/null; then
compress=(pigz -p"$(makeopts_jobs)")