eclass/kernel-build.eclass: copy module.lds linker script

without it it's impossible to build external kernel modules
on some arches (zfs-kmod on arm64 for example)

Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/17225
Closes: https://bugs.gentoo.org/737302
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Georgy Yakovlev
2020-08-22 22:23:31 -07:00
committed by Sam James
parent 7fce14ba44
commit f2e2dacb6a

View File

@@ -147,6 +147,11 @@ kernel-build_src_install() {
mv include scripts "${ED}/usr/src/linux-${ver}/" || die
mv "arch/${kern_arch}/include" \
"${ED}/usr/src/linux-${ver}/arch/${kern_arch}/" || die
# some arches need module.lds linker script to build external modules
if [[ -f arch/${kern_arch}/kernel/module.lds ]]; then
insinto "/usr/src/linux-${ver}/arch/${kern_arch}/kernel"
doins "arch/${kern_arch}/kernel/module.lds"
fi
# remove everything but Makefile* and Kconfig*
find -type f '!' '(' -name 'Makefile*' -o -name 'Kconfig*' ')' \