this post was submitted on 11 Jul 2023
4 points (100.0% liked)

Gentoo Linux

482 readers
2 users here now

The Gentoo Linux community for discussions, tips and tricks, and general kernel compiling

founded 1 year ago
MODERATORS
 

I've heard that you should be using the appropriate stage3 archive for the profile you want to use, but what exactly are the differences between them? I'm asking this because I want to try doing a Hardened/SELinux/Musl/LLVM install, and there's a profile for that, but not the stage3 archive. I was thinking of starting with either Hardened/Musl or LLVM/Musl. Any thoughts on that?

top 5 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 1 year ago

From my understanding, it is okay if a stage3 archive does not exist for your target. Make sure to pick the closest one. Your approach seems right imo. I am not sure if hardened or LLVM is better though.

My understanding is that a stage3 is kind of a starting point. In many cases you can switch profiles, and all that will happen is it will just have to do more compilation to get there. Choosing the closest stage3 saves you time in that initial compile.

But some profile switches can cause trouble. For example, switching between glibc and musl may not work. But switching between, say, non-desktop to desktop is perfectly fine.

[–] [email protected] 3 points 1 year ago (1 children)

changing profiles within the same version ( 17.1, changing versions requires various steps), and C library ( glibc vs musl) is fine. going from multilib to no-multilib is fine. Many people mistakenly think no-multilib to multilib requires a reinstall, but actually just requires USE="multilib-bootstrap" emerge -1 sys-libs/glibc after changing the profile, and then emerge -1 sys-devel/gcc after that. adding selinux requires doing thing in a certain order. other than that, just doing a world rebuild is enough.

[–] [email protected] 2 points 1 year ago (1 children)

Yeah, I'm aware that I still need to do the steps in the Gentoo Wiki for SELinux, I was just wondering if I just do the same step if I want to use other stage3 archives. As far as I understand, LLVM contains some predefined GCC fallback environment (and I think also a preconfigured list of known packages that still doesn't work with LLVM, which they set to use GCC?), while switching to Hardened doesn't require much manual configuration AFAIK, so I might just go with Musl/LLVM.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (1 children)

just keep in mind the hardened profile mostly kicks in at compile time by using a compiler thats had its defaults tweaked thanks to the hardened use flag., so you'd probably want to do a total rebuild (emerge -e world) if you want everything built from a hardened clang.

[–] [email protected] 1 points 1 year ago

yeah, that last bit is kind of handy, last time i tried llvm on gentoo before moving to nixos, it was kind of annoying to have to manually enter packages that can't use clang to package.use

load more comments
view more: next ›