linux-info explicitly looks at ${KV_DIR}/Makefile, whereas the presence of a GNUmakefile ought to override Makefile (eg, this is used to set ARCH=x86_64 on 32-bit userspace). In my case, I am using it to set CROSS_COMPILE since I need to build my kernel with a non-standard compiler, and linux-info is failing because it tries to execute various tests (part of Makefile) without the correct CROSS_COMPILE setting.
Can you give me the full steps to reproduce
1) Extract an x86_32 stage to make a chroot 2) emerge your favourite kernel sources and crossdev a x86_64-pc-linux-gnu toolchain 3) create /usr/src/linux/GNUmakefile containing: ARCH=x86_64 CROSS_COMPILE=x86_64-pc-linux-gnu- include Makefile 4) build kernel w/ `make && make modules_install` 5) Try to emerge anything using linux-info
(In reply to Luke-Jr from comment #2) > 1) Extract an x86_32 stage to make a chroot > 2) emerge your favourite kernel sources and crossdev a x86_64-pc-linux-gnu > toolchain > 3) create /usr/src/linux/GNUmakefile containing: > > ARCH=x86_64 > CROSS_COMPILE=x86_64-pc-linux-gnu- > include Makefile > > 4) build kernel w/ `make && make modules_install` > 5) Try to emerge anything using linux-info Got it, so you would also want this support in ${ROOT%/}/lib/modules/${KV_FULL}/source/GNUmakefile correct ?
(In reply to Mike Pagano from comment #3) > Got it, so you would also want this support in > > ${ROOT%/}/lib/modules/${KV_FULL}/source/GNUmakefile > > correct ? AFAIK that path is just another symlink to the same directory?
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d497c62450da33d98f7d4c7b7ce755793ef7892 commit 6d497c62450da33d98f7d4c7b7ce755793ef7892 Author: Mike Pagano <mpagano@gentoo.org> AuthorDate: 2021-09-04 17:46:07 +0000 Commit: Mike Pagano <mpagano@gentoo.org> CommitDate: 2021-09-04 17:46:07 +0000 Thanks to Sam, mgorny and Ulm for the review. Support the possibility that the Makefile could be one of the following and should be checked in the order described here: https://www.gnu.org/software/make/manual/make.html Order of checking and valid Makefiles names: GNUMakefile, makefile, Makefile Closes: https://bugs.gentoo.org/663368 Signed-off-by: Mike Pagano <mpagano@gentoo.org> eclass/linux-info.eclass | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-)