From: Christoph Hellwig <hch@infradead.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>,
linux-kbuild <linux-kbuild@vger.kernel.org>,
Dan Carpenter <dan.carpenter@oracle.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: sparse on scripts/kconfig/*.c
Date: Wed, 10 May 2017 00:28:33 -0700 [thread overview]
Message-ID: <20170510072833.GA4619@infradead.org> (raw)
In-Reply-To: <d799e97d-36de-67c8-3740-41482b279c0b@infradead.org>
On Tue, May 09, 2017 at 05:27:01PM -0700, Randy Dunlap wrote:
> On 05/09/17 13:17, Christoph Hellwig wrote:
> > On Tue, May 09, 2017 at 09:47:41AM -0700, Randy Dunlap wrote:
> >> Hi,
> >>
> >> I've been attempting to run sparse on the kconfig/ C files -- without success.
> >>
> >> The kbuild files don't try to support CHECK in scripts/kconfig/ AFAICT,
> >> and just running sparse on the C files has issues with not being able to
> >> find header files.
> >>
> >> Has anyone done this? Any clues about how to do it?
> >
> > As a wild guess from using sparse on various userspace projects:
> >
> > have you tried simply setting HOSTCC to cgcc?
>
> I don't quite see what that has to do with running sparse ($CHECK, not $HOSTCC).
cgcc is a gcc wrappr that calls sparse. I just trie quickly to patch
Makefile to run cgcc instead of gcc as HOSTCC an it seems to work:
HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c:117:5: warning: symbol 'insert_extra_deps' was not declared. Should it be static?
scripts/basic/fixdep.c:118:6: warning: symbol 'target' was not declared. Should it be static?
scripts/basic/fixdep.c:119:6: warning: symbol 'depfile' was not declared. Should it be static?
scripts/basic/fixdep.c:120:6: warning: symbol 'cmdline' was not declared. Should it be static?
But then I run into the known cgcc bug that it also calls sparse when
called for linking. Which reminds me that I need to go back and fix
that.
next prev parent reply other threads:[~2017-05-10 7:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 16:47 sparse on scripts/kconfig/*.c Randy Dunlap
2017-05-09 20:17 ` Christoph Hellwig
2017-05-10 0:27 ` Randy Dunlap
2017-05-10 7:28 ` Christoph Hellwig [this message]
2017-05-10 16:42 ` Randy Dunlap
2017-05-10 10:18 ` Dan Carpenter
2017-05-10 20:53 ` Dan Carpenter
2017-05-15 18:00 ` Randy Dunlap
2017-05-16 9:43 ` Dan Carpenter
2017-05-18 2:53 ` Randy Dunlap
2017-05-18 7:14 ` Dan Carpenter
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=20170510072833.GA4619@infradead.org \
--to=hch@infradead.org \
--cc=dan.carpenter@oracle.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.