commit:     5f5a72715819f43db6ecff2a834f7c8ccb3917f1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 24 16:00:56 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jul 24 16:02:59 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f5a7271

kernel-build.eclass: Force GNU tar for kernel builds

Override the tar executable used by kernel Makefiles to force GNU tar.
This is necessary since some of the scripts use options specific
to GNU tar, and therefore fail with other choices for
app-alternatives/tar.  That said, this override works only with the most
recent version of sys-kernel/gentoo-kernel.  It doesn't cover all
upstream uses of tar, but it does cover these that fail with other tar
implementations.

Closes: https://bugs.gentoo.org/951102
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 eclass/kernel-build.eclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 3296f2c6ad75..7a5c80cfd6a6 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -47,6 +47,7 @@ BDEPEND="
        ${PYTHON_DEPS}
        app-alternatives/cpio
        app-alternatives/bc
+       app-arch/tar
        dev-lang/perl
        sys-devel/bison
        sys-devel/flex
@@ -226,6 +227,7 @@ kernel-build_src_configure() {
                OBJCOPY="$(tc-getOBJCOPY)"
                OBJDUMP="$(tc-getOBJDUMP)"
                READELF="$(tc-getREADELF)"
+               TAR=gtar
 
                # we need to pass it to override colliding Gentoo envvar
                ARCH=$(tc-arch-kernel)

Reply via email to