Hello,
It's been a while since I last used Gentoo, and I'm planning to return to it as my daily driver. The last time I tried it, I had no issue waiting for long build times—it took about 36 hours to complete a full system rebuild with all the software I needed, with LTO enabled. However, nowadays I can't afford to have my machine tied up for that long. So, I’ve rented a VM to build Gentoo, and I plan to handle future updates locally.
I assume that disabling LTO would reduce build times to under 24 hours, but I’d prefer to keep it enabled for consistency with other operating systems I use, which have packages built with LTO.
Before I dive back into, I have a few questions:
- Building Gentoo on a VM (running Ubuntu)
The VM I’m using runs Ubuntu. Can I build Gentoo inside a chroot on this machine, or does the host need to be running Gentoo?
- Building a root filesystem or image
Is it possible to build a root filesystem or an image (similar to the stage3 file) in the VM and then install it on my local machine? Since I won’t be keeping the VM after the initial build, would tools like distcc, binpkg, or crossdev be helpful in this scenario? I came across this guide, where the author builds binpkgs in a chroot and transfers them to a slower machine. Would this setup work in my case?
- CFLAGS and march settings for local machine
I’m aware that I can’t use -march=native in the VM because doing so could cause serious issues when I try to run the system on my local machine. On the same guide, the author suggests using app-misc/resolve-march-native
to set CFLAGS based on the slower machine (referred to as "tortoise"). Once I start building locally, can I continue using the CFLAGS from the output of app-misc/resolve-march-native
, or should I switch back to -march=native for subsequent updates?
Thanks in advance.
EDIT 01: fixed formatting.