FreeBSD / Gentoo be like? [Solved -> Linux in the furnace!]

If I weere you I would forget about
Code:
CFLAGS="-02 -pipe -march=native"
If I recall correctly, -O2 and -pipe are default, so you do not win anything with it. The only thing I use is CPUTYPE?=, this will make the code more useable for your specific CPU. But if it really helps, I really do not know.

I would leave them alone, and start exploring the system, when you feel more at home with the system, you can change buildflags.

regards
Johan
 
Crivens said:
Some ports use an older gcc as a build compiler and that one can barf on that -march because it is too new an option. I forgot which port it is that caused this, but it bit a friend of me, who is using gentoo, some weeks later - so it seems to be more than just a ports-issue for FreeBSD.
Feel free to remember your friend that he needs to install a historic version of gcc to build OpenOffice on gentoo (or at least he had to in 200x), too, and that historic version is even older then FreeBSD world's gcc.

Crivens said:
But are there any benchmarks to show that setting -march does do any measurable improvements?
You'll be surprised. Thanks to bugs in the optimization layers, most of those measurable improvements would show you not specifying march will generate faster non-vector code (99% of your programs, that is) then when specifying it.

doorways said:
forgetting about corei5. (( . will have to specify both "native".
corei3, corei5 and corei7 all use the same instruction set, therefore there's only one compliler trigger for them. It's i7 because that one hit the markets first.

On the OP:
1. I use portmaster
2.1. CFLAGS, improvements not worth bothering
2.2. CPUTYPE, improvements not worth bothering either, unless you're building multimedia applications on an "established" CPU (new CPUs get buggy optimizations)
3. As most people don't need to modify it, or only do trival modifications (e.g. cp GENERIC MYCONFIG && echo "option ALTQ" >> MYCONFIG), so there's not much effort to do this
4. /etc/make.conf
5.1 Ctrl+T is awesome :P
5.2 FreeBSD-STABLE is stable, while linux' official dot-zero releases are often more broken then FreeBSD HEAD
5.3 ports dependency setup is done in a few minutes per month, portage would easily keep me for half an hour every week
5.4 FFS and ZFS are both better then extfs
5.5 FreeBSD has a fully working NFS implementation, BIND, Telnet, SSH, ... and other useful networking goodies in base
5.6 Non-networking goodies in base
5.7 I like the license
5.8 GNU lacks [url="http://www.freebsd.org/cgi/man.cgi?query=style]style[/url]
 
xibo said:
Feel free to remember your friend that he needs to install a historic version of gcc to build OpenOffice on gentoo (or at least he had to in 200x), too, and that historic version is even older then FreeBSD world's gcc.
No need for that, he learned that already the hard way. At least, the port will get and set up said ancient gcc (clay-tablet man page and all), but on gentoo I have my doubts if it is doing the same or if portage simply tries to run the current system gcc.
xibo said:
You'll be surprised. Thanks to bugs in the optimization layers, most of those measurable improvements would show you not specifying march will generate faster non-vector code (99% of your programs, that is) then when specifying it.
Bugs in the optimizer are not only common and annoying, but they also are first rate heisenbugs. Five percent in performance improvement by "wand waving" may well produce bad code in >5% of cases. Wasn't there some trouble with SPEC when it was found that some benchmarks ran as fast as recorded with the vendow flags but produced bad output?

What usually gives good performance is keeping the cache loaded. The access speed difference between CPU and main memory today is about the same as if you would run the old XT directly from it's HD. So unrolling loops ad-inf will increase code size and may well blow up the performance.
 
Back
Top