This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: building gcc
On Thu, Oct 12, 2006 at 09:48:13AM +0200, Paolo Bonzini wrote:
>
> >In particular, I was just wondering how do compile GCC with debug. Not
> >how to debug it. I tried CFLAGS="-g" ./configure ..., but it still
> >compiled with gcc -O2 -g. Anyways, if anyone knows a helpful configure
> >trick that will help get me ready to debug gcc, please let me know.
>
> By default, GCC bootstraps itself, and after the first stage it always
> compiles itself with optimization enabled. So what you need is
>
> ./configure --enable-languages=c,c++ --disable-bootstrap
> make CFLAGS=-g
>
> (or equivalently, with CFLAGS=-g passed to configure).
Thanks Paolo,
Here's what I have so far.
../gcc/configure CFLAGS="-g" --enable-languages=c,c++ --enable-checking
--disable-bootstrap --prefix=$PWD/../prefixdir
Hopefully I'll be able to debug gcc nicely after this is built. Two
more questions that could save me a lot of time. Do you know where the
abstract syntax tree is stored in GCC after a file is parsed? Does GCC
still create an AST for C/C++, or does it go directly to GIMPLE?
Thanks for the help,
Bob Rossi