[cfe-dev] [PATCH]: add support for FreeBSD

David Chisnall csdavec at swansea.ac.uk
Wed Oct 8 02:24:30 PDT 2008


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.

David



More information about the cfe-dev mailing list