summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-10-17 19:34:50 +0100
committerSam James <sam@gentoo.org>2022-10-17 19:34:50 +0100
commit0417d3ff8c2e634cd8950c66c3bb25c2bf16d1d4 (patch)
tree38dd2dfce2a81d6af3da00d3f11621d1c0ec85b8 /eclass/linux-mod.eclass
parentkernel-build.eclass: add workaround for < xz 5.3.3_alpha 32-bit issue (diff)
downloadgentoo-0417d3ff8c2e634cd8950c66c3bb25c2bf16d1d4.tar.gz
gentoo-0417d3ff8c2e634cd8950c66c3bb25c2bf16d1d4.tar.bz2
gentoo-0417d3ff8c2e634cd8950c66c3bb25c2bf16d1d4.zip
linux-mod.eclass: add workaround for < xz 5.3.3_alpha 32-bit issue
With older versions of xz, xz -T0 will on 32-bit systems try to allocate too much memory and bail out. After discussing with upstream, we set --memlimit-compress=50% as a way to make things work with both older & newer versions. This limiting is essentially already present with >= 5.3.3_alpha as -T0 includes it. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/linux-mod.eclass')
-rw-r--r--eclass/linux-mod.eclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index f0005a8cca65..6846c528354a 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -716,7 +716,7 @@ linux-mod_src_install() {
# and similarily compress the module being built if != NONE.
if linux_chkconfig_present MODULE_COMPRESS_XZ; then
- xz -T$(makeopts_jobs) ${modulename}.${KV_OBJ} || die "Compressing ${modulename}.${KV_OBJ} with xz failed"
+ xz -T$(makeopts_jobs) --memlimit-compress=50% ${modulename}.${KV_OBJ} || die "Compressing ${modulename}.${KV_OBJ} with xz failed"
doins ${modulename}.${KV_OBJ}.xz
elif linux_chkconfig_present MODULE_COMPRESS_GZIP; then
if type -P pigz &>/dev/null ; then