autoconf
[Top][All Lists]
Advanced

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

Re: configure sets CFLAGS or how to disable default CFLAGS='-g -O2' for


From: Ralf Corsepius
Subject: Re: configure sets CFLAGS or how to disable default CFLAGS='-g -O2' for gcc?
Date: Sun, 02 Apr 2006 18:00:53 +0200

On Sun, 2006-04-02 at 15:35 +0400, Peter Volkov wrote:
> Hello.
> 
> I'm using autoconf / automake to build my program. I'd like to set some
> default CFLAGS for my project with the following variable in my
> src/Makefile.am:
> 
> AM_CFLAGS = $(GLIB_CFLAGS) -O3 -Wall -ffast-math
Very bad idea. These are architecture- and compiler-specific,
non-portable flags. You therefore should not set them anywhere.

> Does anybody see what is the problem here?
You are not applying the autotools correctly.

>  I do not want to set CFLAGS
> environment variable forever...
You don't have to. Don't try to mess up with CFLAGS inside of
configure.ac or Makefile.am and leave choosing CFLAGS to the user.

Only the user knows what he wants and needs on his platform.

>  Any suggestions are welcome.
> 
> Another related question is what if I want to have different CFLAGS for
> release and for debugging. How should I do this?
Leave choosing CFLAGS to the user/installer.

Ralf







reply via email to

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