This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
howto configure so that CFLAGS='-g3 -O0' in gcc/Makefile?
- From: Larry Evans <cppljevans at suddenlink dot net>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 30 Jun 2009 10:18:05 -0500
- Subject: howto configure so that CFLAGS='-g3 -O0' in gcc/Makefile?
I'm trying to debug the compiler. I've gotten the gcc/Makefile to
compile the programs with '-g3 -O0' so that no function called are
rm'ed (the -O0 option) and so that I can see what macros to (the -g3
option). However, I had to trial-and-error edit the Makefile's to
change what I thought was the macros for compile options to do it. I
made several wrong guesses and had to make a different guess. I
finally got it to work; however, then I had a problem with generating
the docs because the compile said I didn't have 'makeinfo'. Well,
after installing makeinfo, I tried again with the same result. So, I
reconfigured with ../src/configure <options>; however, that erased all
the changes I made to get '-g3 -O0' into the compile options.
So... I read `man gcc` which claimed passing "CFLAGS=<options>" on the
command line is how to do this. Well, since <options> in my case was
'-g3 -O0' I had to pass it as CFLAGS='-g3 oO0'. IOW:
../src/configure CFLAGS='-g3 -O0'
However, even then, it didn't work for the gcc/Makefile. The top
level Makefile did have:
TOPLEVEL_CONFIGURE_ARGUMENTS=../src/configure CFLAGS='-g3 -O0'
...
CFLAGS_FOR_BUILD = -g3 -O0
However, the gcc/Makefile had:
CFLAGS = -g3
so, it looks like passing the CFLAGS to the submake truncated the
option after the first word. How do I avoid that?
TIA.
-Larry