Gentoo Archives: gentoo-user

From: Thomas Mueller <mueller6724@×××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Building kernel without messing the kernel source tree
Date: Fri, 14 May 2021 09:47:17
Message-Id: 20210514094712.CC408E08DD@pigeon.gentoo.org
1 I am looking to compile the Linux kernel and send the work and output to another directory, thereby leaving the kernel source tree directory clean.
2
3 If I build gcc or other software using configure script, I can go to another directory and run, for instance, ~/builds/gcc-8.3.0/configure --prefix=/usr ... without dirtying the source directory.
4
5 This would likely be a cross-compile from NetBSD or FreeBSD.
6
7 Could I do make -C ~/builds/linux-4.19.105 ARCH=x86_64 CROSS_COMPILE=x86_64-linux-musl- ... ?
8
9 That would be my first thought, seeking to avoid having to clean after every run, successful or unsuccessful. Avoid the worry about whether clean, distclean or mrproper work.
10
11 I would like to compile for x86_64 and also i486 (or would that be i386)?
12
13 Is this a question for gentoo-user or gentoo-dev?
14
15 The "make" I use is built from GNU source, not /usr/bin/make as is found on NetBSD or FreeBSD.
16
17 Tom