commit:     09eaf06963809bbcbabf0903bf203ad5bf2ee893
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 17 18:32:20 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 17 18:32:20 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09eaf069

kernel-build.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/kernel-build.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 1fa25cbc9574..7086297bf52a 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -91,7 +91,7 @@ kernel-build_src_configure() {
        )
 
        if type -P xz &>/dev/null ; then
-               export XZ_OPT="-T$(makeopts_jobs)"
+               export XZ_OPT="-T$(makeopts_jobs) --memlimit-compress=50%"
        fi
 
        if type -P zstd &>/dev/null ; then

Reply via email to