freebsd-dev/share/mk
Bryan Drewery a7d84af890 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
2018-06-20 16:10:14 +00:00
..
atf.test.mk tests: require ksh93 in the Kyuafiles for all atf-ksh93 test programs 2018-02-24 15:13:20 +00:00
auto.obj.mk Ensure .OBJDIR has known value 2017-11-04 21:02:26 +00:00
bsd.arch.inc.mk
bsd.clang-analyze.mk Add some missed OBJS_SRCS_FILTER from r323637. 2017-11-10 08:00:09 +00:00
bsd.compiler.mk Add WITH_SYSTEM_LINKER, on by default, that avoids building lld when possible. 2018-06-20 16:10:14 +00:00
bsd.confs.mk DIRDEPS_BUILD: Fix '/' in group names creating a bad cookie. 2016-12-03 05:29:35 +00:00
bsd.cpu.mk Don't use TARGET_ARCH in this file, use MACHINE_ARCH instead. 2018-06-19 13:28:02 +00:00
bsd.crunchgen.mk rescue: Restore 'make depend' call to fix WITH_META_MODE after r334008. 2018-05-24 18:49:19 +00:00
bsd.dep.mk Created static libc PIC/no-SSP library to be used by rtld. 2018-05-09 10:28:24 +00:00
bsd.doc.mk Revert crap accidentally committed 2017-01-28 16:31:23 +00:00
bsd.dtb.mk Use known SRCTOP if possible to determine SYSDIR. 2018-04-12 20:48:17 +00:00
bsd.endian.mk Add full softfloat and hardfloat support for MIPS. 2016-10-31 15:33:58 +00:00
bsd.files.mk Enable directory creation with FILESDIR. 2018-05-09 13:44:54 +00:00
bsd.incs.mk Reapply r295227: Stop hiding link install commands. 2017-11-06 19:33:50 +00:00
bsd.info.mk Revert r301079. 2016-06-03 19:25:36 +00:00
bsd.init.mk Handle some .OBJDIR == .CURDIR cases. 2017-11-10 02:09:33 +00:00
bsd.kmod.mk Use known SRCTOP if possible to determine SYSDIR. 2018-04-12 20:48:17 +00:00
bsd.lib.mk Created static libc PIC/no-SSP library to be used by rtld. 2018-05-09 10:28:24 +00:00
bsd.libnames.mk Fix stale dependencies on libcasper libraries. 2018-05-15 23:46:49 +00:00
bsd.linker.mk Add WITH_SYSTEM_LINKER, on by default, that avoids building lld when possible. 2018-06-20 16:10:14 +00:00
bsd.links.mk Reapply r295227: Stop hiding link install commands. 2017-11-06 19:33:50 +00:00
bsd.man.mk Revert r301079. 2016-06-03 19:25:36 +00:00
bsd.mkopt.mk
bsd.nls.mk Move all of the directory path into the DIR part of the component and make the 2018-05-31 13:26:12 +00:00
bsd.obj.mk AUTO_OBJ: Don't create nested OBJDIRS with print-dir or make -n. 2017-12-06 21:00:41 +00:00
bsd.opts.mk Add MK_MAKE_CHECK_WITH_COVERAGE, reliant on MK_COVERAGE and MK_MAKE_CHECK_USE_SANDBOX 2017-10-31 06:16:40 +00:00
bsd.own.mk Enable directory creation with FILESDIR. 2018-05-09 13:44:54 +00:00
bsd.port.mk
bsd.port.options.mk
bsd.port.post.mk
bsd.port.pre.mk
bsd.port.subdir.mk
bsd.prog.mk Remove accidentally committed debug statement that induced the following 2018-05-05 18:39:54 +00:00
bsd.progs.mk Add some missed OBJS_SRCS_FILTER from r323637. 2017-11-10 08:00:09 +00:00
bsd.README Created static libc PIC/no-SSP library to be used by rtld. 2018-05-09 10:28:24 +00:00
bsd.snmpmod.mk Add a make target (smilint) for running smilint tool against BMIBS 2017-01-17 03:38:49 +00:00
bsd.subdir.mk Remove build system support for lint. 2017-11-17 18:16:46 +00:00
bsd.suffixes-posix.mk Extract suffix rules into bsd.suffixes[-posix].mk. 2016-10-12 00:42:46 +00:00
bsd.suffixes.mk Remove build system support for lint. 2017-11-17 18:16:46 +00:00
bsd.symver.mk
bsd.sys.mk Sort GCC warning flags and remove duplicates. 2018-06-04 16:21:18 +00:00
bsd.test.mk Sort the tests alphabetically before adding them to the Kyuafiles 2017-07-17 18:20:54 +00:00
dirdeps.mk Fix typo in comment. 2017-03-07 01:42:30 +00:00
gendirdeps.mk Update meta* from bmake-20161212 2016-12-23 02:57:00 +00:00
host-target.mk Import latest host-target.mk 1.11 from contrib/bmake/mk 2016-01-25 18:43:21 +00:00
install-new.mk DIRDEPS_BUILD: Install new Makefile.depend files atomically. 2015-12-04 03:17:07 +00:00
local.autodep.mk Revert r288966 as it is redundant and not right. 2015-12-03 22:39:42 +00:00
local.dirdeps.mk DIRDEPS_BUILD: Cleanup leftover WORLDTMP files. 2017-11-02 20:45:04 +00:00
local.gendirdeps.mk DIRDEPS_BUILD: libgcc now depends on MK_LLVM_LIBUNWIND 2017-10-31 00:03:36 +00:00
local.init.mk Define .MAKE.MODE to normal to avoid the need for :U later. 2016-01-19 22:41:44 +00:00
local.meta.sys.mk Add option UNIFIED_OBJDIR, on by default, which moves the default build OBJDIR. 2017-11-01 21:22:05 +00:00
local.sys.env.mk AUTO_OBJ: Hide 'creating dirs' output with 'make -s'. 2017-11-08 16:03:58 +00:00
local.sys.mk Follow-up r320061: Need to respect make.conf/env LIBDIR overrides. 2017-06-19 18:08:02 +00:00
Makefile Add bsd.cov.mk 2017-07-31 08:02:25 +00:00
meta2deps.py Fix syntax error in parse_path after r316952. 2017-05-08 20:44:21 +00:00
meta2deps.sh Update meta* from bmake-20161212 2016-12-23 02:57:00 +00:00
meta.autodep.mk Created static libc PIC/no-SSP library to be used by rtld. 2018-05-09 10:28:24 +00:00
meta.stage.mk Update dirdeps/meta bits from latest bmake. 2017-03-06 23:13:25 +00:00
meta.subdir.mk Import latest meta.subdir.mk 1.11 from contrib/bmake/mk 2016-01-25 18:34:15 +00:00
meta.sys.mk Avoid clobbering existing value of META_COOKIE_TOUCH 2016-09-13 22:17:25 +00:00
netbsd-tests.test.mk Fix LDADD/DPADD that should be LIBADD. 2015-12-04 03:17:47 +00:00
plain.test.mk
src.init.mk The 'buildenv' target can safely be ran with '+'. 2015-11-06 21:49:17 +00:00
src.libnames.mk Rework ofed build. 2018-06-16 15:05:05 +00:00
src.opts.mk Add WITH_SYSTEM_LINKER, on by default, that avoids building lld when possible. 2018-06-20 16:10:14 +00:00
src.sys.env.mk Ignore MAKEOBJDIRPREFIX from src-env.conf in sub-makes. 2018-03-03 23:23:01 +00:00
src.sys.mk Enable AUTO_OBJ by default if the OBJDIR is writable, only for in-tree builds. 2017-11-02 18:09:07 +00:00
src.sys.obj.mk Fix installation with read-only OBJDIR. 2018-02-24 01:33:17 +00:00
stage-install.sh
suite.test.mk MFhead@r325422 2017-11-05 04:08:00 +00:00
sys.dependfile.mk Merge bmake-20160307 2016-03-11 01:35:39 +00:00
sys.mk Allow overriding .MAKE.MAKEFILE_PREFERENCE. 2018-02-28 20:06:03 +00:00
tap.test.mk - Use LOCALBASE instead of KYUA_PREFIX for the --prefix to kyua(1) 2015-12-20 06:26:15 +00:00
version_gen.awk share and pc-sysinstall: adoption of SPDX licensing ID tags. 2017-11-27 15:28:26 +00:00