summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2020-08-22 22:23:31 -0700
committerSam James <sam@gentoo.org>2020-08-23 15:06:14 +0000
commitf2e2dacb6a414a836e3568de91c2d1fa6db05f6f (patch)
treedda767eb26f501fb59082617e2a186b7331d13e9 /eclass/kernel-build.eclass
parentmedia-sound/abcmidi: update to 2020.06.07 (diff)
downloadgentoo-f2e2dacb6a414a836e3568de91c2d1fa6db05f6f.tar.gz
gentoo-f2e2dacb6a414a836e3568de91c2d1fa6db05f6f.tar.bz2
gentoo-f2e2dacb6a414a836e3568de91c2d1fa6db05f6f.zip
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>
Diffstat (limited to 'eclass/kernel-build.eclass')
-rw-r--r--eclass/kernel-build.eclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 9f7a8e3296f..47b0db34956 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -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*' ')' \