]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add WITH_SYSTEM_LINKER, on by default, that avoids building lld when possible.
authorbdrewery <bdrewery@FreeBSD.org>
Wed, 20 Jun 2018 16:10:14 +0000 (16:10 +0000)
committerbdrewery <bdrewery@FreeBSD.org>
Wed, 20 Jun 2018 16:10:14 +0000 (16:10 +0000)
commitdc29454920a7fbd598aaea2a8f42644e97123129
tree3e165d3bc4b30ad91db8f320e3d54eefe1c6c691
parent025d9a83867e9b3cdb8f48f88212d854a069fa48
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]