Re: Building FreeBSD 9.0-CUR/amd64 with CLANG fails

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Wed, 04 May 2011 10:28:17 +0200
On 2011-05-04 09:17, O. Hartmann wrote:
...
> But when I tried to compile essential ports (essential to me), like
> x11-wm/windowmaker, mulitmedia/ffmpeg, for instance, I run into serious
> compiler/assembler error with LLVM/CLANG. I guess the ports- tree isn't
> mature for clang.

Several patches for this are available at:

http://rainbow-runner.nl/clang/patches/

but getting these into the ports tree itself is proving to be rather
slow, for some reason.

I see an ffmpeg patch in there, but no windowmaker one.  I will have a
look at what the problem is.

Note that if you run into problems with clang's integrated assembler,
you can always add "-no-integrated-as" to CFLAGS, then it will use GNU
as instead.  It will just be a bit slower.

On the other hand, if there is a way to actually correct the assembly,
or if it is really a bug in the integrated assembler, we would rather
fix it properly. :)


> So am I right in this thinking: leaving /etc/make.conf
> untouched in terms of not putting there the CLANG build construct and
> putting this instead into /etc/src.conf will only affect the OS' source
> tree to be build by clang and all ports are build by the antique
> system's gcc 4.2.1?

No, you really *must* put any CC= definitions in make.conf; if you put
them in src.conf, they will not be picked up early enough in some cases.

If you only want to build /usr/src with clang, and ports with gcc, it is
probably best to surround the CC=clang definitions with:

.if !empty(.CURDIR:M/usr/src*)
# ...clang definitions here...
.endif
Received on Wed May 04 2011 - 06:28:15 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:13 UTC