Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Oct 2017 18:15:23 +0100
From:      Sid <sid@bsdmail.com>
To:        "Stefan Esser" <se@freebsd.org>, freebsd-toolchain@freebsd.org
Subject:   Re: External LLVM toolchain not consistently locating c++ when compiling ports
Message-ID:  <trinity-b9fdc8f7-19c8-4365-9d60-58f151f144de-1509383723309@3c-app-mailcom-lxa05>
In-Reply-To: <cf1dc057-748b-7f13-2707-26e2b2c48a47@freebsd.org>
References:  <trinity-8d3dd393-342f-41d2-9781-0c9f7778b8d9-1509252017014@3c-app-mailcom-lxa12> <D285E708-6C34-43FC-9AD5-07215B6F04B4@dsl-only.net> <trinity-368804ee-950f-4283-a4db-21bf7a5870c8-1509261032035@3c-app-mailcom-lxa12> <3E01A2C6-0728-4295-90AE-76A7CE5955EF@dsl-only.net> <trinity-baf9b936-b652-4e9a-8b9f-8f611d080d6e-1509270389449@3c-app-mailcom-lxa14> <cf1dc057-748b-7f13-2707-26e2b2c48a47@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> Sent: Sunday, October 29, 2017 at 4:52 AM
> From: "Stefan Esser" <se@freebsd.org>
> To: Sid <sid@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?trinity-b9fdc8f7-19c8-4365-9d60-58f151f144de-1509383723309>