Re: Hi, Glade problem (another question)



Martin Craig wrote:


CFLAGS="whatever you want" <path>/configure [options]

Ralf

A bit OT, but could anyone explain to me why the -g option is enabled
by default in configure scripts. 
The autoconf default is -g -O2.

This is a compromise between the demands wrt. optimization and the
ability to be able to debug.

I didn't notice until recently, I was
left wondering why things I compiled from source had such large filesizes
and ran so slowly.
-g -O2 compiled binaries normally are not significantly slower than
-O2 compiled binaries (unless your machine starts swapping due to
the additional overhead in size). 

If you want to reduce the sizes, you can also strip the -g -O2
compiled binaries, which is almost equivalent to compiling libraries
with -O2 only (cf. man strip).

BTW: Standard automake configurations also support "make
install-strip", which will strip binaries during installation.

It seems crazy when no user is going to want it,
You will want it if chasing bugs (eg. analysing core dumps,
debugging).

Admitted, "Joe Average _User_" and "Joe Casual Installer" will
rarely need it, but even then it is occasionally useful, because it
enables support/hotline people to tell users to submit stack traces.

and
even when developing I've not yet needed to wheel out the debugger.
Then there still might be things to discover for you :)

Ralf




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