Re: [Fresco-devel] Bug 223 - "*-config scripts have inappropriate --cxxflags output"

Nathaniel Smith <[email protected]> Mon, 31 Mar 2003 23:48:29 -0800
Newsgroups gmane.comp.video.fresco.devel
Message-ID <[email protected]>
On Tue, Apr 01, 2003 at 07:21:19PM +1200, sashang wrote:
> On Tue, 2003-04-01 at 02:28, Stefan Seefeld wrote:
> 
> > The culprit seems to be autoconf itself, or, more specifically, the
> > macro definitions that it uses internally. If it detects that the 
> > compiler is gcc, it sets itself CFLAGS to "-O2 -g".
> > 
> > We thus need a way to either prevent autoconf from setting these
> > variables, or simply revert it. I guess the difficulties are to do that
> > in a generic way without any sideeffects.
> > 
> > You may ask on the autoconf list whether there is a way to influence
> > this behavior.
> > 
> 
> The information I've gathered so far from the autoconf list is:
> 1) There is no way to change the flags using the configure.ac file
> 2) The only way to change the flags is by using environment variables 
>    or the command line (i.e. ./configure CXXFLAGS="some flags")
> 3) The flags -g (produce debugging info) and -O2 (optimization level) aren't
>    generally bad flags to use, unless they result in incorrect code.
> 
> I don't feel that this issue is a bug at all.

The bug is not that we compile with -g -O2.  The bug is that those
options end up in the *-config scripts, which forces any _other_
programs that _use_ Fresco to be compiled with -g -O2, which is not
something we should be enforcing on random other projects.

-- Nathaniel

-- 
"On arrival in my ward I was immediately served with lunch. `This is
what you ordered yesterday.' I pointed out that I had just arrived,
only to be told: `This is what your bed ordered.'"
  -- Letter to the Editor, The Times, September 2000

This email may be read aloud.