commit:     f2e2dacb6a414a836e3568de91c2d1fa6db05f6f
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 23 05:23:31 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Aug 23 15:06:14 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2e2dacb

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 <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/17225
Closes: https://bugs.gentoo.org/737302
Signed-off-by: Sam James <sam <AT> gentoo.org>

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

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*' ')' \

Reply via email to