This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/28515] CFLAGS not propagated, resulting in object mismatch
- From: "skunk at iskunk dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jul 2006 19:09:01 -0000
- Subject: [Bug bootstrap/28515] CFLAGS not propagated, resulting in object mismatch
- References: <bug-28515-8784@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from skunk at iskunk dot org 2006-07-27 19:09 -------
(In reply to comment #1)
> You need to also set STAGE1_CFLAGS.
Wait... how does that work?
gcc/Makefile.in has these lines:
# STAGE1_CFLAGS is set by configure on some targets or passed from toplevel
# and sets the CFLAGS passed to stage1 of a bootstrap compilation.
[...]
CFLAGS = -g
STAGE1_CFLAGS = -g @stage1_cflags@
@stage1_cflags@ is set in the configure script (both the top-level one and the
one in gcc/), but the value incorporates no user-set variable; it's predicated
on just the build triplet. So there's no way to set STAGE1_CFLAGS without
manually overriding it in the makefile.
That aside, why does this variable have to be set separately? If you set CC and
CFLAGS, the assumption is that the two will always be used together. (What gets
passed to xgcc and later stages is a different matter, of course.) In theory
you could have a system compiler that behaves in a completely broken manner
without some special flag.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28515