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

From: Olivier Smedts <olivier_at_gid0.org>
Date: Wed, 4 May 2011 10:05:26 +0200
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."
Received on Wed May 04 2011 - 06:05:26 UTC

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