Subject: Re: How to build optimized with debug symbols

Re: How to build optimized with debug symbols

From: René Berber <rene.berber_at_gmail.com>
Date: Tue, 26 Jun 2012 12:57:25 -0500

On 6/26/2012 3:22 AM, Gregor Jasny wrote:

> I noticed that if I do a regular configure any CFLAGS related to
> generating debug output are scrubbed and replaced by ­g0. If I set
> ‹enable-debug the optimization level drops from 2 to 0.
>
> Is there a way to get ­g and ­O2?

./configure ... --enable-debug --enable-optimize=-O2

also

./configure ... --enable-debug CFLAGS='-O2 -ggdb3'

but in this last case, using CFLAGS, the actual debug option is overridden:

$ grep -E "^CFLAGS" Makefile
CFLAGS = -O2 -g ...

all other similar alternatives end, like you said, with the options in
CFLAGS being overridden.

-- 
René Berber
Received on 2012-06-26