[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: Sun, 25 Sep 2005 08:03:27 +0200
User-agent: Debian Thunderbird 1.0.2 (X11/20050402)

Brian wrote:
> I have a need to force three files to not be optimized. I've followed the
> instructions in the manual for setting them up in their own library, and
> then using LIBADD to combine it with the original library.
> If I use AM_CXXFLAGS, the -O0 is superceded by a -O2. The same occurs if I
> use libx_la_CXXFLAGS. I am not allowed to override CXXFLAGS (and don't want
> to).
> <> sample (one or the other):
>    - libx_la_CXXFLAGS = -O0
>    - AM_CXXFLAGS = -O0

According to the documentation AM_CXXFLAGS is ignored for
building, if you set libx_la_CXXFLAGS. The problem is
that something is defining CXXFLAGS. The manual says that
this variable is reserved to be set by the user on the command
line (AFAIR). CXXFLAGS has a higher priority than both
AM_CXXFLAGS and libx_la_CXXFLAGS, i.e. whatever in autoconf/
automake is defining CXXFLAGS, it overrides the variables set
by the writer of I doubt that this is reasonable.

IMHO autoconf/automake should predefine AM_CXXFLAGS instead.
CXXFLAGS should be empty. (Actually I would be glad if
automake would not set any variable to '-g -O2'.)



reply via email to

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