Default CFLAGS clobbering

Simon Hausmann hausmann at kde.org
Sat May 22 16:17:15 BST 2004


On Saturday 22 May 2004 16:48, Michael Nottebrock wrote:
> On Saturday 22 May 2004 16:34, Simon Hausmann wrote:
> > On Saturday 22 May 2004 15:57, Michael Nottebrock wrote:
> > > On Saturday 22 May 2004 15:23, Michael Nottebrock wrote:
> > > > It's still ugly to clobber the default case with optional flags,
> > > > though.
> > >
> > > ...because for example you still get unexpected behaviour if you set
> > > CFLAGS to "".
> >
> > Unexpected behaviour of what kind?
>
> You get -O2.

How unexpected ;-)

Really, the default for source tarballs should be what serves users best, and 
that's surely -O2. 

This is autoconf's default when using gcc (per c.m4) , so the whole pool of 
autoconf'ed software out there behaves that way. And KDE does so, too (it 
doesn't inherit that default through AC_PROG_CC though) .

If you want gcc's default then simply use -O0.

So the behaviour of is consistent for users (among a large pool of software) 
and packagers have all the flexibility they need if they want custom 
C(XX)FLAGS.

Simon




More information about the kde-core-devel mailing list