Building FreeBSD 9.0-CUR/amd64 with CLANG fails

Olivier Smedts olivier at gid0.org
Wed May 4 08:05:27 UTC 2011


2011/5/4 O. Hartmann <ohartman at mail.zedat.fu-berlin.de>:
>
> 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. 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?

A lot of ports can't be build with clang. You can add something like
this to your /etc/make.conf (modifying paths accordingly) :
.if ${.CURDIR:M/usr/src*} ||
${.CURDIR:M*/usr/ports/emulators/virtualbox-ose-kmod*}
.if !defined(CC) || ${CC} == "cc"
CC=clang
.endif
.if !defined(CXX) || ${CXX} == "c++"
CXX=clang++
.endif
NO_WERROR=
WERROR=
.endif

That's what I use. Note the first if statement.

Cheers

-- 
Olivier Smedts                                                 _
                                        ASCII ribbon campaign ( )
e-mail: olivier at gid0.org        - against HTML email & vCards  X
www: http://www.gid0.org    - against proprietary attachments / \

  "Il y a seulement 10 sortes de gens dans le monde :
  ceux qui comprennent le binaire,
  et ceux qui ne le comprennent pas."


More information about the freebsd-current mailing list