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@gentoo.org>
This commit is contained in:
Michał Górny
2025-07-24 18:00:56 +02:00
parent 312b3b7d4c
commit 5f5a727158

View File

@@ -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)