Trying to use clang/head and XCC
Garrett Cooper
yaneurabeya at gmail.com
Tue May 19 19:06:18 UTC 2015
> On May 19, 2015, at 09:53, Brooks Davis <brooks at freebsd.org> wrote:
>
>> On Tue, May 19, 2015 at 09:23:42AM -0700, Sean Bruno wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA512
>>
>> Following the External Tool Chain instructions on the wiki seem to not
>> work:
>> https://wiki.freebsd.org/ExternalToolchain
>>
>> I've gotten about this far:
>> https://people.freebsd.org/~sbruno/clang_head_build_log.txt
>
> You need to delete
> /home/sbruno/bsd/clang/build/bin/../lib/clang/3.7.0/include/std* and
> possibly also limits.h (it's broken for libstand on mips). If you use
> the ports/pkgs they do this.
>
>> Two items of note.
>> -- The bootstrap bits *completely* ignore XCC and build with the host
>> cc/c++
>
> That's expected. In principle clang could be used as the cross compiler
> since it's multi-target, but gcc could never work unless the host and
> target are the same.
>
>> -- No documentation of what CFLAGS are required to build and ignore
>> warnings.
>
> It will change with every clang/gcc release. In practice you will need
> to either fix the warnings wack-a-mole style or set NO_WERROR in the
> environment.
>
> -- Brooks
>
>>
>> Anyone out there have success doing this?
It'd be really nice if FreeBSD had HOST_CC, etc or something like that. It's unfortunate that I can't build 10.x on hosts with clang 3.6 installed because it fails to make bootstrap-tools (which needs to be built with the host compiler) because of -Werror ;(...
Thanks,
-NGie
More information about the freebsd-hackers
mailing list