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>
Wed, 9 Feb 2022 08:35:55 +0000 (08:35 +0000)
commit73076b0b7e2e9b21275dd321e856a456d442e206
treef768210350a8afb3d1c5d8a97fe07bb51d2560c4
parent77e7f667b5e84b0d777f586b13919358a7cbfcaa
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