Code: Select all
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -momit-leaf-frame-pointer -pipe"
CXXFLAGS="${CFLAGS}"Code: Select all
emerge -e system
emerge -e systemThat's more than enough, and if the Wiki you mentioned said that, it's either wrong, confused, or you misunderstood. -fomit-frame-pointer does not place any significant additional RAM requirements on the compiler.ingvildr wrote:i was reading the wiki and it said dont use -fomit-frame-pointer if u dont have much RAM i have 256 think thats enough?
Code: Select all
-fomit-frame-pointer
This flag is very good if you are concerned mainly with execution times. However, binary size will almost certainly increase, sometimes by %30 or more. Do not use it on a low-space system, or one without much RAM.And this is why you shouldn't blindly trust a Wiki.ingvildr wrote:this from gentoo-wiki.com
Code: Select all
-fomit-frame-pointer This flag is very good if you are concerned mainly with execution times. However, binary size will almost certainly increase, sometimes by %30 or more. Do not use it on a low-space system, or one without much RAM.
It sometimes makes the generated code smaller and sometimes bigger.stonent wrote:I always thought fomit-frame-pointer made things smaller by removing some debug information and this an overall optimization of size and speed.

CHOST is used, among other things, by the GNU autotools (the autoconf - automake - libtool family) and the configure and linker scripts produced by these. If you change the CHOST and don't re-bootstrap (nope, recompiling everything doesn't count as bootstrap) things will break in very subtle and mysterious ways later. If you change the CHOST and re-bootstrap, things may break later, but the potential for breakage is far less. Doesn't actually matter much in which direction you change the CHOST.elyre_elan wrote:Back to CHOST, moocha, you agree with the documentation and state to not change the CHOST outside of stage1. I just did that for a web server (home use) that I was converting from the 2.4 kernel to 2.6. It is a low end Athalon 600 MHz. I changed the CHOST setting from 386 to 686. I am now recompiling everything.
If the machine tanks, that's fine. I can easily rebuild it. However, I am curious. If I re-compile everything (which I am doing because of nptl anyway), shouldn't that drastically reduce the number of potential bugs? Also, isn't it safer to move up (i.e. 386 to 686) vs. down due to backwards compatibility of instruction sets?
Or am I merely being naive and overly optimistic here?Where could I find more information on what exactly CHOST does internally?

Code: Select all
CFLAGS="-O2 -march=athlon-tbird -fomit-frame-pointer -pipe -funit-at-a-time"
I plan on building gentoo from stage 1 on my amd64 but im gonna compile it for 32-bit. Can i use those same flags except change march to athlon instead of athlon64?LoSeR_5150 wrote:I have a pretty fast and fairly stable amd64 gentoo installed with the following CFLAGS:
CFLAGS="-march=athlon64 -O2 -fforce-addr -fmove-all-movables -fno-ident -fomit-frame-pointer -fpeel-loops
-fprefetch-loop-arrays -frename-registers -ftracer -funswitch-loops -funit-at-a-time -fweb -pipe"
CXXFLAGS="${CFLAGS}"
Any comments/suggestions on CFLAG/CXXFLAGS welcome...
also I have seen many people use the -fvisibility-inlines-hidden flag with CXXFLAGS however I have removed it
due to a handful of packages not compiling properly with it... i.e. glibmm, gtkmm, etc...
and to think i started with -march=athlon64 -02 -pipe... now my system is in its full riced glory
bgzee wrote:I plan on building gentoo from stage 1 on my amd64 but im gonna compile it for 32-bit. Can i use those same flags except change march to athlon instead of athlon64?
Just make sure to start installing from x86-Gentoo-minimal/universal not amd64-* one. In this way, your CHOST would be set properly (e.g. i686-*) and in the endeffect you would have 32-bit system, no matter the march flags (so yes, you can use athlon64/nocona, just make sure the default compiler recognizes them, since stable x86 gcc is still 3.3.5).Grahammm wrote:I am about to take delivery of a system with a P4 which supports EM64T. Am I right in thinking that -march=prescott is the correct one if I use it in 32bit mode (x86) and -march=nocona should only be used for a 64bit build (amd64)? Or would -march=nocona be OK for a 32bit system?