freebsd-skq/tools
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
..
bsdbox Fix bsdbox builds after the recent libkvm requirement for libelf. 2015-12-13 20:31:36 +00:00
build Opportunistically skip building a cross-compiler with SYSTEM_COMPILER set. 2016-05-21 01:32:23 +00:00
bus_space Add an example program (in Python) for the AMD Am79c900 (ILACC) 2015-08-02 21:24:03 +00:00
debugscripts Assorted grammar, spelling and punctuation fixes. 2015-12-15 13:04:44 +00:00
diag Fix LDADD/DPADD that should be LIBADD. 2015-12-04 03:17:47 +00:00
ifnet * Handle ++x as well as x++ while converting. 2014-06-25 15:22:14 +00:00
kerneldoc Quote variable for architectures where we have more than 2016-04-16 20:41:13 +00:00
KSE NO_MAN= has been deprecated in favor of MAN= for some time, go ahead 2014-04-13 05:21:56 +00:00
LibraryReport
regression tools: minor spelling fixes. 2016-05-01 16:20:14 +00:00
sched Use print as a function for Python 3 [PEP 3105] 2015-11-19 00:01:52 +00:00
test Fix spelling and grammer in tools/test/README. 2015-10-28 15:00:21 +00:00
tools o Remove EoL whitespaces. 2016-05-19 10:39:04 +00:00
install.sh Use -n to ln(1) which is compatible with GNU ln(1). 2015-11-16 23:27:44 +00:00
make_libdeps.sh Avoid rs(1) hitting LINE_MAX with custom trees that have large dependencies. 2014-09-08 17:01:30 +00:00
README
tinder.sh Remove the old depend (mkdep) code and make FAST_DEPEND the one true way. 2016-03-30 23:50:23 +00:00

$FreeBSD$

This directory tree contains tools used for the maintenance and
testing of FreeBSD.  There is no toplevel Makefile structure since
these tools are not meant to be built as part of the standard system,
though there may be individual Makefiles in some of the subdirs.

Please read the README files in the subdirs for further information.