[cfe-dev] [PATCH]: add support for FreeBSD
Roman Divacky
rdivacky at freebsd.org
Wed Oct 8 03:04:05 PDT 2008
On Wed, Oct 08, 2008 at 10:24:30AM +0100, David Chisnall wrote:
> On 7 Oct 2008, at 17:00, Roman Divacky wrote:
>
> >hi
> >
> >the attached patch add support for FreeBSD to clang. if you
> >consider it ok, please commit :)
>
> >+ Define(Defs, "__FreeBSD__", "8");
> >+ Define(Defs, "__FreeBSD_cc_version", "800001");
>
> You are hard-coding the version to a FreeBSD release that currently
> corresponds to -CURRENT. This would be better done by calling uname()
> and setting it to the release field of the returned structure, or
> getting it from some other source if building a cross-compiler.
this number is hardcoded in gcc as well. It's not exported outside gcc
in any header file or something.
do you want me to check for existence of
/usr/src/gnu/usr.bin/cc/cc_tools/freebsd-native.h
and including it in a case it exists and otherwise putting there some dummy
number?
I might ignite a discussion on the fbsd mailing list if we can change
the sources to export these two numbers to be exported in some header file.
thnx! roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20081008/226aeac7/attachment.sig>
More information about the cfe-dev
mailing list