From owner-freebsd-current@freebsd.org Tue Jan 24 01:02:49 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 9ED9CCBDA3D for ; Tue, 24 Jan 2017 01:02:49 +0000 (UTC) (envelope-from jbtakk@iherebuywisely.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 8B4AFF1F for ; Tue, 24 Jan 2017 01:02:49 +0000 (UTC) (envelope-from jbtakk@iherebuywisely.com) Received: by mailman.ysv.freebsd.org (Postfix) id 8A996CBDA3C; Tue, 24 Jan 2017 01:02:49 +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 88854CBDA3B for ; Tue, 24 Jan 2017 01:02:49 +0000 (UTC) (envelope-from jbtakk@iherebuywisely.com) Received: from aibo.runbox.com (aibo.runbox.com [91.220.196.211]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 488DEF1E; Tue, 24 Jan 2017 01:02:48 +0000 (UTC) (envelope-from jbtakk@iherebuywisely.com) Received: from [10.9.9.241] (helo=rmm6prod02.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1cVpVV-0002V3-FK; Tue, 24 Jan 2017 02:02:45 +0100 Received: from mail by rmm6prod02.runbox.com with local (Exim 4.76) (envelope-from ) id 1cVpVV-0000Z4-EV; Tue, 24 Jan 2017 02:02:45 +0100 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Received: from [Authenticated user (846156)] by runbox.com with http (RMM6); Tue, 24 Jan 2017 01:02:45 GMT From: "Jeffrey Bouquet" Reply-To: jbtakk@iherebuywisely.com To: "Dimitry Andric" CC: "current" Subject: Re: command line environment and port to equal CURRENT clang? Date: Mon, 23 Jan 2017 17:02:45 -0800 (PST) X-Mailer: RMM6 In-Reply-To: <4350E7F0-7CDD-4B82-902A-7C65D1C45B59@FreeBSD.org> Message-Id: 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 01:02:49 -0000 On Mon, 23 Jan 2017 20:18:18 +0100, Dimitry Andric wrote: > On 23 Jan 2017, at 05:32, Jeffrey Bouquet wro= te: > >=20 > > ... that may work in /usr/src/sbin for example? > > make clang=3D[/usr/ports/lang/??]clang-foo clang+ depend; make; # s= o 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 Works! on 9 out of ten binaries at least. [1] Even so good from here that s= omeone 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... Tested in /usr/src/bin, sbin, usr.sbin, usr.bin... [1] some build but do not install 'no such file or directory' so maybe did = not build... Made it into a .sh or .zsh that placed in another location and then run fro= m the location that is being reinstalled, /fsck_ffs/ for example... with the latt= er as the $1 coded into the script, as the full path on the command line as a parameter. May need improvement... or more coding...=