Mail Archives: djgpp/1999/05/12/02:59:46
On Tue, 11 May 1999, Guillermo Rodriguez Garcia wrote:
> I read somewhere that with gcc you can debug optimized programs, so I
> think -O2 shouldn't strip debug info.
The problem happens because the default value of CFLAGS in the
Makefile is "-g", which causes GCC to emit debug info. Setting CFLAGS
to -O2 doesn't strip the debug info, but GCC will not produce the
debug info because there's no -g in CFLAGS. "make CFLAGS=-O2"
overrides the value of CFLAGS in the Makefile, not adds to whatever
the Makefile says.
- Raw text -