News for hackers. Stuff that matters.
Re:Gentoo Linux Goes Binary by bee_rider on Friday December 29, 2023 @09:33AM (#38805308)
Next you’ll tell me there are optimization settings other than -mtune=native
Re:Gentoo Linux Goes Binary by adrian_b on Friday December 29, 2023 @09:39AM (#38805403)
I am not sure what you mean, but in the chrooted environment where you compile for a distinct machine you obviously use configuration options, including compiler flags, appropriate for the target computer, not for the host computer, so "-mtune=native" cannot be used.

My point is that you do not need to setup a binrepo or any other complication like this.

You can install easily Gentoo on a very weak computer, by performing the installation on a typical desktop computer, which may run a different Linux distribution, not necessarily also Gentoo, and then just copying the files.

The Gentoo manual has always included information on how to install Gentoo inside a chrooted environment.

Re:Gentoo Linux Goes Binary by trelane on Friday December 29, 2023 @10:10AM (#38805747)
> not for the host computer, so "mtune=native" cannot be used.

Right, I am sure they intended it to be absurd in an amusing way.

Re:Gentoo Linux Goes Binary by bee_rider on Friday December 29, 2023 @10:32AM (#38805989)
Indeed I did.

Although, I do somewhat think that working out good optimization flags for cross-platform compiles is a moderately unusual skill, even among people who compile things regularly. Hopefully I caveated that sufficiently, I’m not saying it is a hyper-advanced dark art or anything.

I have in the past set up code on a cluster to just compile on one node for the first run with -mtune=native because I’m lazy!

Re:Gentoo Linux Goes Binary by klodolph on Friday December 29, 2023 @09:38AM (#38805382)
Well, duh. There’s also -funroll-loops.
Re:Gentoo Linux Goes Binary by bee_rider on Friday December 29, 2023 @09:39AM (#38805404)
Much better than -boringroll-loops.
Re:Gentoo Linux Goes Binary by abulman on Friday December 29, 2023 @10:27AM (#38805937)
Just don't use -O2 and -fe unless you want to end up with Rust.
Re:Gentoo Linux Goes Binary by trelane on Friday December 29, 2023 @09:39AM (#38805401)
You always have to remember to fun roll the loops, though. :)

https://forums.gentoo.org/viewtopic-t-245041-start-25.html

Re:Gentoo Linux Goes Binary by Maken on Friday December 29, 2023 @09:48AM (#38805505)
Never forget -Ofast.