Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 663368 - linux-info eclass ignores kernel GNUmakefile
Summary: linux-info eclass ignores kernel GNUmakefile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: https://www.gnu.org/software/make/man...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-11 15:29 UTC by Luke-Jr
Modified: 2021-09-04 17:46 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke-Jr 2018-08-11 15:29:05 UTC
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.
Comment 1 Mike Pagano gentoo-dev 2021-08-24 21:37:25 UTC
Can you give me the full steps to reproduce
Comment 2 Luke-Jr 2021-08-24 22:56:12 UTC
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
Comment 3 Mike Pagano gentoo-dev 2021-09-01 18:05:39 UTC
(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 ?
Comment 4 Luke-Jr 2021-09-01 18:13:36 UTC
(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?
Comment 5 Larry the Git Cow gentoo-dev 2021-09-04 17:46:27 UTC
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(-)