diff options
author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | 2007-05-22 19:12:42 +0100 |
---|---|---|
committer | Josh Triplett <josh@freedesktop.org> | 2007-05-23 10:34:50 -0700 |
commit | a0cdac0615d62ebb6aab69a8508e64edf831cbf7 (patch) | |
tree | f7d619531788681e7d2f75f39ee7c5f24ee133e0 /cgcc | |
parent | Add explanatory comment about direct use of __IDENT for preprocessor idents. (diff) | |
download | sparse-a0cdac0615d62ebb6aab69a8508e64edf831cbf7.tar.gz sparse-a0cdac0615d62ebb6aab69a8508e64edf831cbf7.tar.bz2 sparse-a0cdac0615d62ebb6aab69a8508e64edf831cbf7.zip |
Add cygwin support to cgcc
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Diffstat (limited to 'cgcc')
-rwxr-xr-x | cgcc | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -214,6 +214,16 @@ sub add_specs { ' -D__STDC__=1'; } elsif ($spec eq 'unix') { return ' -Dunix=1 -D__unix=1 -D__unix__=1'; + } elsif ( $spec =~ /^cygwin/) { + return &add_specs ('unix') . + ' -D__STDC__=1 -D__CYGWIN__=1 -D__CYGWIN32__=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 eq 'i86') { return (' -Di386=1 -D__i386=1 -D__i386__=1' . &integer_types (8, 16, 32, $m64 ? 64 : 32, 64) . |