Solved Is it possible to buildworld without base compilers to use package compilers

By "leaving that as is from make.conf," do you mean deleting the line "LD= /usr/local/llvm60/bin/ld.lld" from the make.conf above?
Yes, and comment out LLD and BINUTILS in src.conf: in other words, let those build, no matter what the next options you take are.

I think the default LD for building is the one from base's binutils. Now that I think about it, it is better to write in make.conf, LD=/usr/bin/ld, just in case the COMPILER TYPE or other setting wants to override it.

I am yet to build Firefox, Palemoon and so on because of the wrong entries in the make.conf (asme as yours though). Kindly shed more light on your recommendation.


You can test in make.conf, if Clang from ports can be paired with the linker in base: LD=/usr/bin/ld. I think it can, but I'm not 100% sure.
Code:
# haven't tried this configuation
COMPILER_TYPE=  clang
CC=    /usr/local/bin/clang60 # ports, kernel and world
CXX=   /usr/local/bin/clang++60
CPP=   /usr/local/bin/clang-cpp60
LD=    /usr/bin/ld # ports
In make.conf, you can alternatively test if CXX, CLANG and CPP recommendations from packages will work with using LD for ports and XLD for base. LD sets it (so will be used for ports), and XLD overrides that for world and kernel. Don't use XCXX, XCLANG and XCPP, because these will override the world and kernel. I don't know if CROSS_BINUTILS_PREFIX=/var/empy is needed when you use XLD.

Leave the above make.conf code as it is, and optionally try adding this:
Code:
# This leaves LD to compile for ports, but overrides it for kernel and world
XLD= /usr/local/llvm60/bin/ld.lld # kernel and world override
CROSS_BINUTILS_PREFIX=/var/empty

I haven't tried using XLD with CXX, CLANG and CPP. Also, leave XCOMPILER_TYPE out, because that may override other settings. If it's your production system, that will take you a long time to get back online if it goes wrong, I suggest not removing CLANG, CXX and CPP from base.

I tried compiling rust, and it failed with an error that it couldn't find c++. That reminded me, that I had to create a softlink from c++ to clang++60. This suggests that building rust ignores settings in make.conf, or is simply not looking for the clang name. The latest rust package wasn't available.

* edit - in src.conf: WITHOUT_LLD_IS_LD=yes some architectures don't use Binutil's linker by default.
 
Last edited:
Back
Top