autoconf
[Top][All Lists]
Advanced

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

CFLAGS default values


From: Matze Braun
Subject: CFLAGS default values
Date: Sat, 29 Nov 2003 17:47:04 +0100 (CET)

Hi,

I just had the problem in my configure script that autoconf adds -g -O2 
flags by default to the CFLAGS and CXXFLAGS variables. This is wrong 
behaviour IMO. I know this has been on this list several times. But I'd 
like to bring some additional arguments:

-It's really not an expected behaviour that the I get default CFLAGS when 
 I'm only searching for a C compiler. (I know it is documented that, but 
 you often forget about such subtle issues when reading docu). So the 
 usual result is that the user doesn't know where the -g -O2 flags come 
 from that he never mentioned in his configure.ac file.
 The C compiler neither uses -g nor -O2 by default. I assume this is for a 
 readon. Why should autoconf change default flags of my C compiler?
-autoconf is not inteligent enough to know what is really good for the 
 user: -g   adds additional size to the executables which might be wrong 
            in some cases like limited disk space. Naturally autoconf can't 
            decide whetere the extra space is worth the flag.
       -O2  is bad for certain debug builds as it increases compile time. 
            It also makes gcc optimizing out values, which makes it really 
            hard to debug some apps in gdb as I can't see the values of 
            some variables anymore.

It would be alot more apropriate to let the user choose it's default flags 
in the configure.ac file. (my personal packages have some --enable-debug 
and --enable-profile flags for example that all need different -g and -O 
settings).

Greetings,
        Matze

PS: I'm not subscribed to this list. So pleas CC me in your replies.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]