linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: 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 09:42:26 -0700	[thread overview]
Message-ID: <21a25b58-2813-fd1d-0caa-266b8c7928cd@infradead.org> (raw)
In-Reply-To: <20170510072833.GA4619@infradead.org>

On 05/10/17 00:28, Christoph Hellwig wrote:
> 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

Agreed, that does it.

> 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.
> 

Thanks to both you and Dan for your help.

-- 
~Randy

  reply	other threads:[~2017-05-10 16:42 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
2017-05-10 16:42       ` Randy Dunlap [this message]
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=21a25b58-2813-fd1d-0caa-266b8c7928cd@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=dan.carpenter@oracle.com \
    --cc=hch@infradead.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).