External LLVM toolchain not consistently locating c++ when compiling ports
Sid
sid at bsdmail.com
Mon Oct 30 17:15:30 UTC 2017
> Sent: Sunday, October 29, 2017 at 4:52 AM
> From: "Stefan Esser" <se at freebsd.org>
> To: Sid <sid at bsdmail.com>
> Subject: Re: External LLVM toolchain not consistently locating c++ when compiling ports
>
> Am 29.10.17 um 10:46 schrieb Sid:
> > Of course llvm50++ or llvm40++ as c++. The problem was naming. I've thought about using links before, but was worried to make too many changes like that. This time using llvm50, I've added two softlinks one in the directory of /usr/local/bin from c++ to clang++50, and in the directory of /usr/local/llvm50/bin/ from c++ to clang. This builds. It's not done yet, but I think this is it. I've added this to the bug https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223009 . It is about aarch64, but this problem applies to many architectures. Thank you.
>
> See BINARY_ALIAS in bsd.port.mk:
>
> https://svnweb.freebsd.org/ports?view=revision&revision=451772
>
> Regards, STefan
>
As Mr. Millard suggested, this goes into /etc/make.conf
BINARY_ALIAS=
I've tried BINARY_ALIAS= c++=clang++50
BINARY_ALIAS= /usr/local/bin/c++=/usr/local/bin/clang++50 /usr/local/llvm50/bin/c++=/usr/local/llvm50/bin/clang-5.0
and the second example without the first "/" before "usr"
There are two different targets from c++ in two directories (as in the examples; in /usr/local/llvm50/bin/, clang++ links to clang-5.0). I've tried this with the examples above, and it didn't work. There's more to BINARY_ALIAS. The soft links I've used for both directories, ln -s clang++50 c++, and ln -s clang-5.0 c++, have worked for compiling rust. It was mentioned in a bug report, but I'm emailing the maintainers of rust.
Thank you
More information about the freebsd-toolchain
mailing list