commit:     0417d3ff8c2e634cd8950c66c3bb25c2bf16d1d4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 17 18:34:50 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 17 18:34:50 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0417d3ff

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 <AT> gentoo.org>

 eclass/linux-mod.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

Reply via email to