On Thu, Sep 14, 2017 at 10:03:27PM +0200, Uwe Kleine-König wrote: > --- > cgcc | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/cgcc b/cgcc > index a8d7b4f217fe..0ab54f943578 100755 > --- a/cgcc > +++ b/cgcc > @@ -235,6 +235,9 @@ sub add_specs { > } elsif ($spec eq 'linux') { > return &add_specs ('unix') . > ' -D__linux__=1 -D__linux=1 -Dlinux=linux'; > + } elsif ($spec eq 'gnu/kfreebsd') { > + return &add_specs ('unix') . > + ' -D__FreeBSD_kernel__=1' > } elsif ($spec eq 'openbsd') { > return &add_specs ('unix') . > ' -D__OpenBSD__=1'; Alternatively to adding support for all platforms by hand, why not use the output of cpp -dM < /dev/null to get the predefined macros? On my Linux amd64 box it gives quite a list, but I think this doesn't hurt, does it? Even cpp -m32 -dM < /dev/null works to give the i368 predefined macros (though I didn't find that in the cpp manual). Best regards Uwe
Attachment:
signature.asc
Description: PGP signature