[cfe-dev] Fwd: [PATCH]: add support for FreeBSD
clattner at apple.com
Fri Oct 10 08:17:16 PDT 2008
bringing back to the mailing list
Begin forwarded message:
> From: Chris Lattner <clattner at apple.com>
> Date: October 10, 2008 8:16:59 AM PDT
> To: Roman Divacky <rdivacky at freebsd.org>
> Subject: Re: [cfe-dev] [PATCH]: add support for FreeBSD
>>> I think that wrapping the configuration logic with #ifdef
>>> (or whatever is appropriate) would make sense. Follow the lead of
>>> similar darwin code.
>> thats not the problem :) the problem is that the given header file
>> does not have to be present on the machine we are building at.
>> it's an internal freebsd sources header file.
> Ah ok, that won't work then.
>>>> I might ignite a discussion on the fbsd mailing list if we can
>>>> the sources to export these two numbers to be exported in some
>>>> header file.
>>> On darwin, we autodetect using the "approved system interfaces".
>>> idea is that we want to be able to build a binary on darwin9 and
>>> it run find on darwin10. The idea is that we want the compiler to
>>> default to generating code for the current OS, but that requires
>>> detecting it (since the build may have been done on a different
>>> Make sense?
>> well.. I could parse output of "touch dummy_file.c ; gcc -E -dM
>> to get the two defines. there's no other way to get this on
>> runtime, is
>> this an acceptable solution?
> I'm confused about why that would be useful. Worst case you could
> parse the output of 'system("uname -a")' or something, no?
> Presumably uname is implemented in terms of some library/system
> call, and that could just be used instead?
More information about the cfe-dev