From: sashan <sashang@ihug.co.nz>
To: gcc@gcc.gnu.org
Subject: [Newb] Building with debug info and no optimization
Date: Sat, 20 Mar 2004 04:11:00 -0000 [thread overview]
Message-ID: <405B99BE.904@ihug.co.nz> (raw)
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
next reply other threads:[~2004-03-20 1:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-20 4:11 sashan [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=405B99BE.904@ihug.co.nz \
--to=sashang@ihug.co.nz \
--cc=gcc@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).