From f2e2dacb6a414a836e3568de91c2d1fa6db05f6f Mon Sep 17 00:00:00 2001 From: Georgy Yakovlev Date: Sat, 22 Aug 2020 22:23:31 -0700 Subject: 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 Closes: https://github.com/gentoo/gentoo/pull/17225 Closes: https://bugs.gentoo.org/737302 Signed-off-by: Sam James --- eclass/kernel-build.eclass | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'eclass/kernel-build.eclass') diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index 9f7a8e3296f0..47b0db349561 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*' ')' \ -- cgit v1.2.3-65-gdbad