Re: WITH_LLD_IS_LD vs default WITHOUT_SYSTEM_COMPILER: What are the reasons?

2017-04-17 Thread Ed Maste
On 14 April 2017 at 20:16, Mark Millard  wrote:
> So it sounds like I can freely mix WITH_LLD_IS_LD and WITH_SYSTEM_COMPILER
> in any system-clang 4.0 based system build context, no actual problem
> cases, even if the existing system build used a binutils ld (for example).

Yes. WITH_LLD_IS_LD implying WITHOUT_SYSTEM_COMPILER was added because
LLD requires tblgen and libllvm, but they were originally built only
when needed for Clang. In cases where the SYSTEM_COMPILER default
logic determined that the host compiler was identical to the
to-be-built bootstrap compiler the build would skip building Clang,
tblgen, and libllvm. This was fixed by r316647 and the connection
between LLD_IS_LD and SYSTEM_COMPILER can be removed in due course.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


Re: WITH_LLD_IS_LD vs default WITHOUT_SYSTEM_COMPILER: What are the reasons?

2017-04-14 Thread Dimitry Andric
On 14 Apr 2017, at 22:40, Mark Millard  wrote:
> 
> man src.conf (from -r315914 ) reports:
> 
> WITH_LLD_IS_LD
> Set to use LLVM's LLD as the system linker, instead of GNU
> binutils ld.
> 
> This is a default setting on arm64/aarch64.  When set, these
> options are also in effect:
> 
> WITHOUT_SYSTEM_COMPILER (unless WITH_SYSTEM_COMPILER is set
> explicitly)
> 
> I'm curious about:
> 
> A) Why there is a bias to avoid the system compiler?

These are just the defaults, detected by the script that generates
src.conf.5.  The setting of MK_SYSTEM_COMPILER is actually dependent on
the host, so it's technically incorrect to have src.conf.5 mention that
it is off by default.


> and by contrast:
> 
> B) What sort of context justifies explicitly setting
>   WITH_SYSTEM_COMPILER when WITH_LLD_IS_LD is in use?

The settings are mostly orthogonal.  MK_SYSTEM_COMPILER was created to
avoid building a bootstrap compiler, if the system (host) compiler is
new enough.

At some point you could also image a MK_SYSTEM_LINKER setting, which
would avoid building the bootstrap linker, if the system linker is new
enough.

-Dimitry



signature.asc
Description: Message signed with OpenPGP