Package: linux-source-5.10 Version: 5.10.9-1 Severity: normal Tags: ftbfs X-Debbugs-Cc: nos...@kota.moe
Trying to build in-tree kernel modules without the rest of the kernel (with the M=... make target) results in the build failing with "ld: cannot open linker script file -o: No such file or directory" Commands to reproduce (taken from a DKMS Makefile): tar xaf $(LINUX_SOURCE_TAR) --strip-components=1 -C linux-source cp /boot/config-$(KERNELRELEASE) linux-source/.config cp /usr/src/linux-headers-$(KERNELRELEASE)/Module.symvers linux- source/Module.symvers $(MAKE) -C linux-source oldconfig $(MAKE) -C linux-source prepare $(MAKE) -C linux-source M=drivers/hwmon This seems to be direct cause of a recent Debian patch: https://salsa.debian.org/kernel- team/linux/-/blob/master/debian/patches/debian/kbuild-look-for-module.lds- under-arch-directory-too.patch (commit 39a8b293ff1881bca11dae1831885dd30581d023) The patch tries to make the linker only use a specific linker script (module.lds) if it exists, but ends up preventing the linker script from being built from source (module.lds.S), and thus ends up never existing. -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.10.0-1-amd64 (SMP w/8 CPU threads) Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages linux-source-5.10 depends on: ii binutils 2.35.1-7 ii xz-utils 5.2.5-1.0 Versions of packages linux-source-5.10 recommends: ii bc 1.07.1-2+b2 ii bison 2:3.7.4+dfsg-1 ii flex 2.6.4-8 ii gcc 4:10.2.1-1 ii libc6-dev [libc-dev] 2.31-9 ii linux-config-5.10 5.10.9-1 ii make 4.3-4 Versions of packages linux-source-5.10 suggests: ii libncurses-dev [ncurses-dev] 6.2+20201114-2 ii pkg-config 0.29.2-1 pn qtbase5-dev <none> -- no debconf information