Linux from scratch

what kind of performance gains do I need to prepare for after -march=nativing the build toolchain?

Other urls found in this thread:

gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
twitter.com/NSFWRedditGif

Some stuff really do benefit from -O3 -march=native, but using it everywhere is mostly dumb. Just build your x264 or stuff like that with it, and stay in -O2 -march=native everywhere else.

What's the point of LFS when Gentoo exists?

heh more like port``ly``age

...

Isn't O3 worse than O2 like the majority of the time?

It can be, which is why O3 should be selectively applied, and justified with benchmarks.

Who /-ffast-math/ here

Should be called GLFS - GNU/Linux From Scratch since the book is about building a GNU/Linux system, not kernel development.

In Rust -O3 is default LOL. Sucks to be a C/C++ cuck

Reminds me of this one time I read the instructions for a mod and then downloaded it and installed it.
My friends were like
True story

You fell for it, mate. It _can_ be bad.

I use for my own code, but I'm not Xtreme enough to use it everywhere. Now, use -fassociative-math -freciprocal-math -fno-trapping-math for maximum compiler black magic.

Not in my experience.


lol'd, good joke.

Staticly compiling everything and everything and removing uneeded functions to save space, otherwise gentoo just werkz and has static compiling but not to that extreme.

Before wasting years of your life, know that x86 architecture will die and everything will become meaningless.
Jump on the next ship.

-ftree-vectorize -fvect-cost-model=cheap
When combined with -march=native in my own testing it gives a very consistent performance boost.
-ftree-vectorize is only enabled at -O3 but with -fvect-cost-model=cheap along with it from my testing the compiler will only vectorize if it's absolutely sure things are beneficial.

If you have a few different settings for ATTACK COMPILE THE KERNEL FOR MASSIVE DAMAGE PERFORMANCE GAINS, wouldn't it make sense to just have a few kernels compiled slightly differently and boot whichever one you needed for the task you're going to perform at the time? I've never really understood why there weren't stable/performance/autist kernel choices for most major distros.

LOL

Abandon your friends.

Coincidence?

...

>>/g/ or even >>>/reddit

The only way to build the kernel with only the things you need is to run "make localmodconfig" and then adding back modules and features you need with something like "make menuconfig".
-march=native will enable extentions to x86/x86_64/mipsr1/whatever that your processor is compatible with, and most of the time also silently enable -mtune=native which is supposed to put out assembly that's supposed to run better on your processor. The last part I don't understand very well so far, from what I've seen it takes your processor's cache size into account when picking between assembly that's faster but bigger or slower but smaller but there should be more to it.
It should also be nice to enable -ftree-vectorize and -fvect-cost-model=cheap when using -march=native like I said in . I've found that it works well.
If you run "man gcc" you can get an information on those flags, or use the webpage version gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

...

That said, I have a highly customized kernel config for my hw and it loads less than ten modules. I compile my kernel with this config in about 10 minutes with my desktop. This is what people commonly refer to as "the PC master race" and with good reason too.

Open the black box and it becomes just an ordinary box. No need to shy away from it.

...

even gentooians just download the firefucks binary most of the time

Why bother with that when you can just go all the way and write your own kernel?

Because it's an exercise in Linux administration. Writing your own kernel will teach you something about system programming, but it won't teach you much about all the parts that go into a modern Linux system and how they fit together.

...

And the alternative is being reduced to building everything.
What a fantastic OS.

Why do you need performance?

...