This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: building gcc



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).

Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]