Linux SPARSE checker discussions
 help / color / mirror / Atom feed
From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: Christopher Li <sparse@chrisli.org>
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
	Sparse Mailing-list <linux-sparse@vger.kernel.org>
Subject: Re: make selfcheck
Date: Mon, 17 Jul 2017 19:19:30 +0100	[thread overview]
Message-ID: <39e3d856-fd32-8059-10bb-ad1367e7d7a9@ramsayjones.plus.com> (raw)
In-Reply-To: <d5ab8af1-6a09-9985-7de1-8ad639369795@ramsayjones.plus.com>



On 17/07/17 17:30, Ramsay Jones wrote:
> Hi Christopher,
> 
> The 'make selfcheck' target fails very quickly on cygwin, like so:
> 
>   $ make selfcheck
>        CHECK    target.c
>        CHECK    parse.c
>   /usr/include/sys/_default_fcntl.h:163:14: error: redefinition of struct flock
>   make: *** [Makefile:204: parse.sc] Error 1
>   $ 
> 
> This is caused by sparse not defining the '__CYGWIN__' macro, which
> would have been defined by cgcc, so the follwing fixes that:
> 
> -- >8 --
> diff --git a/Makefile b/Makefile
> index 4214e17..a3d3b9c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -201,7 +201,7 @@ c2xml.o c2xml.sc: CFLAGS += $(LIBXML_CFLAGS)
>  	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $<
>  
>  %.sc: %.c sparse
> -	$(QUIET_CHECK) ./sparse -c $(ALL_CFLAGS) $<
> +	$(QUIET_CHECK) ./cgcc -c $(ALL_CFLAGS) $<

This should have been './cgcc -no-compile', of course. :(

ATB,
Ramsay Jones

  reply	other threads:[~2017-07-17 18:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-17 16:30 make selfcheck Ramsay Jones
2017-07-17 18:19 ` Ramsay Jones [this message]
2017-07-17 19:16   ` Christopher Li
2017-07-17 19:28     ` Ramsay Jones
2017-07-18 12:53       ` Christopher Li
2017-07-18 16:52         ` Ramsay Jones
2017-07-18 17:04           ` Christopher Li

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=39e3d856-fd32-8059-10bb-ad1367e7d7a9@ramsayjones.plus.com \
    --to=ramsay@ramsayjones.plus.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=luc.vanoostenryck@gmail.com \
    --cc=sparse@chrisli.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