From owner-freebsd-current@FreeBSD.ORG Fri Sep 7 09:41:25 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76AD11065674 for ; Fri, 7 Sep 2012 09:41:25 +0000 (UTC) (envelope-from ohartman@mail.zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id 1F0A98FC12 for ; Fri, 7 Sep 2012 09:41:24 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) for freebsd-current@freebsd.org with esmtp (envelope-from ) id <1T9v3z-0006Kh-VE>; Fri, 07 Sep 2012 11:41:24 +0200 Received: from telesto.geoinf.fu-berlin.de ([130.133.86.198]) by inpost2.zedat.fu-berlin.de (Exim 4.69) for freebsd-current@freebsd.org with esmtpsa (envelope-from ) id <1T9v3z-0006hv-Qs>; Fri, 07 Sep 2012 11:41:23 +0200 Message-ID: <5049C13E.5010808@mail.zedat.fu-berlin.de> Date: Fri, 07 Sep 2012 11:41:18 +0200 From: "O. Hartmann" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120810 Thunderbird/14.0 MIME-Version: 1.0 To: Current FreeBSD X-Enigmail-Version: 1.4.3 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig19310305CB1D4343BC0E2C29" X-Originating-IP: 130.133.86.198 X-Mailman-Approved-At: Fri, 07 Sep 2012 11:14:55 +0000 Subject: FreeBSD 10.0-CURRENT: CLANG and port/clang weirdness! X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2012 09:41:25 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig19310305CB1D4343BC0E2C29 Content-Type: multipart/mixed; boundary="------------070608030709050508060704" This is a multi-part message in MIME format. --------------070608030709050508060704 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Building ports not explicitely enabling USE_GCC=3D4.6+ are considered using the system's LLVM/CLANG, which is clang 3.2 in our installation (FreeBSD 10.0-CURRENT #0 r240164), but since some ports require the special ports devel/llvm and lang/clang, LLVM 3.1 and clang 3.1 get installed and 3.1 is used instead the system's 3.2 whenever "clang", "clang++" is invoked. Following the WIKI at http://wiki.freebsd.org/BuildingFreeBSDWithClang introduces the usage of CC=3Dclang instead of CC=3D/usr/bin/clang CXX=3Dclang++ instead of CXX=3D/usr/bin/clang++ CPP=3Dclang-ccp instead of CPP=3D/usr/bin/clang-ccp Is this intended? Since I can not simply change the search patch - I need to have /usr/local/bin before /usr/bin, is there a way to avoid this confusion? Building software with makefiles or self-created ports always refer to the port's LLVM/CLANG, which is LLVM/CLANG 3.1 due to some reuqirements of several ports. I'm really confused. Am I missing some special knob here and fell into this pit by not-having-the-knowledge? Or is it really this messy? Well, I'd like to stay with the core's LLVM/CLANG, which is 3.2 whenever I simply issue "clang" or "clang++" (a pity that LLVM isn't completely installed). My /etc/make.conf portion looks this: ## ## CLANG ## =2Eif !defined(NO_CLANG) =2Eif !defined(CC) || ${CC} =3D=3D "cc" CC=3D /usr/bin/clang =2Eendif =2Eif !defined(CXX) || ${CXX} =3D=3D "c++" CXX=3D /usr/bin/clang++ =2Eendif =2Eif !defined(CPP) || ${CPP} =3D=3D "cpp" CPP=3D /usr/bin/clang-cpp =2Eendif ## Don't die on warnings #NO_WERROR=3D #WERROR=3D ## Don't forget this when using Jails! #NO_FSCHG=3D CFLAGS=3D -O3 -pipe # -fno-strict-aliasing COPTFLAGS=3D -O3 -pipe # #CXXFLAGS+=3D -stdlib=3Dlibc++ =2Eendif My /etc/src.conf is attached. If there is a clean way to distinguish, please help me. Regards, Oliver --------------070608030709050508060704 Content-Type: text/plain; charset=us-ascii; name="src.conf" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="src.conf" #.if !defined(NO_CLANG) #CC=3D /usr/bin/clang #CXX=3D /usr/bin/clang++ #CPP=3D /usr/bin/clang-cpp ## #CFLAGS+=3D -O3 -pipe # -fno-strict-aliasing #COPTFLAGS+=3D -O3 -pipe #CXXFLAGS+=3D -stdlib=3Dlibc++ # ## Don't die on warnings #NO_WERROR=3D #WERROR=3D # ## Don't forget this when using Jails! #NO_FSCHG=3D # need clang++ to be built #WITH_LIBCPLUSPLUS=3D YES # #WITH_CLANG_IS_CC=3D YES #.endif # WITH_CLANG=3D YES WITH_CLANG_EXTRAS=3D YES # WITH_LIBCPLUSPLUS=3D YES # WITH_BIND_LARGE_FILE=3D YES WITH_BIND_SIGCHASE=3D YES WITH_BIND_LIBS=3D YES # WITH_IDEA=3D YES WITH_HESIOD=3D YES # #WITH_ICONV=3D YES #WITH_BSD_GREP=3D YES WITH_BSD_SORT=3D YES # WITH_BSDCONFIG=3D YES # #WITH_OFED=3D YES # MALLOC_PRODUCTION=3D YES # PORTS_MODULES=3D emulators/virtualbox-ose-kmod x11/nvidia-driver --------------070608030709050508060704-- --------------enig19310305CB1D4343BC0E2C29 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJQScFDAAoJEOgBcD7A/5N81nAIAMUBZ7UROq96AZuDkB9NxPuA nwnGTm2lfV2sqSN0C2VXZVayzvgZ9ixWDyzq6huFYIdV5hd7M6I+9PSDK8piIWpA o2//FKilNbiqE/VHPqvyd02/52Jm3bMB/D+2Y4/kGigjLcsKbMnpXG6Wm7dcc59X +UEf/N0AYa7it+C0AYk7lQVG8nsjU7it3StcFLAQafQM9P1ePuIyzqCrNh8kIJ/d /wNmwTdYCWT+GWS6hYbr0/I9CHT8+FjPFLpHuJSy3f2JEH4JmmOuKpiFLQx+Ea8r 6De3DQD48yuRE73fE3kpkBcT9Jt+4uO3axW0o5GnHEnmyoT5so0NTeCwTQEQQEI= =mPUB -----END PGP SIGNATURE----- --------------enig19310305CB1D4343BC0E2C29--