freebsd-skq/share/mk
bdrewery 07b39d8fb0 Opportunistically skip building a cross-compiler with SYSTEM_COMPILER set.
This will still build the compiler for the target but will not build the
bootstrap cross-compiler in the cross-tools phase.  Other toolchain
bootstrapping, such as elftoolchan and binutils, currently still occurs.

This will utilize the default CC (cc, /usr/bin/cc) as an external compiler.

This is planned to be on-by-default eventually.

This will utilize the __FreeBSD_cc_version compiler macro defined in the
source tree and compare it to CC's version.  If they match then the
cross-compiler is skipped.  If [X]CC is an external compiler (absolute
path) or WITHOUT_CROSS_COMPILER is already set, then this logic is skipped.
If the expected bootstrap compiler type no longer matches the found CC
compiler type (clang vs gcc), then the logic is skipped.  As an extra
safety check the version number is also compared from the compiler to
the tree version.

Clang:
  The macro FREEBSD_CC_VERSION is defined in:
    lib/clang/include/clang/Basic/Version.inc
  For clang -target will be used if TARGET_ARCH != MACHINE_ARCH.  This
  is from the current external toolchain logic.  There is currently an
  assumption that the host compiler can build the TARGET_ARCH.  This
  will usually be the case since we don't conditionalize target arch
  support in clang, but it will break when introducing new
  architectures.  This problem is mitigated by incrementing the version
  when adding new architectures.

GCC:
  The macro FBSD_CC_VER is defined in:
    gnu/usr.bin/cc/cc_tools/freebsd-native.h
  For GCC there is no simple -target support when TARGET_ARCH !=
  MACHINE_ARCH.  In this case the opportunistic skip is not done.  If we
  add proper support for this case in external toolchain logic then it
  will be fine to enable.

This relies on the macros being incremented whenever any change occurs
to these compilers that warrant rebuilding files.  It also should never
repeat earlier values.

Reviewed by:	brooks, bapt, imp
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D6357
2016-05-21 01:32:23 +00:00
..
atf.test.mk Remove unused atf.test.mk variables 2015-12-06 07:30:18 +00:00
auto.obj.mk Import latest auto.obj.mk 1.12 from contrib/bmake/mk. 2016-01-25 18:16:41 +00:00
bsd.arch.inc.mk
bsd.clang-analyze.mk Remove the old depend (mkdep) code and make FAST_DEPEND the one true way. 2016-03-30 23:50:23 +00:00
bsd.compiler.mk Fetch the __FreeBSD_cc_version as COMPILER_FREEBSD_VERSION. 2016-05-21 01:32:13 +00:00
bsd.confs.mk These group names may be used as a cookie, so replace any non-fs-safe characters. 2016-03-09 22:45:00 +00:00
bsd.cpu.mk Make armv6 hard float abi by default. Kill armv6hf. 2016-05-18 06:01:18 +00:00
bsd.crunchgen.mk DIRDEPS_BUILD: Fix some things building in MAKELEVEL0. 2016-02-26 22:13:48 +00:00
bsd.dep.mk WITH_META_MODE: Fix suffix transformation rules with guessed dependencies. 2016-05-21 01:31:48 +00:00
bsd.doc.mk MFH 2016-03-02 16:14:46 +00:00
bsd.dtb.mk Add infrastructure to build dtb files from dts files. 2015-01-08 18:28:06 +00:00
bsd.endian.mk Start support for the RISC-V 64-bit architecture developed by UC Berkeley. 2015-12-11 22:55:23 +00:00
bsd.files.mk Allow FILESGROUPS to be specified more than once by pruning out duplicates 2016-04-30 21:32:29 +00:00
bsd.incs.mk MFH 2016-03-10 21:16:01 +00:00
bsd.info.mk DIRDEPS_BUILD: Fix some things building in MAKELEVEL0. 2016-02-26 22:13:48 +00:00
bsd.init.mk Consolidate common beforebuild logic. 2016-02-16 02:09:48 +00:00
bsd.kmod.mk
bsd.lib.mk Deorbit ALLOW_SHARED_TEXTREL 2016-05-11 17:55:09 +00:00
bsd.libnames.mk Move casper library entries to proper places. 2016-03-03 06:22:51 +00:00
bsd.links.mk MFH 2016-02-08 12:16:01 +00:00
bsd.man.mk MFH 2016-03-02 16:14:46 +00:00
bsd.mkopt.mk Appy := to dependent opts once value determined. 2015-06-22 19:01:09 +00:00
bsd.nls.mk Don't let NLSLINKS contain itself. 2016-02-03 23:37:14 +00:00
bsd.obj.mk Consolidate common beforebuild logic. 2016-02-16 02:09:48 +00:00
bsd.opts.mk Remove the old depend (mkdep) code and make FAST_DEPEND the one true way. 2016-03-30 23:50:23 +00:00
bsd.own.mk Change the default installation directory for modules to /boot/modules. 2016-05-10 22:32:23 +00:00
bsd.port.mk Avoid sub-shell for realpath(1) for bmake by using its built-in :tA. 2015-09-03 17:01:58 +00:00
bsd.port.options.mk
bsd.port.post.mk
bsd.port.pre.mk
bsd.port.subdir.mk Avoid sub-shell for realpath(1) for bmake by using its built-in :tA. 2015-09-03 17:01:58 +00:00
bsd.prog.mk MFH 2016-04-04 23:55:32 +00:00
bsd.progs.mk Add DEBUG_FLAGS to PROG_VARS and STRIP to PROG_OVERRIDE_VARS 2016-04-14 22:22:03 +00:00
bsd.README Document SHLIB/SHLIB_CXX/NO_PIC. 2016-04-15 18:49:26 +00:00
bsd.snmpmod.mk Allow overriding FILESDIRs for snmp files. 2015-12-14 22:42:05 +00:00
bsd.stand.mk Use CFLAGS_NO_SIMD in preference to varying lists of -mno-xxxx flags. 2015-08-27 23:46:42 +00:00
bsd.subdir.mk share: minor spelling fixes. 2016-05-01 16:29:02 +00:00
bsd.symver.mk
bsd.sys.mk Follow-up r298219: Don't error with 'make all install'. 2016-04-21 16:12:55 +00:00
bsd.test.mk Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
dirdeps.mk Allow -f dirdeps.mk some/dir with no TARGET_MACHINE spec 2016-04-18 22:00:26 +00:00
gendirdeps.mk Update dirdeps.mk et al 2016-04-18 20:56:21 +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: Exclude secure/lib* libraries for host builds. 2016-05-04 03:13:48 +00:00
local.gendirdeps.mk DIRDEPS_BUILD: Exclude host tools for Makefile.depend.host as well. 2016-05-11 17:40:51 +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 WITH_DIRDEPS_BUILD: Fix forcing user to run bootstrap-tools. 2016-05-21 01:31:44 +00:00
local.sys.env.mk Move include of make.conf back to its old position. 2015-06-19 14:56:24 +00:00
local.sys.mk Follow-up r297835: Let the intented default cookie work. 2016-04-14 21:04:45 +00:00
Makefile Import bsd.clang-analyze.mk based on NetBSD's version. 2016-02-26 22:14:00 +00:00
meta2deps.py Update meta2deps to fix crash when using -X with M2D_EXCLUDES. 2016-04-18 21:05:19 +00:00
meta2deps.sh MFH 2016-03-02 23:53:08 +00:00
meta.autodep.mk Update dirdeps.mk et al 2016-04-18 20:56:21 +00:00
meta.stage.mk Update to bmake-20160315 2016-03-18 20:03:09 +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 Merge bmake-20160307 2016-03-11 01:35:39 +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 Fix over/under-linking in contrib/ofed. 2016-03-04 22:37:09 +00:00
src.opts.mk Opportunistically skip building a cross-compiler with SYSTEM_COMPILER set. 2016-05-21 01:32:23 +00:00
src.sys.env.mk WITH_META_MODE: Disable for 'make install' from top-level. 2016-05-21 01:31:54 +00:00
src.sys.mk Fix error when SRCCONF is empty. 2016-04-22 20:31:29 +00:00
stage-install.sh Add META_MODE support. 2015-06-13 19:20:56 +00:00
suite.test.mk Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
sys.dependfile.mk Merge bmake-20160307 2016-03-11 01:35:39 +00:00
sys.mk Make armv6 hard float abi by default. Kill armv6hf. 2016-05-18 06:01:18 +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