public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: Kyle Moffett <mrmacman_g4@mac.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>,
	torvalds@odsl.org, linux-kernel@vger.kernel.org,
	sam@ravnborg.org
Subject: Re: [PATCH] m32r: set CHECKFLAGS properly
Date: Tue, 27 Sep 2005 17:34:55 +0100	[thread overview]
Message-ID: <20050927163455.GT7992@ftp.linux.org.uk> (raw)
In-Reply-To: <CFD86C0A-0BE4-4D39-BAAE-F985D997AFD2@mac.com>

On Tue, Sep 27, 2005 at 11:13:44AM -0400, Kyle Moffett wrote:
> On Sep 27, 2005, at 03:10:25, Al Viro wrote:
> >You do realize that this way sparse will get neither?  It does not  
> >pick predefined symbols from gcc; thus the -D<your_arch>, etc.
> 
> How about sticking this in some global Makefile somewhere?  This will  
> give sparse the same list of defines that GCC uses:
> 
> CHECKFLAGS += $(shell echo | gcc -E - -dM | sed -re 's/^#define +([^ ] 
> +) +(.*)$/-D\1=\2/g')
> 
> Or you could do this:
> 
> include/linux/checkerdefines.h:
>         echo | gcc -E - -dM >$@

*Hell*, no.
	1) any use of cross-gcc is immediately b0rken
	2) anything like building i386 on amd64 (native toolchain, -m32
in arguments) is b0rken
	3) way, way, *WAY* too much spew.  gcc pre-defines shitloads of
stuff and some of that stuff very definitely should not be there for sparse.

IOW, it's not that simple.  You need final CC, CFLAGS and CPPFLAGS for
that.  Moreover, your variant won't do at all - change .config and you
might need to rebuild that file on biarch platforms (parisc and s390 at
the very least; ppc/ppc64 are also moving in that direction).

  reply	other threads:[~2005-09-27 16:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-26  5:18 [PATCH] m32r: set CHECKFLAGS properly Al Viro
2005-09-27  6:13 ` Hirokazu Takata
2005-09-27  7:10   ` Al Viro
2005-09-27 15:13     ` Kyle Moffett
2005-09-27 16:34       ` Al Viro [this message]
2005-09-27 17:31         ` Kyle Moffett
2005-09-27 17:55           ` Al Viro
2005-09-27 18:37             ` Kyle Moffett
2005-09-27 23:06               ` Al Viro
2005-09-27 20:02     ` Sam Ravnborg
2005-09-28  1:44       ` Al Viro
2005-09-27  6:23 ` Hirokazu Takata
2005-09-27 15:00   ` Linus Torvalds
2005-09-28  0:18     ` Al Viro
2005-09-28 10:04       ` Hirokazu Takata
2005-09-29  1:56         ` Al Viro
  -- strict thread matches above, loose matches on Subject: below --
2005-09-26  5:19 Al Viro

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=20050927163455.GT7992@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrmacman_g4@mac.com \
    --cc=sam@ravnborg.org \
    --cc=takata@linux-m32r.org \
    --cc=torvalds@odsl.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