]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add WITH_SYSTEM_LINKER, on by default, that avoids building lld when possible.
authorBryan Drewery <bdrewery@FreeBSD.org>
Wed, 20 Jun 2018 16:10:14 +0000 (16:10 +0000)
committerBryan Drewery <bdrewery@FreeBSD.org>
Wed, 20 Jun 2018 16:10:14 +0000 (16:10 +0000)
commita7d84af8903353c75350105366bed5c80182a66f
tree3e165d3bc4b30ad91db8f320e3d54eefe1c6c691
parenta883ed8c1da61eacb305818a4029623699f01534
Add WITH_SYSTEM_LINKER, on by default, that avoids building lld when possible.

This works similar to WITH_SYSTEM_COMPILER added in r300354.  It only
supports lld via WITH_LLD_BOOTSTRAP.

When both SYSTEM_COMPILER and SYSTEM_LINKER logic passes then libclang
will not build in cross-tools.  If either check fails though then
libclang is built.

The .info is reworked to notify when libclang will be built since if
either clang or lld needs to be rebuilt, but not the other, the
notification can lead to confusion on why "clang is building".

-fuse-ld= is not used with this method so some combinations of compiler
and linker are expected to fail.

A new 'make test-system-linker' target is added to see the logic results.

Makefile.inc1:
  CROSS_BINUTILS_PREFIX support had to be moved higher up so that XLD
  could be set and MK_LLD_BOOTSTRAP disabled before checking SYSTEM_LINKER
  logic as done with SYSTEM_COMPILER.  This also required moving where
  bsd.linker.mk was read since XLD needs to be set before parsing it.  This
  creates a situation where src.opts.mk can not test LINKER_FEATURES or
  add LLD_BOOTSTAP to BROKEN_OPTIONS.

Reviewed by: emaste (earlier version)
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D15894
Makefile
Makefile.inc1
share/mk/bsd.compiler.mk
share/mk/bsd.linker.mk
share/mk/src.opts.mk
tools/build/options/WITHOUT_SYSTEM_LINKER [new file with mode: 0644]
tools/build/options/WITH_SYSTEM_LINKER [new file with mode: 0644]