This is the mail archive of the gcc-help@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]

Build compiler for maximum debugging (-g -O0)


Hi,

http://gcc.gnu.org/install/build.html says:

> If you wish to use non-default GCC flags when compiling the stage2 and
> stage3 compilers, set BOOT_CFLAGS on the command line when doing
> `make'.

Using bash as my shell, I tried like this:
$ export BOOT_CFLAGS="-g"
$ make

but I seem to still have got a "-O2" in the compilation of the installed
compiler (on peeking around in gnat1 loaded into gdb, I often get
"value was optimized away".)

What is the correct way to get the installed compiler compiled with -g -O0
for fullest possible debugging ?

Thanks,

Oliver


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