[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to control whether "-g" flag is passed to compiler
From: |
Ralf Wildenhues |
Subject: |
Re: How to control whether "-g" flag is passed to compiler |
Date: |
Sun, 16 Dec 2007 10:00:47 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hello Oleg,
* Oleg V. Zhylin wrote on Sat, Dec 15, 2007 at 02:12:23AM CET:
>
> I've just noticed that "-g" compiler flag is passed when my package
> is building.
This is documented here:
<http://www.gnu.org/software/autoconf/manual/html_node/C-Compiler.html#C-Compiler>
Quoting from it:
| If using the GNU C compiler, set shell variable GCC to `yes'. If output
| variable CFLAGS was not already set, set it to -g -O2 for the GNU C compiler
| (-O2 on systems where GCC does not accept -g), or -g for other compilers.
> I didn't pass --enable-debug or anything like that to ./configure.
That switch is not predefined by Autoconf or Automake.
> I would like to make a "release" build with no "-g" specified, but I
> couldn't find any clue in autoconf and automake manuals.
Simply
./configure CFLAGS=-O2
(set CXXFLAGS etc. if you are using languages other than C as well).
Cheers,
Ralf