History log of /freebsd-10-stable/Makefile.inc1
Revision Date Author Comments
# 360542 01-May-2020 dim

MFC r360322:

Fix race between prebuilding libsbuf and libgeom

The latter needs the former, but with a multi-job build on a fast
machine, the race is sometimes lost. This leads to "ld: error: unable to
find library -lsbuf", when linking libgeom.so.

Submitted by: kevans


# 331031 15-Mar-2018 marius

MFC: r287805

Unconditionally build CTF tools in the bootstrap-tools phase of the build.

Stale CTF tools are a frequent source of DTrace issues, and they compile
quickly enough that the increase in build time is negligible.

Apart from what's described in the original commit message above, this
change also fixes building GENERIC kernels, i. e. kernel configurations
having "makeoptions WITH_CTF=1", when the host world has been built with
WITHOUT_CDDL.


# 326833 13-Dec-2017 cy

MFC r324248:

hen building multiple kernels using KERNCONF, non-existent KERNCONF
files will produce an error and buildkernel will fail. Previously missing
KERNCONF files silently failed giving no indication as to why, only to
subsequently discover during installkernel that the desired kernel was
never built in the first place.

This is a rework of r302865.

This is the correct patch.

Reviewed by: ngie (previous version, r302865)
Differential Revision: https://reviews.freebsd.org/D7167


# 324392 07-Oct-2017 ngie

MFC note: MK_LIBSOFT doesn't apply to ^/stable/10 .

MFC r322633,r324143:

r322633:

Honor NO_RTLD for rtld-elf, similar to what's done in libexec/Makefile, with
libexec/rtld-elf/... for MK_{LIB32,LIBSOFT}.

r324143:

Adjust r322633 to only apply to libexec/rtld-elf, and not usr.bin/ldd,
when running build32/install32

This unbreaks installing usr.bin/ldd as ldd32 when NO_RTLD is defined.

MFC with: r322633


# 324284 04-Oct-2017 ngie

MFC r322951:

Respect MK_TCSH with build-tools and native-xtools

This helps reduce the WORLDTMP footprint slightly.

Based on a patch I submitted 5 years ago to GNATS.

PR: 174051
Relnotes: yes (anyone who cross-builds with MK_TCSH=yes will run into
build failures if the host doesn't have tcsh(1))
Reminded by: Fabian Keil <fk@fabiankeil.de>


# 324283 04-Oct-2017 ngie

Revert r324132

I accidentally used the wrong commit message

Reported by: rgrimes


# 324132 30-Sep-2017 ngie

MFC r321845:

Standardize on SRCTOP instead of .CURDIR-relative paths


# 322094 05-Aug-2017 marius

MFC: r306375

Add a WITHOUT_DIALOG src.conf(5) knob.

It also turns off dependencies (bsdinstall, bsdconfig, dpv, tzsetup).


# 321825 31-Jul-2017 marius

Update stable/10 from 10.3-STABLE to 10.4-PRERELEASE as part of
the 10.4 release cycle, also belatedly marking the official start
of the code slush.

Set the default mdoc(7) version to 10.4, and update the clang(1)
TARGET_TRIPLE to reflect 10.4. While at it, add missing FreeBSD
major versions to mdoc(7).

Approved by: re (implicit)


# 320691 05-Jul-2017 bdrewery

MFC r289861:

native-xtools: Replace common path with NXBDESTDIR.


# 316787 13-Apr-2017 bdrewery

MFC r315691:

Rename _cc to _gcc to be more clear.


# 315731 22-Mar-2017 bdrewery

MFC r314709,r314790,r314794:

r314709:
Fix bootstrapping mtree after r313404 for older systems.
r314790:
Added comments for why nmtree/libmd are bootstrapped.
r314794:
Fix bootstrapping libmd on older systems after r314709.

PR: 217673


# 314236 25-Feb-2017 ngie

MFC r313924,r313925:

r313924:

Quote path to doxygen/kyua in test(1) -x check

This is a basic stopgap against ${LOCALBASE} containing spaces in it

r313925:

Include ${LOCALBASE}/bin in $PATH when running "make checkworld"

Some of the tests in devel/atf // devel/kyua rely on the tools being in $PATH,
which means that the tests fail when run via "make checkworld" because $PATH
is restricted to exclude directory elements like "${LOCALBASE}/bin".


# 313790 16-Feb-2017 ngie

MFC r285119,r292502,r295380:

r285119 (by jmmv):

Add support for TEST_METADATA

Allow Makefiles to define generic metadata settings that apply to all test
programs defined by a Makefile. The generic TEST_METADATA variable extends
the per-test program settings already supported via TEST_METADATA.<program>.

This feature will be useful to easily apply some settings to all programs
in a directory. In particular, Kyua 0.12 will support parallel execution
of test programs and a bunch of them will need to be tagged as is_exclusive
to indicate that they cannot be run in parallel with anything else due to
their side-effects. It will be reasonable to set this setting on whole
directories.

r292502:

Always expose LOCALBASE, not just when CROSS_TOOLCHAIN is defined

Instead of using which(1) to look for doxygen, look for it in <LOCALBASE>/bin .
$PATH gets mangled by make buildenv, etc so it's better to just be explicit
about the path if someone uses that for instance.

r295380:

Simplify running the FreeBSD test suite

Replace `make regress` (legacy test make target) and `make test` (incomplete
test make target added with the FreeBSD test suite) with make check as it's
consistent with other open source projects.

`make check` defaults to running tests from `.OBJDIR`, but can be overridden
with the `CHECKDIR` variable.

Add `make checkworld` target to simplify running the FreeBSD test suite from
`TESTSBASE` (i.e. the top-level tests directory), similar to buildworld.

Document `make check` and `make checkworld` in build(7).

Other minor changes:

- Rename intermediate file (`Kyuafile.auto`) to `Kyuafile` to simplify
`make check`.
- Remove terse warnings attached to `beforetest`/`aftertest`.
- Add kyua binary check to check target in suite.test.mk; error out if it's
not found

The MFC is [partly] contingent on other build related changes being MFCed.

X-MFC to: stable/10
Relnotes: yes


# 313522 10-Feb-2017 ngie

MFC r286536:

This unbreaks "make installworld" for me on ^/stable/10

r286536 (by imp):

cmp and cp are used by the kerberos install, so need to be imclided in
ITOOLS. They are tiny enough that I'm not making conditional: the
minuscule savings in disk space isn't worth the obfuscation of
Makefile.inc1.


# 312269 16-Jan-2017 ngie

MFC r311140:

Only bake krb5_config.h support in to ssh(3), etc if both MK_GSSAPI and
MK_KERBEROS_SUPPORT != no

This fixes the odd case where someone specified MK_GSSAPI=no and
MK_KERBEROS_SUPPORT=yes (which admittedly, probably doesn't make sense,
but the build system doesn't prevent this case today, and it didn't when
I filed the bug back in 2011 either).

PR: 159745


# 309605 06-Dec-2016 dim

MFC r309332:

Cleanup old debug dirs in delete-old-dirs target

Any .debug or .symbols files under /usr/lib/debug which correspond to
OLD_FILES entries in ObsoleteFiles.inc are also automatically cleaned up
by the delete-old target. Make this also apply to any OLD_DIRS entries.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D8683


# 305759 12-Sep-2016 lwhsu

MFC r303935

Only remove empty directories before packaging.

This preserves files are intentionally empty, most of them are in tests.txz

Reviewed by: bdrewery


# 299079 04-May-2016 glebius

Merge r299077, which provides ability to override NO_INSTALLEXTRAKERNELS.

Override NO_INSTALLEXTRAKERNELS for the release build. Historically, in
the stable/10 branch the regular 'installkernel' target DID NOT install
extra kernels, while the release build DID. This change finally restores
POLA, I hope.

Reported by: Fedor <f att.org.ru>
Reviewed by: gjb


# 298429 21-Apr-2016 emaste

Fix compiled-in keymap generation for sc/vt consoles

In r298297 kbdcontrol's -P <path> option was MFC'd to stable/10, which
enables this change for a simplified compile-time default keymap build
process.

PR: 193865
MFC of: r296899, r296914, r297363, r298402


# 294588 22-Jan-2016 glebius

Make it possible to override NO_INSTALLEXTRAKERNELS.

Submitted by: ngie


# 293699 11-Jan-2016 bdrewery

MFC r293440:

Fix upgrading from OSVERSION 1000002-1000032 after r288829.


# 293391 07-Jan-2016 glebius

Merge r293282 from head:
Provide knob NO_INSTALLEXTRAKERNELS. If defined, extra kernels in KERNCONF
won't be installed, only the first one would.

Turn NO_INSTALLEXTRAKERNELS=yes on stable/10 to preserve original
behaviour of not installing additional kernels built.

Reported & tested by: Trond Endrestøl <Trond.Endrestol fagskolen.gjovik.no>
Reported & tested by: dhw


# 293376 07-Jan-2016 bdrewery

MFC r291611:

Add NO_INSTALLKERNEL to undo the assumption that the first KERNCONF will be
installed as "kernel". This is relevant for packaging of the kernel when not
wanting a default "kernel.txz".


# 293375 07-Jan-2016 bdrewery

MFC r291610:

Allow storing package(world|kernel) tarballs into a different location at
PACKAGEDIR.


# 293189 05-Jan-2016 glebius

Merge from head r287357-287358,287400:
Not only build with buildworld, but also install with installworld all
alternative kernels.


# 292940 30-Dec-2015 gjb

MFC r278449, r278926:

r278449:
Enable multi-threaded xz(1) compression for release install
media.

r278926 (rpaulo):
Use xz(1) via pipe when compressing the release distribution
tarballs.

Tested on: stable/10@r292855
Sponsored by: The FreeBSD Foundation


# 292588 22-Dec-2015 delphij

MFC: xz 5.2.2.

Relnotes: yes


# 292339 16-Dec-2015 emaste

MFC r282821: Remove redundant csu subdir logic

The appropriate subdirectories are handled by lib/csu/Makefile. There's
no need to duplicate this logic in Makefile.inc1 and lib/Makefile.

Sponsored by: The FreeBSD Foundation


# 291976 07-Dec-2015 bdrewery

MFC r291605:

Fix errors being ignored in many phases of the build since the bmake
integration.


# 291812 04-Dec-2015 bdrewery

MFC r291026:

Remove unneeded libmd from bootstrap-tools (reverting r246784).


# 291807 04-Dec-2015 bdrewery

MFC r290812:

Avoid setting schg in the objtree for lib32 build.


# 291777 04-Dec-2015 bdrewery

MFC r289360,r289361,r289378,r289430,r289605,r289676:

r289360:
Add temporary workaround for .MAKE being applied to _worldtmp, since
r251750.
r289361:
Consider top-level targets to be .PHONY as bmake won't build them otherwise
if a file with the same name is found in the directory.
r289378:
Mark sub-make targets as .MAKE and .PHONY to handle -n and always-build
properly.
r289430:
Remove .MAKE from targets that do more than just run sub-makes, such as
calling rm or mtree.
r289605:
Add missing .PHONY for parallel subdir target.
r289676:
Add some missing '+', .MAKE, and .PHONY modifiers.


# 290017 26-Oct-2015 bdrewery

MFC r289407:

Fix delete-old and check-old-files not removing old debug symbols.


# 289813 23-Oct-2015 avg

MFC r288339: remove unused sgsmsg utility (originally imported from opensolaris)


# 289145 11-Oct-2015 ian

MFC 288829

The latest version of lex requires the latest m4 to build, add a dependency
when running the build-tools stage.

The requirement is due to the -P flag used when running m4 from usr.bin/lex
Makefile to generate skel.c. With the old m4 that fails and the failure is
ignored, resulting in an empty(-ish) skel.c, which leads to later build
failures when the misconfigured new lex tool is run.

This enables building -current (and 10-stable after MFC) on a stable-8
system again.


# 289145 11-Oct-2015 ian

MFC 288829

The latest version of lex requires the latest m4 to build, add a dependency
when running the build-tools stage.

The requirement is due to the -P flag used when running m4 from usr.bin/lex
Makefile to generate skel.c. With the old m4 that fails and the failure is
ignored, resulting in an empty(-ish) skel.c, which leads to later build
failures when the misconfigured new lex tool is run.

This enables building -current (and 10-stable after MFC) on a stable-8
system again.


# 286746 13-Aug-2015 gjb

MFC r262670 (marcel):
Use ${MAKE} so that we always use the same version/implementation
of make(1).

PR: 202277
Submitted by: John Hein
Sponsored by: The FreeBSD Foundation


# 286673 12-Aug-2015 imp

Direct commit

When compiling on -current from r284356 to r285986, the host's
crunchgen can't be used because builds of rescue break when STRIP= was
used to prevent stripping of binaries. Direct commit because -current
code is different. Building 10 on current is common enough to warrnat
a safety belt since this has been broken for two months. The offending
change was never in stable/10.


# 282848 13-May-2015 ngie

MFC r281618,r281823:

r281618:

Defeat race with MK_KERBEROS == yes introduced with bootstrap-tools
parallelization work done in r279197

- kerberos5/lib/libroken requires kerberos5/tools/make-roken to build
- kerberos5/tools/asn1_compile, kerberos5/tools/slc, and usr.bin/compile_et
require kerberos5/lib/libroken and kerberos5/lib/libvers

This race is incredibly evident when cross-building sparc64 on
ref10-amd64.freebsd.org

Pointyhat to: ngie

r281823:

Serialize all of _kerberos5_bootstrap_tools to avoid build failures involving
make bootstrap-tools

On the plus side, this also greatly reduces complexity

Pointyhat to: ngie
Reported by: Willem Jan Withagen <wjw@digiware.nl>


# 281836 21-Apr-2015 garga

MFC r270155, r274490, r274593, r274607

Add native-xtools target to stable/10

Differential Revision: https://reviews.freebsd.org/D2044
Reviewed by: sbruno@
Approved by: sbruno@
Sponsored by: Netgate


# 281382 10-Apr-2015 dim

MFC r272814 (by bapt):

Add OBJCOPY to the list of external tools

MFC r272815 (by bapt):

Fix typo

This should fix the build troubles some people have been seeing after
the MFC of r280980 (in r281289). Sorry for the breakage.


# 281289 09-Apr-2015 dim

MFC r280980:

Ensure the cross assembler, linker and objcopy are used for the build32
stage, just like for the regular world stage.

Reviewed by: rodrigc, imp, bapt, emaste
Differential Revision: https://reviews.freebsd.org/D2187


# 281110 05-Apr-2015 dim

Ensure yacc is built during bootstrap-tools for __FreeBSD_version
1001506 and earlier, since some of the ACPI tools now reach yacc's old
maximum table limit. This should fix the Jenkins buildbot, which
apparently runs 10.1-RELEASE.


# 281056 03-Apr-2015 bdrewery

MFC r280179,r280180:

r280179:
Add LIB_CXX so that C++ libraries will use CXX to link.

This adds some extra dependencies directly to Makefile.inc1 as
atf is still a prebuild library in stable/10. If r273449 is MFCd
these can come out.

r280180:
Document LIB and LIB_CXX.


# 280356 22-Mar-2015 ngie

Defeat race with texinfo tools built with make bootstrap-tools

This is a direct commit to stable/10 because texinfo has been removed from
head


# 280341 22-Mar-2015 ngie

Remove dependency between usr.bin/m4 and lib/libohash

libohash doesn't exist on stable/10 (only head)

Not sure why my make buildworld didn't catch any issues

This is a direct commit to stable/10 as a followup to r280340


# 280340 22-Mar-2015 ngie

MFC r279197,r279198:

r279197:

Parallelize building bootstrap-tools

Differential Revision: https://reviews.freebsd.org/D1901
Reviewed by: ian
No serious objections from: imp

r279198:

Fill in missing dependencies for dtrace related tools so the bootstrap-tools
compiles properly on older hosts

Pointyhat to: me


# 278569 11-Feb-2015 ngie

MFC r278182:

r278182:

Conditionalize building radius support into libpam, ppp, etc via
MK_RADIUS_SUPPORT

Sponsored by: EMC / Isilon Storage Division


# 277457 20-Jan-2015 ngie

MFC r275907:

r275907 (by ngie):

Fix building/installing tests when TESTSBASE != /usr/tests

The work in r258233 hardcoded the assumption that tests was the last component
of the tests tree by pushing tests as an explicit prefix for the paths in
BSD.tests.dist and /usr was the prefix for all tests, per BSD.usr.dist and all
of the mtree calls used in Makefile.inc1. This assumption breaks if/when one
provides a custom TESTSBASE "prefix", e.g. TESTSBASE=/mytests .

One thing that r258233 did properly though was remove "/usr/tests" creation
from BSD.usr.dist -- that should have not been there in the first place. That
was an "oops" on my part for the work that was originally committed in r241823

Phabric: D1301
Reviewed by: imp
Sponsored by: EMC / Isilon Storage Division


# 276594 02-Jan-2015 bapt

install-info is also needed for installworld so add it to the bootstrap tools

Add BPATH to the installworld path to ensure using installworld works if
install-info is not in base


# 276576 02-Jan-2015 bapt

Make texinfo a bootstrap tools this fixes cross building when makeinfo is not \
available on the host

Differential Revision: https://reviews.freebsd.org/D1410
Submitted by: ngie (initial patch)
Reviewed by: ngie, imp
MFC after: 1 week


# 276547 02-Jan-2015 bapt

MFC: r276052,r276053

Build selective portions of gnu/usr.bin/texinfo as part of build-tools to
ensure that building on a host without makeinfo (i.e. a host where
make delete-old -DWITHOUT_INFO was run), then building with MK_INFO == yes
doesn't manifest in build errors when building info pages

This manifested itself like the following when I was build testing an MFC
change on stable/10:

makeinfo --no-split -I /usr/src/gnu/lib/libregex/doc -I /usr/src/gnu/lib/libregex/doc regex.texi -o regex.info
makeinfo: not found
*** [regex.info] Error code 127

make[6]: stopped in /usr/src/gnu/lib/libregex/doc
1 error


# 276311 27-Dec-2014 ngie

MFC r275867:

Fix sporadic build failures due to race when running make installworld
when strip gets replaced at install time by adding it to ITOOLS for the
default usr.bin/xinstall STRIP_CMD

This will fix the failure noted in this Jenkins build step:
https://jenkins.freebsd.org/job/Build-UFS-image/688/

This will also fix the issue reported by alfred@ dealing with installing on
targets that differ from build hosts (e.g. installing on i386/i386 when built
on amd64/amd64)

Sponsored by: EMC / Isilon Storage Division


# 276051 22-Dec-2014 ngie

MFC r275622:

Add makewhatis to ITOOLS if MK_MAN != no

This will fix installation with differing host targets in installworld, so
one can build i386/i386 on an amd64 host, then install to an i386/i386 target

Reported by: alfred
Phabric: D1280


# 275424 02-Dec-2014 brooks

MFC r274806:

Add a guard against attempting to invoke the buildenv target with -j# as
that silently exits rather than doing something useful.

Sponsored by: DARPA, AFRL


# 275236 29-Nov-2014 rodrigc

MFC r272484:

Add dependencies to various libraries to libzfs and libzpool.

Submitted by: sef


# 275040 25-Nov-2014 dteske

MFC r274116:

Add new libraries/utilities for data throughput visualization.
dpv(3): dialog progress view library
dpv(1): stream data from stdin or multiple paths with dialog progress view
figpar(3): configuration file parsing library

MFC r274120, r274121, r274123, r274124, r274144, r274146, r274159, r274192,
r274203, r274209, r274226, r274270, and r274851: Fixes following r274116

Reviews: D714
Relnotes: New libdpv/libfigpar and dpv(1) utility
Reviewed by: jelischer, shurd
Discussed at: MeetBSD California 2014 Vendor/Dev Summit
Discussed on: -current
Thanks to: ngie, ian, jelischer, shurd, bapt


# 273715 26-Oct-2014 ian

MFC r262626, r262626, r264979, r265154, r265162, r265163, r267319, r270863,
r270991, r271045:

Enhancements related to compiling FDT data...

- Use proper include path for dtc as well as cpp.
- Call cpp with -P to avoid printing line markings.
- Allow FDT_DTS_FILE to be a list, either in the makedtb target, or in a
kernel config file.
- Add the dts include directory to the -I list when doing arm builds.
- Invoke make_dtb with MACHINE defined for cross building friendliness.
- Allow the make_dtb script to work outside of a "make buildkernel"
context by setting MACHINE from uname -m if it's not set already.
- Use sh -c '...' to launch the dtb build scripts with env prepended,
otherwise it tries to treat the env var stuff as a script file name.


# 273504 22-Oct-2014 ngie

MFC r272053:

Have distrib-dirs, distribution, hier, hierarchy, redistribute, and reinstall
depend on the .MAKE special target

This will allow users to do something like the following to print out the
results of the running the simulated make target with bmake, like some of the
other top-level make targets in Makefile.inc1:

% make -f Makefile.inc1 -n distribution TARGET=i386 TARGET_ARCH=i386

Sponsored by: EMC / Isilon Storage Division


# 271333 09-Sep-2014 emaste

MFC improved vt(4) font generation

r266851: Add VGAROM 8x8, 8x14 and 8x16 fonts for vt(4)

These are converted from syscons(4) cp437 fonts.

r267306: Add vgarom font source

These are in 'GNU Unifont' format, and are converted from syscons(4)
cp437 fonts.

r267400: Add thin versions of VGAROM 8x8 and 8x16 fonts for vt(4)

These are converted from syscons(4) cp437-thin-8x* fonts.

r267423: Build vt(4) fonts during buildworld

vtfontcvt(8) is now built during buildworld, so can be used as a
bootstrap tool to create vt(4) fonts from source .hex or .bdf font
files, rather than having uuencoded binary fonts in the tree.

r267578: Add glyphs from converted syscons iso* fonts

This consists of the unique glyphs from the following font files in
/usr/share/syscons/fonts:

iso*.fnt ISO-8859-1 West European
iso02*.fnt ISO-8859-2 Central European
iso04*.fnt ISO-8859-4 Baltic
iso05*.fnt ISO-8859-5 Cyrillic
iso07*.fnt ISO-8859-7 Greek
iso08*.fnt ISO-8859-8 Hebrew
iso09*.fnt ISO-8859-9 Turkish
iso15*.fnt ISO-8859-15 West European

r268022: Rename the WITHOUT_VT_SUPPORT knob to WITHOUT_VT

The _SUPPORT knobs have a consistent meaning which differs from the
behaviour controlled by this knob. As the knob is opt-out and has not
appeared in a release the impact should be low.

Approved by: re
Sponsored by: The FreeBSD Foundation


# 270824 29-Aug-2014 ngie

MFC r270027:

tmconfig compilation when MK_ATM == yes and MK_BSNMP == no

Makefile.inc1:
Always compile gensnmptree with bootstrap-tools when MK_BSNMP != no
instead of depending on a potentially stale tool installed on the build host

sbin/atm/atmconfig/Makefile:
- Always remove oid.h to avoid cluttering up the build/src tree.
- Consolidate all of the RESCUE/MK_BSNMP != no logic under one
conditional to improve readability
- Remove unnecessary ${.OBJDIR} prefixing for oid.h and use ${.TARGET} instead
of spelling out oid.h
- Add a missing DPADD for ${LIBCRYPTO} when compiled MK_BSNMP == yes and
MK_OPENSSL == yes and not compiling for /rescue/rescue

sbin/atm/atmconfig/main.c:
Change #ifndef RESCUE to #ifdef WITH_BSNMP in main.c to make it
clear that we're compiling bsnmp support into atmconfig


# 270600 25-Aug-2014 ian

Revert r270079 which was MFC of r269688, build libohash while bootstrapping.

The changes to split the ohash code out of m4 into its own library haven't
been MFC'd, so this change was causing an error during bootstrap when
building stable-10.

Submitted by: Dai Sieh <dsieh@dsieh.com>
Pointy hat to: ian


# 270284 21-Aug-2014 ian

MFC r260401

Remove aicasm as a build dependency. It made sense when the ahc and ahd
drivers and their firmware were under active development, but those days
have passed. The firmware now exists in pre-compiled form, no longer
dependent on it's sources or on aicasm. If you wish to rebuild the
firmware from source, the glue still exists under the 'make firmware'
target in sys/modules/aic7xxx.

This also fixes the problem introduced with r257777 et al with building
kernels the old fashioned way in sys/$arch/compile/$CONFIG when the
ahc/ahd drivers were included.


# 270274 21-Aug-2014 ian

MFC r257637, r257730, r257734, r257777, r257825, r257838, r257873:

Changes to how the aicasm tool is built. This series of changes results
in the aicasm tool being built as part of the tools stages of world and
kernel builds.

Most of these changes will ultimately be undone when r260401 is MFC'd,
but it will leave in place the new kernel-build-tool machinery (KTMAKE
stuff) in case a new special kernel tool ever comes along.


# 270187 19-Aug-2014 ian

MFC r266473,267331,267511:

Use an intermediate target to associate with _SUBDIR which is marked .MAKE
this allows make -n to do tree walks as expected without
doing anything else (as intended).
Use prefix _sub. to help avoid conflict with any real target.

Put the test suite in its own tests.txz distribution file.
Force all the contents of /usr/tests to go into a separate distribution
file so that users of binary releases can easily choose to not install

Create a mechanism for providing fine-grained build order dependencies
during SUBDIR_PARALLEL builds. This augments the coarse .WAIT mechanism,
which is still useful if you've got a situation such as "almost everything
depends on A and B".


# 270079 17-Aug-2014 ian

MFC r269688: m4 now requires libohash, build it when bootstrapping.


# 269967 14-Aug-2014 roberto

MFC r269662:

10 has a new flex (2.5.37) and the config.h for unbound has been updated to
take this into account. Alas it breaks source upgrade from any version of
9 because flex is not built as a bootstrap-tools (it would be for older
versions).

That means "libunbound/configlexer.c" is built with the old flex but using
config.h for the new one. Build is thus broken going from 9.* to 10.

Make flex a bootstrap-tools entry if host is less than 1000033 to take into
account the flex update in 10.

Tested on both 9.2-RC3 and 9.3 by myself and dim@. Running buildworld in
head but as both 10 and 11 has the new flex, it will not matter.

Reviewed by: imp
Approved by: des, imp
MFC after: 1 week
Phabric: D554


# 269913 13-Aug-2014 rpaulo

MFC r269744
Run dtrace in 32-bit mode when compiling 32-bit libraries.


# 269078 24-Jul-2014 dim

MFC r268957:

Run mtree for BSD.tests.dist during make xdev-install, if the tests are
enabled (which they are in the default configuration). Otherwise, it
will fail because ${XDDESTDIR}/usr/include/atf-c does not exist.


# 267823 24-Jun-2014 bdrewery

MFC r267599:

- Add a LOCAL_ITOOLS to allow adding additional tools required for the
installworld and distributeworld targets

PR: 179562


# 266758 27-May-2014 delphij

MFC r266520:

Explicitly link libzfs against libavl as it is done in OpenSolaris
(4543:12bb2876a62e). Without this, some third party applications
may break because the lack of AVL related symbols.

FreeBSD base system are not affected because the FreeBSD ZFS command
line tools were all linked against libavl and thus hide the underlying
issue.

PR: bin/183081


# 266717 26-May-2014 ian

MFC 263949, 265063: Add library dependencies for a couple bootstrap libs
to fix build failures for high -jN values when building with gcc.


# 266251 16-May-2014 ian

MFC 262614, 262625, 262626, 262627, 262682, 262714, 262725, 262736

Integrate device-tree upstream files into the build process:
(1) Invoke cpp to bring in files via #include (although the old
/include/ stuff is supported still).
(2) bring in files from either vendor tree or freebsd-custom files
when building.
(3) move all dts* files from sys/boot/fdt/dts to
sys/boot/fdt/dts/${MACHINE} as appropriate.
(4) encode all the magic to do the build in sys/tools/fdt/make_dtb.sh
so that the different places in the tree use the exact same logic.
(5) switch back to gpl dtc by default. the bsdl one in the tree has
significant issues not easily addressed by those unfamiliar with
the code.

Only try to build the static dtb when we're building a static dtb.

Use proper include path for dtc as well as cpp.

Fix syntax errors (missing ; other minor glitches) in existing dts files.


# 265894 11-May-2014 thomas

MFC rev. 265260:
Add appropriate quoting to allow building with a KERNCONFDIR containing
spaces.

PR: kern/162736


# 264372 12-Apr-2014 bapt

MFC: r263881, r263952, r263983, r264068, r264090, r264131

Some xdev fixes:

- if TARGET_ARCH is not defined and XDEV_ARCH is defined then early define
TARGET_ARCH to the valud of XDEV_ARCH: This allow the xdev-build target
to be able to correctly chose the compiler it needs to build
- Allow overwriting XDTP to allow a user to not chose where the xdev env will
live in
- Fix build for gcc only xdev (like ia64) by providing the proper -B to the
toolchain and not relying on gcc being installed already in base
- Fix TOOLS_PREFIX so the generated toolchain has the right default sysroot when
installed intead of getting the DESTDIR one
- Fix supporting DESTDIR
- Also overwrite CXX (needed for cross building c++ libraries with clang) and
CPP (needed to cross build some libraries when gcc is the target default
compiler but gcc is not installed on the building host)
- Prevent XDTP from being a relative path:
XDTP is used as the default SYSROOT for clang and thus should be an absolute path.
- Respect default CC


# 264325 10-Apr-2014 asomers

MFC r263429

Fix kern/187712: config(8) does not respect KERNCONFDIR.
The impact of this bug is that you cannot build a kernel if both of the
following are true:
1) The kernel config file is in a non-default location
2) The kernel config file uses the "include" statement from config(5).

usr.sbin/config/main.c
usr.sbin/config/config.8
usr.sbin/config/config.h
usr.sbin/config/lang.l
Added a "-I path" option to config(8). By analogy to cc(1), it adds
an extra path in which the "include" statement will search for
files.

Makefile.inc1
Pass "-I ${KERNCONFDIR}" to config(8).


# 263665 23-Mar-2014 dim

Turn off warnings for building aicasm. Various versions of yacc exist,
which can result in different warnings-as-errors in this tool, but these
are all completely harmless.

This is a direct commit to stable/7, stable/8, stable/9 and stable/10,
since this kernel build tool has already been removed in head.


# 261849 13-Feb-2014 asomers

MFC r261132

Fix the build so -DNO_TESTS is passed in various phases that don't require
tests in order to build or install. Crucially, don't try to install tests
during the lib32 install phase. This commit supersedes r261081, which fixed
the lib32 install phase problem, but didn't fix other phases.

Submitted by: Garrett Cooper
Reviewed by: sjg


# 260024 28-Dec-2013 jmmv

Plug the ATF tests into the build.

This is a MFC into stable/10 of:
- r257849 Add libatf-c++ to the prebuild libs.
- r257853 Build and install the atf tests.
- r258233 Move all atf directories to the tests mtree.
- r258285 Fix the build of some ATF tests.

This change is "make tinderbox" clean on ref10-amd64 with the default
settings of WITHOUT_TESTS. It is likely for the WITH_TESTS build to
still be broken because not all relevant changes have been merged yet.


# 260013 28-Dec-2013 jmmv

Set up the /usr/tests hierarchy.

This is a MFC of the following into stable/10:
- r257097 Set up the /usr/tests hierarchy.
- r257098 Add missing WITHOUTTESTS file.
- r257100 Add a tests(7) manual page.
- r257105 Disable WITHTESTS= for now.
- r257848 Fix buildworld when WITHTESTS is enabled.
- r257850 Subsume the functionality of MKATF into MKTESTS.
- r257851 Handle the removal of the test suite when WITHOUTTESTS=yes.
- r257852 Install category Kyuafiles from their category directories.
- r258232 Install BSD.tests.mtree when MKTESTS is yes.

Note that building with WITH_TESTS is still broken at this point (and
hence why WITHOUT_TESTS is the set as the default). Subsequent pullups
will fix the remaining issues.


# 259312 13-Dec-2013 ian

MFC 256640: Allow 'make xdev' to work when DESTDIR is set.


# 259073 07-Dec-2013 peter

Hoist all the mergeinfo up to the root in preparation for enforcing merges
to the root only. All MFC's were rerecorded to the root.

Going forward, if an MFC includes mergeinfo, it will need to be made to
the root and committed from the root. Merges with --ignore-ancestry
or diff | patch can go anywhere.

The mergeinfo in HEAD is in a bad state from years of neglect and manual
tampering and this was branched into 10.x. This confuses the coalescing
code and prevents it from doing its job.

Approved by: re (gjb, implicit)


# 258536 24-Nov-2013 cperciva

MFC r258086:
Strip the -pN patch level from the VERSION string which gets encoded into
CTF data. Otherwise FreeBSD Update builds think every kernel file has
changed every time there's a security advisory, since the FreeBSD Update
build code isn't smart enough to look inside CTF data to ignore those
changes.

Approved by: re (gjb)


# 258398 20-Nov-2013 peter

MFC r258283 - move iconv* symbols out of libc.so.7 namespace with
compatibility symbols to aid transition for existing 10.x installs.

Approved by: re (kib)


# 257563 03-Nov-2013 delphij

MFC r257350:

In r257079, SRCDIR is pointed to ${.CURDIR} when not set. However,
Makefile.inc1 is being called in sub-make's where make(1) would,
by default, implicitly chdir(2) to ${.OBJDIR} before executing any
targets. This would make some targets, like delete-old, when trying
to derive various variables introduced by change r256921 using
``make -f Makefile.inc1'' that also rely on SRCDIR to fail.

This changeset adds an explicit cd ${.CURDIR} before these unwrapped
make calls, making them in line with the other ones that are already
being wrapped with the explicit chdir's.

Approved by: re (hrs)


# 257509 01-Nov-2013 gjb

MFC r257329 (nyan):
Fix build, both clang and gcc are required on pc98.

Approved by: re (kib)
Sponsored by: The FreeBSD Foundation


# 257449 31-Oct-2013 brooks

MFC r256915

Stop conflating WITHOUT_CLANG with WITHOUT_CLANG_IS_CC. This allows
bootstrapping a copy of clang without building clang for the base system

which is useful for nanobsd and similar setups. It's still probably
wrong to conflate what is installed as /usr/bin/cc with the selection
of a bootstrap compiler under WITH*_CLANG_IS_CC, but that's for another
day.

Sponsored by: DARPA/AFRL
Approved by: re (gjb)


# 257136 25-Oct-2013 gjb

MFC r257079:
Fix build host pollution by avoiding calling 'uname -srp' to
determine values for 'VERSION'.

Approved by: re (glebius)


# 257053 24-Oct-2013 bdrewery

MFC r256842:

Fix 'make delete-old-libs' and 'make check-libs' to delete .debug
files created by WITH_DEBUG_FILES. Also cleanup .symbols files from
the period between r244236 when .symbols were supported and r251512
when they were renamed to .debug.

Only propose to delete a .debug file if the corresponding library
itself was deleted already.

Approved by: bapt
Approved by: re (glebius)


# 256947 22-Oct-2013 gjb

Revert r256944, which does not quite get the src/ directory correct.

Discussed with: cperciva
Approved by: re (implicit)
Pointyhat: gjb


# 256944 22-Oct-2013 cperciva

MFC r256921:
Thou shalt not leak build host state into the system being compiled.

Approved by: re (gjb)


# 286746 13-Aug-2015 gjb

MFC r262670 (marcel):
Use ${MAKE} so that we always use the same version/implementation
of make(1).

PR: 202277
Submitted by: John Hein
Sponsored by: The FreeBSD Foundation


# 286673 12-Aug-2015 imp

Direct commit

When compiling on -current from r284356 to r285986, the host's
crunchgen can't be used because builds of rescue break when STRIP= was
used to prevent stripping of binaries. Direct commit because -current
code is different. Building 10 on current is common enough to warrnat
a safety belt since this has been broken for two months. The offending
change was never in stable/10.


# 282848 13-May-2015 ngie

MFC r281618,r281823:

r281618:

Defeat race with MK_KERBEROS == yes introduced with bootstrap-tools
parallelization work done in r279197

- kerberos5/lib/libroken requires kerberos5/tools/make-roken to build
- kerberos5/tools/asn1_compile, kerberos5/tools/slc, and usr.bin/compile_et
require kerberos5/lib/libroken and kerberos5/lib/libvers

This race is incredibly evident when cross-building sparc64 on
ref10-amd64.freebsd.org

Pointyhat to: ngie

r281823:

Serialize all of _kerberos5_bootstrap_tools to avoid build failures involving
make bootstrap-tools

On the plus side, this also greatly reduces complexity

Pointyhat to: ngie
Reported by: Willem Jan Withagen <wjw@digiware.nl>


# 281836 21-Apr-2015 garga

MFC r270155, r274490, r274593, r274607

Add native-xtools target to stable/10

Differential Revision: https://reviews.freebsd.org/D2044
Reviewed by: sbruno@
Approved by: sbruno@
Sponsored by: Netgate


# 281382 10-Apr-2015 dim

MFC r272814 (by bapt):

Add OBJCOPY to the list of external tools

MFC r272815 (by bapt):

Fix typo

This should fix the build troubles some people have been seeing after
the MFC of r280980 (in r281289). Sorry for the breakage.


# 281289 09-Apr-2015 dim

MFC r280980:

Ensure the cross assembler, linker and objcopy are used for the build32
stage, just like for the regular world stage.

Reviewed by: rodrigc, imp, bapt, emaste
Differential Revision: https://reviews.freebsd.org/D2187


# 281110 05-Apr-2015 dim

Ensure yacc is built during bootstrap-tools for __FreeBSD_version
1001506 and earlier, since some of the ACPI tools now reach yacc's old
maximum table limit. This should fix the Jenkins buildbot, which
apparently runs 10.1-RELEASE.


# 281056 03-Apr-2015 bdrewery

MFC r280179,r280180:

r280179:
Add LIB_CXX so that C++ libraries will use CXX to link.

This adds some extra dependencies directly to Makefile.inc1 as
atf is still a prebuild library in stable/10. If r273449 is MFCd
these can come out.

r280180:
Document LIB and LIB_CXX.


# 280356 22-Mar-2015 ngie

Defeat race with texinfo tools built with make bootstrap-tools

This is a direct commit to stable/10 because texinfo has been removed from
head


# 280341 22-Mar-2015 ngie

Remove dependency between usr.bin/m4 and lib/libohash

libohash doesn't exist on stable/10 (only head)

Not sure why my make buildworld didn't catch any issues

This is a direct commit to stable/10 as a followup to r280340


# 280340 22-Mar-2015 ngie

MFC r279197,r279198:

r279197:

Parallelize building bootstrap-tools

Differential Revision: https://reviews.freebsd.org/D1901
Reviewed by: ian
No serious objections from: imp

r279198:

Fill in missing dependencies for dtrace related tools so the bootstrap-tools
compiles properly on older hosts

Pointyhat to: me


# 278569 11-Feb-2015 ngie

MFC r278182:

r278182:

Conditionalize building radius support into libpam, ppp, etc via
MK_RADIUS_SUPPORT

Sponsored by: EMC / Isilon Storage Division


# 277457 20-Jan-2015 ngie

MFC r275907:

r275907 (by ngie):

Fix building/installing tests when TESTSBASE != /usr/tests

The work in r258233 hardcoded the assumption that tests was the last component
of the tests tree by pushing tests as an explicit prefix for the paths in
BSD.tests.dist and /usr was the prefix for all tests, per BSD.usr.dist and all
of the mtree calls used in Makefile.inc1. This assumption breaks if/when one
provides a custom TESTSBASE "prefix", e.g. TESTSBASE=/mytests .

One thing that r258233 did properly though was remove "/usr/tests" creation
from BSD.usr.dist -- that should have not been there in the first place. That
was an "oops" on my part for the work that was originally committed in r241823

Phabric: D1301
Reviewed by: imp
Sponsored by: EMC / Isilon Storage Division


# 276594 02-Jan-2015 bapt

install-info is also needed for installworld so add it to the bootstrap tools

Add BPATH to the installworld path to ensure using installworld works if
install-info is not in base


# 276576 02-Jan-2015 bapt

Make texinfo a bootstrap tools this fixes cross building when makeinfo is not \
available on the host

Differential Revision: https://reviews.freebsd.org/D1410
Submitted by: ngie (initial patch)
Reviewed by: ngie, imp
MFC after: 1 week


# 276547 02-Jan-2015 bapt

MFC: r276052,r276053

Build selective portions of gnu/usr.bin/texinfo as part of build-tools to
ensure that building on a host without makeinfo (i.e. a host where
make delete-old -DWITHOUT_INFO was run), then building with MK_INFO == yes
doesn't manifest in build errors when building info pages

This manifested itself like the following when I was build testing an MFC
change on stable/10:

makeinfo --no-split -I /usr/src/gnu/lib/libregex/doc -I /usr/src/gnu/lib/libregex/doc regex.texi -o regex.info
makeinfo: not found
*** [regex.info] Error code 127

make[6]: stopped in /usr/src/gnu/lib/libregex/doc
1 error


# 276311 27-Dec-2014 ngie

MFC r275867:

Fix sporadic build failures due to race when running make installworld
when strip gets replaced at install time by adding it to ITOOLS for the
default usr.bin/xinstall STRIP_CMD

This will fix the failure noted in this Jenkins build step:
https://jenkins.freebsd.org/job/Build-UFS-image/688/

This will also fix the issue reported by alfred@ dealing with installing on
targets that differ from build hosts (e.g. installing on i386/i386 when built
on amd64/amd64)

Sponsored by: EMC / Isilon Storage Division


# 276051 22-Dec-2014 ngie

MFC r275622:

Add makewhatis to ITOOLS if MK_MAN != no

This will fix installation with differing host targets in installworld, so
one can build i386/i386 on an amd64 host, then install to an i386/i386 target

Reported by: alfred
Phabric: D1280


# 275424 02-Dec-2014 brooks

MFC r274806:

Add a guard against attempting to invoke the buildenv target with -j# as
that silently exits rather than doing something useful.

Sponsored by: DARPA, AFRL


# 275236 29-Nov-2014 rodrigc

MFC r272484:

Add dependencies to various libraries to libzfs and libzpool.

Submitted by: sef


# 275040 25-Nov-2014 dteske

MFC r274116:

Add new libraries/utilities for data throughput visualization.
dpv(3): dialog progress view library
dpv(1): stream data from stdin or multiple paths with dialog progress view
figpar(3): configuration file parsing library

MFC r274120, r274121, r274123, r274124, r274144, r274146, r274159, r274192,
r274203, r274209, r274226, r274270, and r274851: Fixes following r274116

Reviews: D714
Relnotes: New libdpv/libfigpar and dpv(1) utility
Reviewed by: jelischer, shurd
Discussed at: MeetBSD California 2014 Vendor/Dev Summit
Discussed on: -current
Thanks to: ngie, ian, jelischer, shurd, bapt


# 273715 26-Oct-2014 ian

MFC r262626, r262626, r264979, r265154, r265162, r265163, r267319, r270863,
r270991, r271045:

Enhancements related to compiling FDT data...

- Use proper include path for dtc as well as cpp.
- Call cpp with -P to avoid printing line markings.
- Allow FDT_DTS_FILE to be a list, either in the makedtb target, or in a
kernel config file.
- Add the dts include directory to the -I list when doing arm builds.
- Invoke make_dtb with MACHINE defined for cross building friendliness.
- Allow the make_dtb script to work outside of a "make buildkernel"
context by setting MACHINE from uname -m if it's not set already.
- Use sh -c '...' to launch the dtb build scripts with env prepended,
otherwise it tries to treat the env var stuff as a script file name.


# 273504 22-Oct-2014 ngie

MFC r272053:

Have distrib-dirs, distribution, hier, hierarchy, redistribute, and reinstall
depend on the .MAKE special target

This will allow users to do something like the following to print out the
results of the running the simulated make target with bmake, like some of the
other top-level make targets in Makefile.inc1:

% make -f Makefile.inc1 -n distribution TARGET=i386 TARGET_ARCH=i386

Sponsored by: EMC / Isilon Storage Division


# 271333 09-Sep-2014 emaste

MFC improved vt(4) font generation

r266851: Add VGAROM 8x8, 8x14 and 8x16 fonts for vt(4)

These are converted from syscons(4) cp437 fonts.

r267306: Add vgarom font source

These are in 'GNU Unifont' format, and are converted from syscons(4)
cp437 fonts.

r267400: Add thin versions of VGAROM 8x8 and 8x16 fonts for vt(4)

These are converted from syscons(4) cp437-thin-8x* fonts.

r267423: Build vt(4) fonts during buildworld

vtfontcvt(8) is now built during buildworld, so can be used as a
bootstrap tool to create vt(4) fonts from source .hex or .bdf font
files, rather than having uuencoded binary fonts in the tree.

r267578: Add glyphs from converted syscons iso* fonts

This consists of the unique glyphs from the following font files in
/usr/share/syscons/fonts:

iso*.fnt ISO-8859-1 West European
iso02*.fnt ISO-8859-2 Central European
iso04*.fnt ISO-8859-4 Baltic
iso05*.fnt ISO-8859-5 Cyrillic
iso07*.fnt ISO-8859-7 Greek
iso08*.fnt ISO-8859-8 Hebrew
iso09*.fnt ISO-8859-9 Turkish
iso15*.fnt ISO-8859-15 West European

r268022: Rename the WITHOUT_VT_SUPPORT knob to WITHOUT_VT

The _SUPPORT knobs have a consistent meaning which differs from the
behaviour controlled by this knob. As the knob is opt-out and has not
appeared in a release the impact should be low.

Approved by: re
Sponsored by: The FreeBSD Foundation


# 270824 29-Aug-2014 ngie

MFC r270027:

tmconfig compilation when MK_ATM == yes and MK_BSNMP == no

Makefile.inc1:
Always compile gensnmptree with bootstrap-tools when MK_BSNMP != no
instead of depending on a potentially stale tool installed on the build host

sbin/atm/atmconfig/Makefile:
- Always remove oid.h to avoid cluttering up the build/src tree.
- Consolidate all of the RESCUE/MK_BSNMP != no logic under one
conditional to improve readability
- Remove unnecessary ${.OBJDIR} prefixing for oid.h and use ${.TARGET} instead
of spelling out oid.h
- Add a missing DPADD for ${LIBCRYPTO} when compiled MK_BSNMP == yes and
MK_OPENSSL == yes and not compiling for /rescue/rescue

sbin/atm/atmconfig/main.c:
Change #ifndef RESCUE to #ifdef WITH_BSNMP in main.c to make it
clear that we're compiling bsnmp support into atmconfig


# 270600 25-Aug-2014 ian

Revert r270079 which was MFC of r269688, build libohash while bootstrapping.

The changes to split the ohash code out of m4 into its own library haven't
been MFC'd, so this change was causing an error during bootstrap when
building stable-10.

Submitted by: Dai Sieh <dsieh@dsieh.com>
Pointy hat to: ian


# 270284 21-Aug-2014 ian

MFC r260401

Remove aicasm as a build dependency. It made sense when the ahc and ahd
drivers and their firmware were under active development, but those days
have passed. The firmware now exists in pre-compiled form, no longer
dependent on it's sources or on aicasm. If you wish to rebuild the
firmware from source, the glue still exists under the 'make firmware'
target in sys/modules/aic7xxx.

This also fixes the problem introduced with r257777 et al with building
kernels the old fashioned way in sys/$arch/compile/$CONFIG when the
ahc/ahd drivers were included.


# 270274 21-Aug-2014 ian

MFC r257637, r257730, r257734, r257777, r257825, r257838, r257873:

Changes to how the aicasm tool is built. This series of changes results
in the aicasm tool being built as part of the tools stages of world and
kernel builds.

Most of these changes will ultimately be undone when r260401 is MFC'd,
but it will leave in place the new kernel-build-tool machinery (KTMAKE
stuff) in case a new special kernel tool ever comes along.


# 270187 19-Aug-2014 ian

MFC r266473,267331,267511:

Use an intermediate target to associate with _SUBDIR which is marked .MAKE
this allows make -n to do tree walks as expected without
doing anything else (as intended).
Use prefix _sub. to help avoid conflict with any real target.

Put the test suite in its own tests.txz distribution file.
Force all the contents of /usr/tests to go into a separate distribution
file so that users of binary releases can easily choose to not install

Create a mechanism for providing fine-grained build order dependencies
during SUBDIR_PARALLEL builds. This augments the coarse .WAIT mechanism,
which is still useful if you've got a situation such as "almost everything
depends on A and B".


# 270079 17-Aug-2014 ian

MFC r269688: m4 now requires libohash, build it when bootstrapping.


# 269967 14-Aug-2014 roberto

MFC r269662:

10 has a new flex (2.5.37) and the config.h for unbound has been updated to
take this into account. Alas it breaks source upgrade from any version of
9 because flex is not built as a bootstrap-tools (it would be for older
versions).

That means "libunbound/configlexer.c" is built with the old flex but using
config.h for the new one. Build is thus broken going from 9.* to 10.

Make flex a bootstrap-tools entry if host is less than 1000033 to take into
account the flex update in 10.

Tested on both 9.2-RC3 and 9.3 by myself and dim@. Running buildworld in
head but as both 10 and 11 has the new flex, it will not matter.

Reviewed by: imp
Approved by: des, imp
MFC after: 1 week
Phabric: D554


# 269913 13-Aug-2014 rpaulo

MFC r269744
Run dtrace in 32-bit mode when compiling 32-bit libraries.


# 269078 24-Jul-2014 dim

MFC r268957:

Run mtree for BSD.tests.dist during make xdev-install, if the tests are
enabled (which they are in the default configuration). Otherwise, it
will fail because ${XDDESTDIR}/usr/include/atf-c does not exist.


# 267823 24-Jun-2014 bdrewery

MFC r267599:

- Add a LOCAL_ITOOLS to allow adding additional tools required for the
installworld and distributeworld targets

PR: 179562


# 266758 27-May-2014 delphij

MFC r266520:

Explicitly link libzfs against libavl as it is done in OpenSolaris
(4543:12bb2876a62e). Without this, some third party applications
may break because the lack of AVL related symbols.

FreeBSD base system are not affected because the FreeBSD ZFS command
line tools were all linked against libavl and thus hide the underlying
issue.

PR: bin/183081


# 266717 26-May-2014 ian

MFC 263949, 265063: Add library dependencies for a couple bootstrap libs
to fix build failures for high -jN values when building with gcc.


# 266251 16-May-2014 ian

MFC 262614, 262625, 262626, 262627, 262682, 262714, 262725, 262736

Integrate device-tree upstream files into the build process:
(1) Invoke cpp to bring in files via #include (although the old
/include/ stuff is supported still).
(2) bring in files from either vendor tree or freebsd-custom files
when building.
(3) move all dts* files from sys/boot/fdt/dts to
sys/boot/fdt/dts/${MACHINE} as appropriate.
(4) encode all the magic to do the build in sys/tools/fdt/make_dtb.sh
so that the different places in the tree use the exact same logic.
(5) switch back to gpl dtc by default. the bsdl one in the tree has
significant issues not easily addressed by those unfamiliar with
the code.

Only try to build the static dtb when we're building a static dtb.

Use proper include path for dtc as well as cpp.

Fix syntax errors (missing ; other minor glitches) in existing dts files.


# 265894 11-May-2014 thomas

MFC rev. 265260:
Add appropriate quoting to allow building with a KERNCONFDIR containing
spaces.

PR: kern/162736


# 264372 12-Apr-2014 bapt

MFC: r263881, r263952, r263983, r264068, r264090, r264131

Some xdev fixes:

- if TARGET_ARCH is not defined and XDEV_ARCH is defined then early define
TARGET_ARCH to the valud of XDEV_ARCH: This allow the xdev-build target
to be able to correctly chose the compiler it needs to build
- Allow overwriting XDTP to allow a user to not chose where the xdev env will
live in
- Fix build for gcc only xdev (like ia64) by providing the proper -B to the
toolchain and not relying on gcc being installed already in base
- Fix TOOLS_PREFIX so the generated toolchain has the right default sysroot when
installed intead of getting the DESTDIR one
- Fix supporting DESTDIR
- Also overwrite CXX (needed for cross building c++ libraries with clang) and
CPP (needed to cross build some libraries when gcc is the target default
compiler but gcc is not installed on the building host)
- Prevent XDTP from being a relative path:
XDTP is used as the default SYSROOT for clang and thus should be an absolute path.
- Respect default CC


# 264325 10-Apr-2014 asomers

MFC r263429

Fix kern/187712: config(8) does not respect KERNCONFDIR.
The impact of this bug is that you cannot build a kernel if both of the
following are true:
1) The kernel config file is in a non-default location
2) The kernel config file uses the "include" statement from config(5).

usr.sbin/config/main.c
usr.sbin/config/config.8
usr.sbin/config/config.h
usr.sbin/config/lang.l
Added a "-I path" option to config(8). By analogy to cc(1), it adds
an extra path in which the "include" statement will search for
files.

Makefile.inc1
Pass "-I ${KERNCONFDIR}" to config(8).


# 263665 23-Mar-2014 dim

Turn off warnings for building aicasm. Various versions of yacc exist,
which can result in different warnings-as-errors in this tool, but these
are all completely harmless.

This is a direct commit to stable/7, stable/8, stable/9 and stable/10,
since this kernel build tool has already been removed in head.


# 261849 13-Feb-2014 asomers

MFC r261132

Fix the build so -DNO_TESTS is passed in various phases that don't require
tests in order to build or install. Crucially, don't try to install tests
during the lib32 install phase. This commit supersedes r261081, which fixed
the lib32 install phase problem, but didn't fix other phases.

Submitted by: Garrett Cooper
Reviewed by: sjg


# 260024 28-Dec-2013 jmmv

Plug the ATF tests into the build.

This is a MFC into stable/10 of:
- r257849 Add libatf-c++ to the prebuild libs.
- r257853 Build and install the atf tests.
- r258233 Move all atf directories to the tests mtree.
- r258285 Fix the build of some ATF tests.

This change is "make tinderbox" clean on ref10-amd64 with the default
settings of WITHOUT_TESTS. It is likely for the WITH_TESTS build to
still be broken because not all relevant changes have been merged yet.


# 260013 28-Dec-2013 jmmv

Set up the /usr/tests hierarchy.

This is a MFC of the following into stable/10:
- r257097 Set up the /usr/tests hierarchy.
- r257098 Add missing WITHOUTTESTS file.
- r257100 Add a tests(7) manual page.
- r257105 Disable WITHTESTS= for now.
- r257848 Fix buildworld when WITHTESTS is enabled.
- r257850 Subsume the functionality of MKATF into MKTESTS.
- r257851 Handle the removal of the test suite when WITHOUTTESTS=yes.
- r257852 Install category Kyuafiles from their category directories.
- r258232 Install BSD.tests.mtree when MKTESTS is yes.

Note that building with WITH_TESTS is still broken at this point (and
hence why WITHOUT_TESTS is the set as the default). Subsequent pullups
will fix the remaining issues.


# 259312 13-Dec-2013 ian

MFC 256640: Allow 'make xdev' to work when DESTDIR is set.


# 259073 07-Dec-2013 peter

Hoist all the mergeinfo up to the root in preparation for enforcing merges
to the root only. All MFC's were rerecorded to the root.

Going forward, if an MFC includes mergeinfo, it will need to be made to
the root and committed from the root. Merges with --ignore-ancestry
or diff | patch can go anywhere.

The mergeinfo in HEAD is in a bad state from years of neglect and manual
tampering and this was branched into 10.x. This confuses the coalescing
code and prevents it from doing its job.

Approved by: re (gjb, implicit)


# 258536 24-Nov-2013 cperciva

MFC r258086:
Strip the -pN patch level from the VERSION string which gets encoded into
CTF data. Otherwise FreeBSD Update builds think every kernel file has
changed every time there's a security advisory, since the FreeBSD Update
build code isn't smart enough to look inside CTF data to ignore those
changes.

Approved by: re (gjb)


# 258398 20-Nov-2013 peter

MFC r258283 - move iconv* symbols out of libc.so.7 namespace with
compatibility symbols to aid transition for existing 10.x installs.

Approved by: re (kib)


# 257563 03-Nov-2013 delphij

MFC r257350:

In r257079, SRCDIR is pointed to ${.CURDIR} when not set. However,
Makefile.inc1 is being called in sub-make's where make(1) would,
by default, implicitly chdir(2) to ${.OBJDIR} before executing any
targets. This would make some targets, like delete-old, when trying
to derive various variables introduced by change r256921 using
``make -f Makefile.inc1'' that also rely on SRCDIR to fail.

This changeset adds an explicit cd ${.CURDIR} before these unwrapped
make calls, making them in line with the other ones that are already
being wrapped with the explicit chdir's.

Approved by: re (hrs)


# 257509 01-Nov-2013 gjb

MFC r257329 (nyan):
Fix build, both clang and gcc are required on pc98.

Approved by: re (kib)
Sponsored by: The FreeBSD Foundation


# 257449 31-Oct-2013 brooks

MFC r256915

Stop conflating WITHOUT_CLANG with WITHOUT_CLANG_IS_CC. This allows
bootstrapping a copy of clang without building clang for the base system

which is useful for nanobsd and similar setups. It's still probably
wrong to conflate what is installed as /usr/bin/cc with the selection
of a bootstrap compiler under WITH*_CLANG_IS_CC, but that's for another
day.

Sponsored by: DARPA/AFRL
Approved by: re (gjb)


# 257136 25-Oct-2013 gjb

MFC r257079:
Fix build host pollution by avoiding calling 'uname -srp' to
determine values for 'VERSION'.

Approved by: re (glebius)


# 257053 24-Oct-2013 bdrewery

MFC r256842:

Fix 'make delete-old-libs' and 'make check-libs' to delete .debug
files created by WITH_DEBUG_FILES. Also cleanup .symbols files from
the period between r244236 when .symbols were supported and r251512
when they were renamed to .debug.

Only propose to delete a .debug file if the corresponding library
itself was deleted already.

Approved by: bapt
Approved by: re (glebius)


# 256947 22-Oct-2013 gjb

Revert r256944, which does not quite get the src/ directory correct.

Discussed with: cperciva
Approved by: re (implicit)
Pointyhat: gjb


# 256944 22-Oct-2013 cperciva

MFC r256921:
Thou shalt not leak build host state into the system being compiled.

Approved by: re (gjb)