public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug other/54692] [4.8 Regression] gcc doesn't build with "-Og -g" Date: Mon, 24 Sep 2012 15:04:00 -0000 [thread overview] Message-ID: <bug-54692-4-PIW7l7M8dR@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-54692-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54692 --- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-24 15:04:06 UTC --- (In reply to comment #8) > (In reply to comment #6) > > Guess > > *) CFLAGS=`echo $CFLAGS | sed "s/-O[[s0-9]]* *//" ` > > CXXFLAGS=`echo $CXXFLAGS | sed "s/-O[[s0-9]]* *//" ` ;; > > needs to be now > > -O[[s0-9gf]] instead (also for -Ofast). > > That said, I don't see how it is related to using STAGE1_CFLAGS (note missing > > XX). > > I wonder why we do the above at all? I suppose that's for removing > a configure default, but the toplevel passes STAGE1_CFLAGS as CFLAGS to > gcc configure (that's why we need to re-specify CFLAGS on the make > command-line?!). The intent of this is to make sure that the toplevel Makefile has whatever fancy CXXFLAGS/CFLAGS is needed for bootstrapping, and gcc/Makefile has corresponding CXXFLAGS/CFLAGS without -O2 or similar in it. Thus, if in --disable-bootstrap (or cross) gcc you do make in toplevel, you are building an optimized compiler, while cd gcc; make after you tweak stuff here and there will default to no optimization and thus hopefully better debugging experience. If/when -Og is better than -O0 for debug experience surely we can use there -Og instead. >From toplevel make just passes down CXXFLAGS/CFLAGS, so the values stored in gcc/Makefile are ignored.
next prev parent reply other threads:[~2012-09-24 15:04 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-09-24 13:20 [Bug other/54692] New: " markus at trippelsdorf dot de 2012-09-24 13:54 ` [Bug other/54692] " rguenth at gcc dot gnu.org 2012-09-24 14:07 ` markus at trippelsdorf dot de 2012-09-24 14:21 ` markus at trippelsdorf dot de 2012-09-24 14:32 ` markus at trippelsdorf dot de 2012-09-24 14:37 ` mpolacek at gcc dot gnu.org 2012-09-24 14:40 ` jakub at gcc dot gnu.org 2012-09-24 14:41 ` markus at trippelsdorf dot de 2012-09-24 14:50 ` rguenth at gcc dot gnu.org 2012-09-24 15:04 ` jakub at gcc dot gnu.org [this message] 2012-09-24 15:08 ` markus at trippelsdorf dot de 2012-09-24 18:55 ` [Bug other/54692] " steven at gcc dot gnu.org 2012-09-25 7:27 ` rguenth at gcc dot gnu.org 2012-09-25 12:28 ` jakub at gcc dot gnu.org 2012-09-25 12:50 ` jakub at gcc dot gnu.org
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=bug-54692-4-PIW7l7M8dR@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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: linkBe 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).