kbuild: Look for module.lds under arch directory too
authorBen Hutchings <benh@debian.org>
Thu, 10 Dec 2020 16:31:39 +0000 (17:31 +0100)
committerSalvatore Bonaccorso <carnil@debian.org>
Tue, 13 Dec 2022 20:46:50 +0000 (20:46 +0000)
commitcc178b75e0d2681d35ef3c5fb6ce13890ad43922
tree658459bb4163261593c9c83219762c26f7c08a52
parent3c57bd5f3475de71a379ff08d98c5ef9103e3239
kbuild: Look for module.lds under arch directory too

Forwarded: not-needed
Bug-Debian: https://bugs.debian.org/975571

The module.lds linker script is now built under the scripts directory,
where previously it was under arch/$(SRCARCH).

However, we package the scripts directory as linux-kbuild, which is
meant to be able to do support native and cross-builds.  That means it
shouldn't contain files for a specific target architecture without a
wrapper to select between them, and it doesn't appear that linker
scripts are powerful enough to implement such a wrapper.

Building module.lds in a different location would require relatively
large changes.  Moving it in the package build rules can work, but we
need to support custom kernel builds from the same source so we can't
assume it's moved.

Therefore, we move module.lds under the arch build directory in
rules.real and change Makefile.modfinal to look for it in both places.

Gbp-Pq: Topic debian
Gbp-Pq: Name kbuild-look-for-module.lds-under-arch-directory-too.patch
scripts/Makefile.modfinal