From owner-freebsd-current@freebsd.org Tue Jan 24 14:37:53 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF92BCBE7CF for ; Tue, 24 Jan 2017 14:37:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id C94E1790 for ; Tue, 24 Jan 2017 14:37:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id C5938CBE7CE; Tue, 24 Jan 2017 14:37:53 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C534ACBE7CD for ; Tue, 24 Jan 2017 14:37:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8ECC378F for ; Tue, 24 Jan 2017 14:37:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from coleburn.avinity.tv (unknown [77.95.97.98]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id A079448953; Tue, 24 Jan 2017 15:37:48 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_30153947-07FA-4AE4-9024-94DBEF5F8A51"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: command line environment and port to equal CURRENT clang? From: Dimitry Andric In-Reply-To: Date: Tue, 24 Jan 2017 15:37:40 +0100 Cc: current Message-Id: <3DC82C84-DCD3-4278-BCE6-FF7E0087B23F@FreeBSD.org> References: To: jbtakk@iherebuywisely.com X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 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: Tue, 24 Jan 2017 14:37:54 -0000 --Apple-Mail=_30153947-07FA-4AE4-9024-94DBEF5F8A51 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 24 Jan 2017, at 02:02, Jeffrey Bouquet = wrote: >=20 > On Mon, 23 Jan 2017 20:18:18 +0100, Dimitry Andric = wrote: >=20 >> On 23 Jan 2017, at 05:32, Jeffrey Bouquet = wrote: >>>=20 >>> ... that may work in /usr/src/sbin for example? >>> make clang=3D[/usr/ports/lang/??]clang-foo clang+ depend; make; = # so that a buildworld is not needed? >>> or that would have to be created as a feature.. >>=20 >> The following appears to work: >>=20 >> pkg install llvm39 >> export CC=3D/usr/local/bin/clang39 >> export CXX=3D/usr/local/bin/clang++39 >> export CPP=3D/usr/local/bin/clang-cpp >> cd /usr/src/sbin >> make obj >> make depend >> make >>=20 >> Note that this may pick up the wrong versions of libraries, so do not >> be amazed if stuff blows up. >>=20 >> Also note that clang in base has a few patches which might not be in = the >> port, so you could also run into unexpected bugs in the port. >>=20 >> -Dimitry >=20 > Works! on 9 out of ten binaries at least. [1] Even so good from here = that someone > may wish to put it in /usr/src/UPDATING but with an additional = reference to how > to find the most likely llvm since that may change over time... Which would be very unwise, and lead to many problem reports, since buildworld is carefully building things in the right order, making sure the headers and libraries are of the matching versions for the binaries. E.g., people should only use this method if they know exactly what they are doing, and how it can blow up in various interesting ways. -Dimitry --Apple-Mail=_30153947-07FA-4AE4-9024-94DBEF5F8A51 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAliHZr8ACgkQsF6jCi4glqMquQCgkSpfFSe6qZ4ZGFeGRMlJC7hP lAYAn1kElMXXNqQ4Kdyp7O4zFfpd3aSu =kbrn -----END PGP SIGNATURE----- --Apple-Mail=_30153947-07FA-4AE4-9024-94DBEF5F8A51--