* [gentoo-user] Building kernel without messing the kernel source tree
@ 2021-05-14 9:47 Thomas Mueller
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Mueller @ 2021-05-14 9:47 UTC (permalink / raw
To: gentoo-user
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.
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.
This would likely be a cross-compile from NetBSD or FreeBSD.
Could I do make -C ~/builds/linux-4.19.105 ARCH=x86_64 CROSS_COMPILE=x86_64-linux-musl- ... ?
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.
I would like to compile for x86_64 and also i486 (or would that be i386)?
Is this a question for gentoo-user or gentoo-dev?
The "make" I use is built from GNU source, not /usr/bin/make as is found on NetBSD or FreeBSD.
Tom
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-user] Building kernel without messing the kernel source tree
[not found] <20210514094713.30616E08F2@pigeon.gentoo.org>
@ 2021-05-14 9:59 ` netfab
0 siblings, 0 replies; 2+ messages in thread
From: netfab @ 2021-05-14 9:59 UTC (permalink / raw
To: gentoo-user
Le 14/05/21 à 11:47, Thomas Mueller a tapoté :
> 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.
You should have a look to KBUILD_OUTPUT environment variable.
https://www.kernel.org/doc/html/latest/kbuild/kbuild.html#kbuild-output
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-14 9:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-14 9:47 [gentoo-user] Building kernel without messing the kernel source tree Thomas Mueller
[not found] <20210514094713.30616E08F2@pigeon.gentoo.org>
2021-05-14 9:59 ` netfab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox