How to compile gcc with no optimization and "-gdwarf-2 -g3"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I want to build the whole gcc with "-gdwarf-2 -g3" and without any
optimization, so that I can debug gcc and see all the macros. I'm not
familiar with configure and make, so I tried to change all the CFLAGS
and others flags to "-gdwarf-2 -g3" in all the related files
(configure, configure.in, Makefile, Makefile.in, and Makefile.tpl). I
even changed the src/gcc/configure, src/gcc/Makefile.in and other
files. Basically, as long as I see something like "-g -O2", I change
it to "-gdwarf-2 -g3". And I configure it with

# ./configure --with-dwarf2
# make

But when it's compiling, I still see the -O2 optimization. And I tried

# ./configure --with-dwarf2
# make CFLAGS='-gdwarf-2 -g3' LIBCFLAGS='-gdwarf-2 -g3'
BOOT_CFLAGS='-gdwarf-2 -g3'

It's still the same. I can see the -O2 optimization. When I debug cc1,
I cannot see the macros. (I applied the patch to gdb so that it is
able to see macros)

How should I do to compile gcc with no optimization and "-gdwarf-2 -g3"?

Thanks.


Regards,
Timothy


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux