Message ID | 20170529003757.3848-1-luc.vanoostenryck@gmail.com (mailing list archive) |
---|---|
State | Mainlined, archived |
Headers | show |
On Sun, May 28, 2017 at 5:37 PM, Luc Van Oostenryck <luc.vanoostenryck@gmail.com> wrote: > cgcc knows about a few unix OSes but not yet about OSX/darwin. > > Fix this by adding the two needed defines to cgcc's specs. Looks fine to me. Chris -- 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
diff --git a/cgcc b/cgcc index c29fa587e..e4d4ff0bf 100755 --- a/cgcc +++ b/cgcc @@ -237,6 +237,9 @@ sub add_specs { } elsif ($spec eq 'openbsd') { return &add_specs ('unix') . ' -D__OpenBSD__=1'; + } elsif ($spec eq 'darwin') { + return + ' -D__APPLE__=1 -D__MACH__=1'; } elsif ($spec eq 'unix') { return ' -Dunix=1 -D__unix=1 -D__unix__=1'; } elsif ( $spec =~ /^cygwin/) {
cgcc knows about a few unix OSes but not yet about OSX/darwin. Fix this by adding the two needed defines to cgcc's specs. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> --- cgcc | 3 +++ 1 file changed, 3 insertions(+)