freebsd-dev/share
Simon J. Gerraty 8561d0b2ec Simplify building host tools during DIRDEPS_BUILD
The whole point of the DIRDEPS_BUILD is to avoid tree walks
and basically build everything in a single pass.
We use the pseudo MACHINE "host" to represent the build host.

When the build host is not FreeBSD or is an older version of FreeBSD
it may need some help to build host-tools.

The directory tools/build does this - building libegacy.

local.sys.mk: create a pseudo option MK_host_egacy to indicate
if tools/build needs to be built for "host".

local.dirdeps.mk: set MK_host_egacy.host to ${MK_host_egacy}
all other DEP_MACHINES will get "no"

This allows a Makefile.depend.options in makefs etc to cause tools/build
to be built for host but only if necessary.

local.init.mk: use ISYSTEM as arg to -isystem so that it can be overridden.
The default remains ${STAGE_INCLUDEDIR}

src.init.mk: if MACHINE is host and we are not FreeBSD
set some MK_ flags the same as tools/build/mk/Makefile.boot.pre and
include src.init.${.MAKE.OS:tl}.mk if it exists.

For older versions of FreeBSD add libegacy when building PROGs for "host"

Also instead of -isystem${STAGE_INCLUDEDIR} we want
-I${STAGE_INCLUDEDIR} and -isystem/usr/include so we override ISYSTEM.
This means any headers we stage for "host" will take precedence over
system headers but #include_next will DTRT.

src.init.linux.mk: add
-I${SRCTOP}/tools/build/cross-build/include/linux
and generally deal with building host tools on Linux.
Eg. static linking does not work so set NO_SHARED= no
Override some HAVE_ flags.

src.sys.env.mk: on linux awk throws an warning about # in newvers.sh
just send stderr to /dev/null

Reviewed by:	jrtc27, arichardson
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D39744
2023-04-22 12:01:49 -07:00
..
colldef locales: fix installation of some collation files 2022-04-05 09:19:31 +02:00
colldef_unicode locales: Update to CLDR 41.0 and Unicode 14.0 2022-04-21 14:16:40 +02:00
ctypedef locales: Update to CLDR 41.0 and Unicode 14.0 2022-04-21 14:16:40 +02:00
dict Add "heard" to the dictionary 2022-08-09 12:03:24 -04:00
doc usd: Fix two typos 2022-04-02 15:16:02 +02:00
dtrace
examples vmrun.sh: Fix a typo in usage() 2023-04-20 14:45:13 +02:00
i18n Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
keys pkgbase: Add a FreeBSD-pkg-bootstrap package 2021-12-21 10:17:48 +01:00
man pf.conf.5: minor improvements 2023-04-21 10:08:02 +02:00
misc misc: remove swills from the portmgr graph 2023-04-11 23:20:18 +02:00
mk Simplify building host tools during DIRDEPS_BUILD 2023-04-22 12:01:49 -07:00
monetdef
monetdef_unicode locales: Update to CLDR 41.0 and Unicode 14.0 2022-04-21 14:16:40 +02:00
msgdef
msgdef_unicode locales: Update to CLDR 41.0 and Unicode 14.0 2022-04-21 14:16:40 +02:00
numericdef
numericdef_unicode locales: Update to CLDR 41.0 and Unicode 14.0 2022-04-21 14:16:40 +02:00
security
sendmail
skel
snmp
syscons Fix building host tools for host 2023-04-20 10:05:43 -07:00
tabset
termcap Fix mergemaster(8) breakage in the 6ad780caa. 2022-09-13 13:36:22 -07:00
tests
timedef
vt Correct typos: s/mit Aksenten/mit Akzenten 2022-09-14 11:53:44 +02:00
zoneinfo zoneinfo get zic from stage tree during DIRDEPS_BUILD 2023-04-20 21:00:32 -07:00
Makefile
Makefile.inc