public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jim Wilson <wilson@specifixinc.com>
To: Nathanael Nerode <neroden@twcny.rr.com>
Cc: dj@redhat.com, gcc@gcc.gnu.org
Subject: Re: No Subject
Date: Wed, 31 Mar 2004 08:46:00 -0000	[thread overview]
Message-ID: <1080715134.1059.83.camel@leaf.tuliptree.org> (raw)
In-Reply-To: <20040331044106.GA3560@twcny.rr.com>

On Tue, 2004-03-30 at 20:41, Nathanael Nerode wrote:
> >I have a patch which tests for build!=host and disables WARN_CFLAGS,
> >but should fixinc *ever* be built with WARN_CFLAGS?
> No, it shouldn't.

I think this is an over simplistic answer.  You really should be looking
more closely at this issue if you want to comment on it.

With a native configure, BUILD_CFLAGS includes ALL_CFLAGS which includes
WARN_CFLAGS which includes GCC_WARN_CFLAGS which includes STRICT_WARN
and maybe also STRICT2_WARN.  So clearly, the warning flags are used
when building fixinc in some cases, and that should not be broken.

The real problem here seems to be much more subtle and complex, and it
has something to do with how the recursive make for the fixinc.sh rule
works, and how we set these variables when CC_FOR_BUILD != CC.  I
haven't tried doing a build, so I don't know what all is happening here.

In fact, looking at my log from a native build, I see that the warning
flags occur twice, e.g. -Wall appears twice on the gcc command line. 
The command lines for the generator files do not have this problem.  So
there is something funny going on here that I don't fully understand.

Oh, I see the problem.  The recursive make command sets CFLAGS to
include BUILD_CFLAGS.  Then the recursive make itself uses ALL_CFLAGS
which includes CFLAGS and WARN_CFLAGS, and thus the warning flags are
used twice.  More importantly, this causes us to use WARN_CFLAGS with
CC_FOR_BUILD when it shouldn't be.  I think this is the actual
underlying problem.  The recursive make command in the fixinc.sh rule
should perhaps be setting ALL_CFLAGS instead of CFLAGS because the
default .c.o rule uses ALL_CFLAGS.  I think this would solve DJ's
problem, and would eliminate the duplicate flags in the native case
too.  We would also have to fix the export rule to export ALL_CFLAGS
instead of CFLAGS.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com

       reply	other threads:[~2004-03-31  6:38 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040331044106.GA3560@twcny.rr.com>
2004-03-31  8:46 ` Jim Wilson [this message]
2004-04-01  8:29   ` Nathanael Nerode
2024-01-05 13:44 Re: No subject Peter0x44
2024-01-05 16:59 ` LIU Hao
2024-01-05 17:05   ` Peter0x44
  -- strict thread matches above, loose matches on Subject: below --
2009-12-29 19:40 no subject gcc
1999-04-30 23:15 No Subject 
1999-04-30 23:15 
1999-04-30 23:15 
1999-04-30 23:15 
1999-04-30 23:15 
1999-04-30 23:15 
1999-04-30 23:15 
1999-04-24 22:26 Jeffrey A Law
1999-04-30 23:15 ` Jeffrey A Law
1999-03-31 23:46 
1999-03-31 23:46 Gerald Pfeifer
1999-03-31 23:46 
1999-03-31 23:46 
1999-03-31 23:46 
1999-03-24  8:47 Leonardo Marques de Souza
1999-03-31 23:46 ` Leonardo Marques de Souza
1999-02-28 22:53 
1999-02-28 22:53 
1999-02-28 22:53 Jörn Rennecke
1999-02-28 22:53 
1999-02-28 22:53 
1999-02-28 22:53 Nathan Sidwell
1999-02-28 22:53 
1999-02-28 22:53 Carlo Wood
1999-02-28 22:53 John White
1999-02-28 22:53 
1999-02-02 16:11 killer
1999-02-28 22:53 ` killer
1999-01-29  6:41 Gerald Pfeifer
1998-12-17  8:43 NO SUBJECT Geert Bosch
1998-12-18 12:03 ` Dave Love
1998-12-17  8:32 tprince
1998-11-03 21:28 No Subject root
     [not found] <informant@earthlink.net>
1998-10-29  6:59 ` informant
1998-10-11 23:39 David
1998-10-04 18:52 John Breen
1998-10-03  8:00 David S. Miller
1998-09-26 15:59 John Breen
1998-09-25  8:01 John Breen
1998-09-23 12:43 John Breen
1998-09-18 21:46 David S. Miller
1998-09-18 17:29 David S. Miller
1998-09-18 22:10 ` Mark Mitchell
1998-09-18 22:10   ` David Edelsohn
1998-09-15  7:06 John Breen
1998-09-14 14:04 John Breen
1998-09-14 11:13 John Breen
1998-09-09 11:23 John Breen
1998-07-25  9:14 Vin Shelton
1998-07-10  8:14 Massimo CICCOTELLI
1998-07-10  6:04 Jonathan Williams
1998-06-30 14:46 Eric Sebastian Pogrelis
1998-06-25 15:59 system PRIVILEGED account
1998-06-10  4:03 m. capel
1998-06-03  0:17 65tr3w
1998-05-29 21:32 4n4b2ds
1998-05-23 22:47 Jeffrey A Law
1998-05-18  8:51 Richard Earnshaw
1998-05-16 10:14 Richard Earnshaw
1998-05-02 17:39 Steven Jones
1998-05-01 21:25 Peter  Garner
1998-05-01 21:25 Peter  Garner
1998-04-08  2:13 Yuan Xie
1998-04-05 21:29 Doug Semler
1998-04-06 17:35 ` David Edelsohn
1998-03-27 15:18 Ken Faiczak
1998-03-16 20:25 Oskar Enoksson
1998-03-10  7:16 Bruno Haible
1998-02-12 19:36 Satoshi HONDA
1998-02-10  3:34 Jeffrey A Law
1998-02-09 14:46 Jochen Kuepper
1998-02-09  3:22 Thomas Aigner
1998-01-08  6:05 Andrew Zabolotny
1997-12-08  9:35 ManfredMetzger
1997-12-05 13:11 Thomas Weise
1997-12-03  0:21 System Source
1997-10-23 13:54 Aaron Jackson
1997-10-07 11:41 Max Lawson
1997-09-26 20:48 Jeffrey A Law
1997-09-11 10:36 God
1997-09-11 10:36 Marc David Rovner
1997-09-06  9:41 Nick Burrett

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=1080715134.1059.83.camel@leaf.tuliptree.org \
    --to=wilson@specifixinc.com \
    --cc=dj@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=neroden@twcny.rr.com \
    /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).