[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] CFLAGS and USE Question



----- Original Message ----- 
From: "Seb James" <seb [at] hypercubesystems.co.uk>
To: <shef-lug [at] list.sheflug.org.uk>
Sent: Wednesday, July 07, 2004 10:48 AM
Subject: Re: [Sheflug] CFLAGS and USE Question


> On Wed, 2004-07-07 at 10:13, Marcus D. Hanwell wrote:
> > Brett Royles wrote:
> > >I agree , those flags seem good to me , I personally use -O6 , but
> > >thats just me!!!
> > >
> > I saw an article somewhere on the net about optimisation flags and how
> > anything above -O3 is aliased to -O3 anyway - with the relevant bit of
> > the gcc source shown to prove it! As far as I read there isn't anything
> > above -O3 but I could be wrong...
>
> Marcus is correct, nothing beyond -O3.
>
> Each of the -O flags turns on a set of optimizations; for example -O
> sets these:
>
>           -fdefer-pop
>           -fmerge-constants
>           -fthread-jumps
>           -floop-optimize
>           -fif-conversion
>           -fif-conversion2
>           -fdelayed-branch
>           -fguess-branch-probability
>           -fcprop-registers
>
> -O2 sets these, plus a bunch more.
>
> -O3 sets all those set by -O2 plus yet more . With -O3 you get a bit
> more speed, but quite a lot more binary, from flags like
> -finline-functions.
>
> -Os optimizes for size to reduce the space required for the resultant
> binary. It sets the -O2 flags, but missing a few that cause the binary
> to inflate.
>
> -O0 switches off optimization and is the default.
>
> Seb
> -- 
> Sebastian James - Director, Embedded Systems.
> Hypercube Systems Ltd 'Embedded Linux Solutions'
> 35 Walkley Crescent Road, Sheffield, S6 5BA
> Tel: 0845 4580277  Web: www.hypercubesystems.co.uk
>


Thanks chaps for your replies.

Should be starting the 'live' install tonight, all being well :)

Steve.

___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.