public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [Newb] Building with debug info and no optimization
@ 2004-03-20  4:11 sashan
  2004-03-20  4:29 ` Ian Lance Taylor
  2004-03-30  1:16 ` Jim Wilson
  0 siblings, 2 replies; 5+ messages in thread
From: sashan @ 2004-03-20  4:11 UTC (permalink / raw)
  To: gcc

Hi

I'm trying to build gcc with debug info only so I do this at the command 
prompt

export CFLAGS=-g

I re-run configure to build the make file:
gcc_current_build $ ../gcc_current/configure --program-suffix=-current
gcc_current_build $ make

but it gives the following error and recommends running 'make distclean' 
and deleting the config.cache file

configure: error: `CFLAGS' has changed since the previous run:
configure:   former value:  -g -O2
configure:   current value: -g
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and 
start over

gcc_current_build $ make distclean

So I do this (it deletes config.cache) and rerun configure and then make 
but the same error occurs.

So how do I tell make that I want the CFLAG to be -g? I've tried it with 
maintainer-mode enabled but it still optimizes it (-O2).

gcc_current_build $ ../gcc_current/configure --enable-maintainer-mode --program-suffix=current --enable-languages=c,c++

I basically just want to run a simple program through gcc and gdb so that I can see how it puts stuff together (like how it reads the file, divides it into tokens, builds RTL etc..) and I don't want optimizations to get in the way because they can cause gdb to skip lines (I think).

Thanks

-- 
sashan
http://www.cs.auckland.ac.nz/~sgov008



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-03-30  9:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-20  4:11 [Newb] Building with debug info and no optimization sashan
2004-03-20  4:29 ` Ian Lance Taylor
2004-03-30  1:16 ` Jim Wilson
2004-03-30  5:48   ` Mike Stump
2004-03-30 17:36     ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).