Date: Mon, 23 Jan 2017 17:02:45 -0800 (PST) From: "Jeffrey Bouquet" <jbtakk@iherebuywisely.com> To: "Dimitry Andric" <dim@FreeBSD.org> Cc: "current" <current@freebsd.org> Subject: Re: command line environment and port to equal CURRENT clang? Message-ID: <E1cVpVV-0000Z4-EV@rmm6prod02.runbox.com> In-Reply-To: <4350E7F0-7CDD-4B82-902A-7C65D1C45B59@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 23 Jan 2017 20:18:18 +0100, Dimitry Andric <dim@FreeBSD.org> wrote: > On 23 Jan 2017, at 05:32, Jeffrey Bouquet <jbtakk@iherebuywisely.com> wrote: > > > > ... that may work in /usr/src/sbin for example? > > make clang=[/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.. > > The following appears to work: > > pkg install llvm39 > export CC=/usr/local/bin/clang39 > export CXX=/usr/local/bin/clang++39 > export CPP=/usr/local/bin/clang-cpp > cd /usr/src/sbin > make obj > make depend > make > > Note that this may pick up the wrong versions of libraries, so do not > be amazed if stuff blows up. > > 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. > > -Dimitry 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... 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 from the location that is being reinstalled, /fsck_ffs/ for example... with the latter as the $1 coded into the script, as the full path on the command line as a parameter. May need improvement... or more coding...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1cVpVV-0000Z4-EV>
