[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Force -O0 flags, inhibit the default -O2 flags
From: |
Harald Dunkel |
Subject: |
Re: Force -O0 flags, inhibit the default -O2 flags |
Date: |
Thu, 29 Sep 2005 10:44:48 +0200 |
User-agent: |
Debian Thunderbird 1.0.2 (X11/20050402) |
Sander Niemeijer wrote:
>
> On woensdag, sep 28, 2005, at 17:04 Europe/Amsterdam, Harald Dunkel wrote:
>
>>> autoconf sets CFLAGS/CXXFLAGS to "reasonable defaults", that's all. If
>>> these defaults cause problems on your platforms, you have to override
>>> them.
>>>
>>
>> They cannot be called "defaults", if they get a higher priority
>> than the flags set in my Makefile.am. And I do not think that
>> setting CXXFLAGS='-g -O2' is a reasonable default, unless autoconf/
>> automake's assumption is that the user is supposed to debug the
>> developer's code.
>>
>> IMHO the priorities for setting build flags should be (highest
>> first):
>> 1) user
>> 2) developer
>> 3) autoconf/automake
>>
>> Surely it is OK that autoconf/automake can provide default build
>> flags somehow, but the flags set by the developer (e.g. AM_CXXFLAGS)
>> should get a higher priority, if they are set. And automake/autoconf
>> should provide just the bare minimum.
>
>
> As a developer you have full control over both AM_xxxFLAGS and xxxFLAGS
> variables. There is no ownership difference between these two types of
> flags from a developer/autoconf point of view. If you don't like the
> default for CXXFLAGS that autoconf choses then just replace it in the
> way Ralph explained:
>
> CXXFLAGS=${CXXFLAGS-"<your other settings>"}
>
Sorry, but you missed one point: Autconf/automake _should_ provide
default build flags, but with a lower priority then the flags set
by the developer. It should be possible for a developer to set in
his Makefile.am
AM_CXXFLAGS = -Wall
if he wants to extend Automake's default (-g -O2), or
AM_AM_CXXFLAGS =
AM_CXXFLAGS = -O3 -Wall
if he wants to ignore it. Just as an example.
Important is that control about the defaults provided by autoconf/
automake is moved to the developer, if he is interested. The user
should keep the final saying. I guess we all agree here.
Regards
Harri
- Re: Force -O0 flags, inhibit the default -O2 flags, (continued)
- Re: Force -O0 flags, inhibit the default -O2 flags, Ralf Corsepius, 2005/09/26
- Re: Force -O0 flags, inhibit the default -O2 flags, Harald Dunkel, 2005/09/27
- Re: Force -O0 flags, inhibit the default -O2 flags, Bob Friesenhahn, 2005/09/27
- Re: Force -O0 flags, inhibit the default -O2 flags, Brian, 2005/09/27
- Re: Force -O0 flags, inhibit the default -O2 flags, Bob Friesenhahn, 2005/09/27
- Re: Force -O0 flags, inhibit the default -O2 flags, Ralf Corsepius, 2005/09/28
- Re: Force -O0 flags, inhibit the default -O2 flags, Sander Niemeijer, 2005/09/28
- Re: Force -O0 flags, inhibit the default -O2 flags, Ralf Corsepius, 2005/09/28
- Re: Force -O0 flags, inhibit the default -O2 flags, Harald Dunkel, 2005/09/28
- Re: Force -O0 flags, inhibit the default -O2 flags, Sander Niemeijer, 2005/09/28
- Re: Force -O0 flags, inhibit the default -O2 flags,
Harald Dunkel <=
- Re: Force -O0 flags, inhibit the default -O2 flags, Ralf Corsepius, 2005/09/29
- Re: Force -O0 flags, inhibit the default -O2 flags, Bob Friesenhahn, 2005/09/29
- Re: Force -O0 flags, inhibit the default -O2 flags, Brian, 2005/09/29
- Re: Force -O0 flags, inhibit the default -O2 flags, Ralf Wildenhues, 2005/09/29
Re: Force -O0 flags, inhibit the default -O2 flags, Sander Niemeijer, 2005/09/26