command line environment and port to equal CURRENT clang?

Dimitry Andric dim at FreeBSD.org
Tue Jan 24 14:37:54 UTC 2017


On 24 Jan 2017, at 02:02, Jeffrey Bouquet <jbtakk at iherebuywisely.com> wrote:
> 
> On Mon, 23 Jan 2017 20:18:18 +0100, Dimitry Andric <dim at FreeBSD.org> wrote:
> 
>> On 23 Jan 2017, at 05:32, Jeffrey Bouquet <jbtakk at 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...

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20170124/fe5584dc/attachment.sig>


More information about the freebsd-current mailing list