On Friday 04 February 2005 10:13 am, Damian Kolkowski 
<[EMAIL PROTECTED]> wrote:
> * Captain FantastiK <[EMAIL PROTECTED]> [2005-02-04 16:22]:
> > CFLAGS="-O3 -march=pentium4 -mcpu=i686 -fomit-frame-pointer -pipe
> > -ftracer"
>
> Use this instead:
> -O2 -march=pentium4 -formit-frame-pointer
>
> Yours CFLAGS are wrong, You need to use onlu one (mcpu or marcg), the
> last one are used.

That's incorrect.

-march=<arch> produces code that will only work on that architecture.  For 
example, it may use MMX, SSE, or 3dNow operations.  It also includes the 
optimizations performed by -mcpu=<arch>.

-mcpu=<cpu> (Previously -mtune=<cpu>) produces code that will work on any 
architecture (within the limits of this gcc binary) but performs 
instruction scheduling to optimize for a certain CPU.

For CFLAGS in make.conf, I suggest using both, just in case a certain 
ebuild / makefile strips out -march, that way you still get the -mcpu 
optimizations.

From "info gcc": (I have gcc 3.4.3 installed)
`-mtune=CPU-TYPE'
     Tune to CPU-TYPE everything applicable about the generated code,
     except for the ABI and the set of available instructions.

`-march=CPU-TYPE'
     Generate instructions for the machine type CPU-TYPE.  The choices
     for CPU-TYPE are the same as for `-mtune'.  Moreover, specifying
     `-march=CPU-TYPE' implies `-mtune=CPU-TYPE'.

`-mcpu=CPU-TYPE'
     A deprecated synonym for `-mtune'.

(Looks like I had -mtune and -mcpu backwards.)

-- 
Boyd Stephen Smith Jr.
[EMAIL PROTECTED]
ICQ: 514984 YM/AIM: DaTwinkDaddy

--
[email protected] mailing list

Reply via email to