linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Triplett <josh@joshtriplett.org>
To: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Cc: Christopher Li <sparse@chrisli.org>,
	Sparse Mailing-list <linux-sparse@vger.kernel.org>
Subject: Re: [PATCH 2/5] Add support for the MinGW platform
Date: Tue, 21 May 2013 15:09:07 -0700	[thread overview]
Message-ID: <20130521220907.GE11463@jtriplet-mobl1> (raw)
In-Reply-To: <519BC816.3000304@ramsay1.demon.co.uk>

On Tue, May 21, 2013 at 08:16:38PM +0100, Ramsay Jones wrote:
> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>

I believe this will match both 32-bit and 64-bit MinGW, which seems
wrong.  Please do check the architecture strings for 32-bit and 64-bit
MinGW, and handle them separately.

> ---
>  cgcc | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/cgcc b/cgcc
> index c075e5f..e94a965 100755
> --- a/cgcc
> +++ b/cgcc
> @@ -226,6 +226,19 @@ sub add_specs {
>  	    ' -D__OpenBSD__=1';
>      } elsif ($spec eq 'unix') {
>  	return ' -Dunix=1 -D__unix=1 -D__unix__=1';
> +    } elsif ($spec =~ /^mingw/) {
> +	return ' -isystem /mingw/include' .
> +	    ' -D__MINGW32__=1' .
> +	    ' -D__MSVCRT__=1' .
> +	    ' -DWIN32=1 -D_WIN32=1 -D__WIN32=1 -D__WIN32__=1' .
> +	    ' -DWINNT=1 -D__WINNT=1 -D__WINNT__=1' .
> +	    " -D'_cdecl=__attribute__((__cdecl__))'" .
> +	    " -D'__cdecl=__attribute__((__cdecl__))'" .
> +	    " -D'_stdcall=__attribute__((__stdcall__))'" .
> +	    " -D'__stdcall=__attribute__((__stdcall__))'" .
> +	    " -D'_fastcall=__attribute__((__fastcall__))'" .
> +	    " -D'__fastcall=__attribute__((__fastcall__))'" .
> +	    " -D'__declspec(x)=__attribute__((x))'";
>      } elsif ( $spec =~ /^cygwin/) {
>  	return &add_specs ('unix') .
>  	    ' -D__CYGWIN__=1 -D__CYGWIN32__=1' .
> -- 
> 1.8.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-05-21 22:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-21 19:16 [PATCH 2/5] Add support for the MinGW platform Ramsay Jones
2013-05-21 22:09 ` Josh Triplett [this message]
2013-05-22 22:07   ` Ramsay Jones
2013-05-23  0:46     ` Josh Triplett
2013-05-25 19:37       ` Ramsay Jones

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=20130521220907.GE11463@jtriplet-mobl1 \
    --to=josh@joshtriplett.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=ramsay@ramsay1.demon.co.uk \
    --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;
as well as URLs for NNTP newsgroup(s).