Commit Graph

1652 Commits

Author SHA1 Message Date
Bryan Drewery
97900b44f6 WITH_SYSTEM_LINKER: Fix rebuilding lld every time.
This is due to LLD_REVISION_STRING being renamed to LLD_REVISION in
r351442 and the value being moved to another location in r351965.

`make test-system-linker` can be used to see the values being used here.

Reported by:	ler
2019-11-19 16:40:46 +00:00
Kyle Evans
f22a592111 Convert in-tree sysent targets to use new makesyscalls.lua
flua is bootstrapped as part of the build for those on older
versions/revisions that don't yet have flua installed. Once upgraded past
r354833, "make sysent" will again naturally work as expected.

Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D21894
2019-11-18 23:28:23 +00:00
John Baldwin
9d919726a0 Refine r354661 to unbreak the GCC_BOOTSTRAP case.
MK_CLANG_IS_CC controls installing links for GCC, not just clang.  Set
MK_CLANG_IS_CC to the value of MK_CLANG_BOOTSTRAP.  This will leave it
as "no" if no bootstrap compiler is being built or GCC 4.2.1 is being
used as the bootstrap compiler, and "yes" if clang is being used as
the bootstrap compiler.

Submitted by:	bdrewery (kind of, he suggested this on IRC while I was
	  		  testing the original patch)
Reviewed by:	kevans, imp
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D22350
2019-11-13 21:49:46 +00:00
John Baldwin
a99d99e5db Force MK_CLANG_IS_CC on in XMAKE.
This ensures that a bootstrap clang compiler is always installed as cc
in WORLDTMP.  If it is only installed as 'clang' then /usr/bin/cc is
used during the build instead of the bootstrap compiler.

Reviewed by:	imp
MFC after:	1 month
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D22332
2019-11-12 21:29:52 +00:00
Ed Maste
c723af1169 suggest xtoolchain package if binutils and GCC bootstraps are both broken
Previously we checked for only BINUTILS_BOOTSTRAP as a broken option
and suggested installing the binutils package.  This was originally done
for arm64 where we used the in-tree Clang with external binutils package.

Add a case to the warning to suggest instead the full xtoolchain package
if we have no in-tree compiler either.

Differential Revision:	https://reviews.freebsd.org/D21851
2019-11-08 14:06:48 +00:00
Brooks Davis
55c2583a16 Revert r354518 and commit the intented fix rather than the diagnostic
check.

This fixes the definition of MK_LIB32 in Makefile.inc1.
2019-11-07 23:54:40 +00:00
Brooks Davis
99519f2120 Fix the ARCH check for LIB32 from Makefile.inc1. 2019-11-07 23:50:33 +00:00
Brooks Davis
a4330302f2 libcompat: build 32-bit rtld and ldd as part of "everything"
Alter bsd.compat.mk to set MACHINE and MACHINE_ARCH when included
directly so MD paths in Makefiles work. In the process centralize
setting them in LIBCOMPATWMAKEENV.

Alter .PATH and CFLAGS settings in work when the Makefile is included.

While here only support LIB32 on supported platforms rather than always
enabling it and requiring users of MK_LIB32 to filter based
TARGET/MACHINE_ARCH.

The net effect of this change is to make Makefile.libcompat only build
compatability libraries.

Changes relative to r354449:

Correct detection of the compiler type when bsd.compat.mk is used
outside Makefile.libcompat.  Previously it always matched the clang
case.

Set LDFLAGS including the linker emulation for mips where -m32 seems to
be insufficent.

Reviewed by:	imp, kib (origional version in r354449)
Obtained from:	CheriBSD (conceptually)
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D22251
2019-11-07 22:58:10 +00:00
Brooks Davis
ccad77fe1e Revert r354449: libcompat: build 32-bit rtld and ldd as part of "everything"
Additional testing is required..
2019-11-07 19:22:51 +00:00
Brooks Davis
36712a9497 libcompat: build 32-bit rtld and ldd as part of "everything"
Alter bsd.compat.mk to set MACHINE and MACHINE_ARCH when included
directly so MD paths in Makefiles work. In the process centralize
setting them in LIBCOMPATWMAKEENV.

Alter .PATH and CFLAGS settings in work when the Makefile is included.

While here only support LIB32 on supported platforms rather than always
enabling it and requiring users of MK_LIB32 to filter based
TARGET/MACHINE_ARCH.

The net effect of this change is to make Makefile.libcompat only build
compatability libraries.

Reviewed by:	imp, kib
Obtained from:	CheriBSD (conceptually)
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D22251
2019-11-07 17:10:33 +00:00
Simon J. Gerraty
17adf17b30 Building head on stable/11 requires libzstd
Add lib/libzstd to _elftoolchain_libs

tools/build/Makefile needs to create the install dir for libzstd
Since this would make the line too long, rework to use a list
in one per line format (easier to add in future)
and dispense with the .for loop

Reviewed by:	emaste bapt
Differential Revision:	https://reviews.freebsd.org/D220134
2019-10-28 20:45:29 +00:00
John Baldwin
4196949c01 Strip "sf" suffix when generating a target triple.
This fixes the target triple used when compiling riscv64sf with clang.

Discussed with:	mhorne
MFC after:	2 weeks
Sponsored by:	DARPA
2019-10-23 16:43:51 +00:00
Ed Maste
dfe76e95ae Additional fix for -DNO_CLEAN build across r353340 and r353381
opensolaris_atomic.S is now only used on i386 with opensolaris_atomic.c
used on other platforms.  After r353381 it doesn't exist on those
platforms so the stale dependency would result in a build error.

r353408 addressed this issue for cddl/lib/libzpool, but it persisted
with the opensolaris and zfs modules.
2019-10-21 18:40:03 +00:00
Andriy Gapon
01a69565d8 buildkernel: always add standard kernel configuration include path
This should change nothing for kernel configurations at the standard
locations in the source tree.  However, if KERNCONFDIR is used to
specify a custom location for a kernel configuration file (e.g., out of
tree), then both the custom location and the standard location, in this
order, will be used as include paths for config(8).  This will allow the
kernel configuration to include files from both locations.

Reviewed by:	bdrewery
MFC after:	16 days
Differential Revision: https://reviews.freebsd.org/D22057
2019-10-19 07:16:20 +00:00
Brooks Davis
5dab131339 Build compat libraries before "everything".
This is required for us to link programs against compat versions of
libraries.

Reviewed by:	bdrewery, jhb
Sponsored by:	DARPA, AFRL
2019-10-15 21:22:13 +00:00
Brooks Davis
ad2dd70b44 Rename top-level LIBCOMPAT to _LIBCOMPAT.
This avoids a conflict with LIBCOMPAT defined in bsd.libnames.mk.

Reviewed by:	bdrewery
Sponsored by:	DARPA, AFRL
2019-10-15 21:11:22 +00:00
Brooks Davis
a1ff92a580 Fix -DNO_CLEAN build across r353340 and r353381
opensolaris_atomic.S is now only used on i386 with opensolaris_atomic.c
used on other platforms.  After r353381 it doesn't exist on those
platforms so the stale dependency would result in a build error.
2019-10-10 16:29:13 +00:00
Dimitry Andric
9122aeeaa6 Merge ^/head r353316 through r353350. 2019-10-09 16:40:22 +00:00
Brooks Davis
0ed89481e1 Allow -DNO_CLEAN build across r352689.
Split the LIBCOMPAT case because the usual egrep only matches in
LIBCOMPAT on amd64.
2019-10-08 20:26:51 +00:00
Dimitry Andric
8b3bc70a2b Merge ^/head r352764 through r353315. 2019-10-08 18:17:02 +00:00
Kyle Evans
c1d4532062 Add a top-level makeman target
Abstracting away the details of how src.conf(5) is generated is arguably a
good thing; do so with a top-level makeman target.
2019-10-01 15:10:35 +00:00
Brooks Davis
f9fd94f534 Update cloudabi(32|64) sysents with "make sysent".
MFC after:	1 week
2019-09-30 21:14:33 +00:00
John Baldwin
c6b00391b3 Disable build of LOCAL_MODULES for cross-builds by default.
WITHOUT_LOCAL_MODULES can be set to disable LOCAL_MODULES for native
builds.  WITH_LOCAL_MODULES can be set to leave it enabled for cross
builds.

This does not use a knob in kern.opts.mk because the options framework
does not currently support options whose default varies on the build
type.  I discussed a few options there with Warner (e.g. maybe having
a tri-state where the default value is "auto" and having Makefile.inc1
apply logic when MK_LOCAL_MODULES is set to "auto"), but Warner ok'd
this approach for now until a better solution is implemented.

Requested by:	many
Reviewed by:	imp (in person at EuroBSDCon)
Differential Revision:	https://reviews.freebsd.org/D21608
2019-09-28 14:20:28 +00:00
Dimitry Andric
668ee10168 Merge ^/head r352587 through r352763. 2019-09-26 18:25:54 +00:00
Kyle Evans
9ccd2fde4c Adjust Makefile.inc1 syscall sub commit 2019-09-25 18:04:09 +00:00
Kyle Evans
3e25d1fb61 Add linux-compatible memfd_create
memfd_create is effectively a SHM_ANON shm_open(2) mapping with optional
CLOEXEC and file sealing support. This is used by some mesa parts, some
linux libs, and qemu can also take advantage of it and uses the sealing to
prevent resizing the region.

This reimplements shm_open in terms of shm_open2(2) at the same time.

shm_open(2) will be moved to COMPAT12 shortly.

Reviewed by:	markj, kib
Differential Revision:	https://reviews.freebsd.org/D21393
2019-09-25 18:03:18 +00:00
Dimitry Andric
f05b9584fa Merge ^/head r352537 through r352586. 2019-09-21 21:02:57 +00:00
Baptiste Daroussin
af3ccc0740 Ensure libthr is always built before libprivatezstd when building the
startup libs

Reported by:	"Galazka, Krzysztof" <krzysztof.galazka@intel.com>
2019-09-20 09:45:38 +00:00
Dimitry Andric
0f80acb965 Merge ^/head r352436 through r352536. 2019-09-19 19:26:12 +00:00
Baptiste Daroussin
d567f909ef Add native support for zstd to libarchive
Note that old pkg will failed to build after this. A recent ports tree (one
providing pkg 1.12+) is required to build. Older already built pkg, should
continue working as expected

PR:		238797
Exp run by:	antoine
Reviewed by:	cem
Approved by:	cem
Differential Revision:	https://reviews.freebsd.org/D20752
2019-09-18 07:57:56 +00:00
Dimitry Andric
84ee6de9ea Always build lldb-tblgen, for now, and add a note. 2019-09-02 17:30:00 +00:00
Dimitry Andric
a32f82c2c1 Update build glue for a build of clang plus lldb (enabled via MK_LLDB). 2019-08-26 21:00:14 +00:00
Antoine Brodin
1321298390 Add head(1) to native-xtools so that it can be used in qemu-user jails 2019-06-20 13:24:58 +00:00
Rene Ladan
0026fec57d Differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases.
Currently APLHA packages are treated as CURRENT or STABLE versions,
resulting in e.g. 13.0.s20190615125609. This version number is indeed
different from the next version number but ALPHA2 would be nicer IMO.

For the BETA, PRERELEASE and RC phases the packages are versioned the
same as for releases, so 11.3-BETA1 is 11.3 and so is 11.3-RC1, meaning
that pkg cannot easiliy upgrade from the former the next. This happened
on my Raspberry Pi which runs pkgbase.

Submitted by:	rene
Approved by:	manu
Event:		Berlin hackathon 2019
Differential Revision:	https://reviews.freebsd.org/D20651
2019-06-16 11:53:22 +00:00
Ed Maste
cbc493c662 Makefile.inc1: clean up stale dependency hacks
Carrying on from r339607, remove ad-hoc dependency cleanup for changes
prior to June 2018.

Sponsored by:	The FreeBSD Foundation
2019-06-04 12:56:20 +00:00
Maxim Sobolev
e1216db508 Rollback the rest of the botched r348521. Re-work would be posted to
reviews. Sorry.

Reported by:	Enji Cooper
2019-06-03 15:34:00 +00:00
Maxim Sobolev
5d280640cd Leave mtree hardcoded for now. Reverting partially 348521 and also
the followup stopgap change, because I don't think it's a correct. I still
need to figure out where to stick it in. In cannot be in Makefile.inc1
and it cannot be in etc/Makefile from the looks of it to avoid
chicken-and-egg problem.
2019-06-03 15:12:44 +00:00
Warner Losh
a88c8ae798 Stopgap fix to breakage from r348521.
MTREE is defined, while MTREE_CMD isn't, use it instead.
This may not be 'right' but it fixes the CI and other issues.

Submitted by: Andreas Nilsson
2019-06-03 14:14:53 +00:00
Maxim Sobolev
5ec57af4b2 Fix several places where tool name has been hardcoded:
install -> ${INSTALL}
    mtree -> ${MTREE_CMD}
    services_mkdb -> ${SERVICES_MKDB_CMD}
    cap_mkdb -> ${CAP_MKDB_CMD}
    pwd_mkdb -> ${PWD_MKDB_CMD}
    kldxref -> ${KLDXREF_CMD}

If you do custom FreeBSD builds you may want to override those
in some cases.

Sponsored by:	Sippy Software, Inc.
2019-06-02 23:38:19 +00:00
Justin Hibbits
78473c580b Update __FreeBSD_version and Makefile check for r348347
libdwarf needs forcibly rebuilt after r348347.
2019-05-29 02:26:15 +00:00
Baptiste Daroussin
7fc5693f49 Change package the MTREEFLAGS and INSTALLFLAGS missed in r348185
Reported by:	lwhsu
2019-05-23 18:55:48 +00:00
Brad Davis
871b6b10ce Move master.passwd and group to lib/libc/gen/
libc was picked as the destination location for these because of the syscalls
that use these files as the lowest level place they are referenced.

Approved by:	will (mentor), rgrimes, manu
Differential Revision:	https://reviews.freebsd.org/D16728
2019-05-16 01:09:13 +00:00
Antoine Brodin
9c8f66cb8b Add wc(1) to native-xtools so that it can be used in qemu-user jails 2019-05-08 15:17:36 +00:00
Emmanuel Vadot
8ae9b1fe96 pkgbase: Use uname as ABI_FILE
Add some more missed in r345159

MFC after:	1 week
2019-03-27 17:55:39 +00:00
Wolfram Schneider
656898ab98 Improve english grammar for kernel built time
PR:		224433
Approved by:	jhb
Differential Revision:	https://reviews.freebsd.org/D19636
2019-03-19 19:58:40 +00:00
Wolfram Schneider
1d3a067e85 `make buildkernel' should display the build time in seconds
PR:		224433
Approved by:	cem
Differential Revision:	https://reviews.freebsd.org/D13910
2019-03-16 20:02:57 +00:00
Emmanuel Vadot
08df8f82b8 pkgbase: Use uname as ABI_FILE
uname is always rebuild on FreeBSD so use this as ABI_FILE for pkg when
building pkg for pkgbase.
pkg uses uname too as default ABI_FILE as of commit d8bbf980b7f6f424fb7cc672c23ab2dfc82b6599
d8bbf980b7

Discussed with:	bapt
MFC after:	1 week
2019-03-14 22:08:09 +00:00
Wolfram Schneider
328dcc68a6 `make buildworld' should display the build time in seconds
PR:		224433
Reviewed by:	emaste, @bdrewery
Approved by:	cem
Differential Revision: https://reviews.freebsd.org/D13911
2019-03-12 07:40:38 +00:00
Mateusz Guzik
92dec625e3 Remove iBCS2: plug a wart missed in r342242
Sponsored by:	The FreeBSD Foundation
2018-12-19 22:08:51 +00:00
Ed Maste
466ed83b6c Makefile.inc1: update stale wpa dependency removal statement
Only stale .depend files are removed; do not mention object files.
2018-12-12 15:23:40 +00:00
Ed Maste
457e6311ad Clean stale wpa dependencies and objects after r341759
The wpa update added some source files with the same name as a file in
another directory (found via .PATH in the previous version).  Having a
stale entry in a .depend file means the new file won't be built, so test
for this case and if found remove all of wpa's dependency files.

MFC with:	r341759
Sponsored by:	The FreeBSD Foundation
2018-12-10 14:50:11 +00:00
Alex Richardson
c10d927c40 Fix newvers.sh with BUILD_WITH_STRICT_TMPPATH=1
newvers.sh runs mkfifo which did not exist before this change.
However, I didn't notice before because it is run from a function
where a missing command does cause a noticeable failure.

Reviewed By:	emaste, markj
Differential Revision: https://reviews.freebsd.org/D18377
2018-12-05 10:57:57 +00:00
Andrew Turner
7dc61ac11f Only gnu/lib/csu when MK_BSD_CRTBEGIN is off.
We were still building it from Makefile.inc1. Disable it there so we don't
try to build the GNU crtbegin/crtend when the BSD version was asked for.

PR:		233733
Reported by:	lwhsu
Reviewed by:	emaste
MFC with:	r339738
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D18428
2018-12-04 18:51:28 +00:00
Alex Richardson
6edf284675 Fix -DNO_CLEAN amd64 build after r340463
Without this change I got the following error:
clang-7: error: no such file or directory: '..../lib/libc/amd64/string/bzero.S'

Reviewed By:	mjg
Differential Revision: https://reviews.freebsd.org/D18031
2018-11-18 19:55:03 +00:00
Glen Barber
8643808a68 In followup to r340406, remove doc from the EXTRA_DISTRIBUTIONS
list and remaining references from the script used to create the
MANIFEST file used by bsdinstall(8).

No MFC is planned at this time.

Sponsored by:	The FreeBSD Foundation
2018-11-13 19:53:02 +00:00
Brooks Davis
0a9fcf3237 Add a top-level make target to rebuild all sysent files.
The sysent target is useful when changing makesyscalls.sh, when
making paired changes to syscalls.master files, or in a future where
freebsd32 sysent entries are built from the default syscalls.master.

Reviewed by:	bdrewery
Obtained from:	CheriBSD
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D17899
2018-11-08 00:35:00 +00:00
Alex Richardson
cd6b0f0ea5 Turn off BUILD_WITH_STRICT_TMPPATH by default
Building with a strict $PATH (without inheriting from the parent
environment) still causes build failures in some workflows/environemnts
that I have not yet tested.
I will try to bring this back once these issues have all been resolved
since it is actually extremely useful in tracking broken dependencies
and wrong assumptions about the build environemt.

Discussed With:	brooks
2018-11-06 18:06:52 +00:00
Alex Richardson
4805dd68d6 Remove btxld from symlinked host tools
It is only present on amd64/i386 systems which breaks buildworld on
other hosts. In fact there is no need to add it to the bootstrap tools
list since it is already included in the cross-tools phase.
However, for cross-tools it was only built if the host and target
architecture didn't match. After this change it is also built when we
are builtin with a strict $PATH.

Reported By:	mmel
2018-11-06 09:36:59 +00:00
Alex Richardson
d3384db33c Keep inheriting $PATH when using system linker/compiler
I missed this case when testing r340157. For now just keep
$PATH when we aren't bootstrapping a compiler so that the build
can find cc/c++/ld without an absolute path.

Reported by:	yuripv
2018-11-05 22:51:44 +00:00
Alex Richardson
6806504da4 Build the elftoolchain libraries as part of bootstrap-tools
It is not necessary to build libelf and libdwarf this early. Furthermore,
when building on Linux/MacOS, m4 will only be built during the bootstrap
tools phase and not be available in $PATH before.

Reviewed By:	emaste
Approved By:	brooks (mentor)
Differential Revision: https://reviews.freebsd.org/D17800
2018-11-05 19:51:16 +00:00
Alex Richardson
8f62bca488 Allow building world without inheriting $PATH
Inheriting $PATH during the build phase can cause the build to fail when
compiling on a different system due to missing build tools or incompatible
versions somewhere in $PATH. This has cause build failures for us before
due to the jenkins slaves still running FreeBSD 10.
Listing the tools we depend on explicitly instead of just using whatever
happens to be in $PATH allows us to check that we don't accidentally add a
new build dependency.

All tools that do no need to be bootstrapped will now be symlinked to
${WORLDTMP}/legacy/bin and during the build phase $PATH will only contain
${WORLDTMP}. There is also a new variable "BOOTSTRAP_ALL_TOOLS" which can
be set to force compiling almost all bootstrap tools instead of symlinking
them. This will not bootstrap tools such as cp,mv, etc. since they may be
used during the build and for those we should really only be using POSIX
compatible options.

Furthermore, this change is required in order to be able to build on
non-FreeBSD hosts. While the same binaries may exist on Linux/MacOS they
often accept different flags or produce incompatible output.

Approved By:	brooks (mentor)
Differential Revision: https://reviews.freebsd.org/D16815
2018-11-05 19:51:10 +00:00
Ed Maste
9117dffc3c Avoid binutils test in cleandir/obj stages
Further to r339946 skip the .error case for lack of in-tree binutils
support when we haven't set the toolchain feature variables.

Discussed with:	arichardson
Sponsored by:	The FreeBSD Foundation
2018-10-31 18:08:12 +00:00
Alex Richardson
d6be9fdde5 Don't run cc --version during cleandir/obj stages
This will no work when there is no cc in $PATH (which is the case before the
cross-tools stage once we no longer inherit $PATH in $WMAKE).
The variables set by bsd.compiler.mk/bsd.linker.mk are not needed in these
stages so this avoids a little bit of makefile parsing.

Reviewed By:	emaste
Approved By:	jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D16814
2018-10-31 10:45:28 +00:00
Ed Maste
f4cbc81dd8 Update elftoolchain bootstrapping test after r339083
Sponsored by:	The FreeBSD Foundation
2018-10-26 01:13:20 +00:00
Ed Maste
5acedb55c0 sort {delete,check}-old* output
It is more convenient to review old libraries, files, and directories
in order.

Sort check-* after checking for existence of files for efficiency, and
because /usr/lib/debug entries are added while iterating over the list.

Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17649
2018-10-23 13:00:11 +00:00
Alex Richardson
74f6548619 Only compute the X_COMPILER_*/X_LINKER_* variables when needed
When building CheriBSD we have to set XLD/XCC/XCFLAGS on the command line.
This triggers the $XCC != $CC case in bsd.compiler.mk (and the same for LD
in bsd.linker.mk) which causes it to call ${XCC} --version and
${XLD} --version (plus various awk+sed+echo calls) in every subdirectory.
For incremental builds and stages that only walk the source tree this is
often the majority of the time spent in that directory.

By only computing the value of the X_COMPILER_*/X_LINKER_* variables if
_WANT_TOOLCHAIN_CROSS_VARS is set we can reduce the number of cc/ld calls
to once per build stage instead of once per recursive make.

With this change (and no changes to the sources) the `make includes` stage
now takes 28 seconds at -j1 instead of 86 seconds.

Approved By:	brooks (mentor)
Differential Revision: https://reviews.freebsd.org/D17046
2018-10-23 06:31:25 +00:00
Ed Maste
730a7ce9d6 Makefile.inc1: clean up stale dependency hacks
Our dependency tracking cannot directly cope with certain source tree
changes, particularly with respect to removing or moving source files or
replacing generated files.  We have a collection of ad-hoc workarounds
to handle these cases.  As there is a (small) build-time cost inherent
in these workarounds, we do not want to keep them indefinitely.  Thus,
remove workarounds from 2017.

Sponsored by:	The FreeBSD Foundation
2018-10-22 18:40:21 +00:00
Ed Maste
fc191b1111 Introduce src.conf knob to build userland with retpoline
WITH_RETPOLINE enables -mretpoline vulnerability mitigation in userland
for CVE-2017-5715.

Reported by:	Peter Malcom
Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17421
2018-10-21 00:27:59 +00:00
Glen Barber
b958317950 - Update head to 13.0-CURRENT.
- Bump MACHINE_TRIPLE, TARGET_TRIPLE, FBSD_MAJOR, FBSD_CC_VER,
  FREEBSD_CC_VERSION, OS_VERSION.
- Update comment in UPDATING regarding debugging options.
- Remove debug.witness.trace=0 from installation media.
- Bump __FreeBSD_version.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-10-19 00:37:47 +00:00
Ed Maste
bfe5c1dcd4 Makefile.inc1: clean up dependencies after r339348
r339348 switched bcopy from .s to .c.  Add ad-hoc dependency cleanup
as done for similar cases.

Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
2018-10-14 00:29:57 +00:00
Dag-Erling Smørgrav
e4a41be544 Replace libldns's bootstrap dependency on libcrypto with one on libssl
(which in turn has a bootstrap dependency on libcrypto).

Submitted by:	jkim
Approved by:	re (gjb)
2018-10-12 13:01:17 +00:00
Dag-Erling Smørgrav
d97bf51914 Move libssl up in the bootstrap order.
Submitted by:	jkim
Approved by:	re (gjb)
2018-10-12 05:42:38 +00:00
Ed Maste
539a27e105 Switch ntp's embedded libevent to 2.1.18
For OpenSSL 1.1.1 compatibility.

In Makefile.inc1 add (to the existing similar cases) a hack to handle
dependencies across the migration.

Reviewed by:	jhb
Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation.
Differential Revision:	https://reviews.freebsd.org/D17481
2018-10-09 18:35:45 +00:00
John Baldwin
0c0c965a8f Re-enable kernel modules for the MALTA64EL kernel configuration.
Update the BOOTSTRAPPING check for libelf to require the fix for
mips64el object files committed in r338478 and re-enable kernel
modules in the MALTA64EL config file.

Reviewed by:	emaste
Approved by:	re (gjb)
Differential Revision:	https://reviews.freebsd.org/D17054
2018-09-06 19:21:31 +00:00
Li-Wen Hsu
26ffc1ab46 Fix 'install: symlink usr/src/sys -> /sys: File exists' in distributeworld
Follow r334617, specify ${DISTDIR} (by ${INSTALL_DDIR}), '/base' and add
${INSTALLFLAGS} while installing the '/sys' symbolic link.

Reviewed by:	bapt (earlier version), markj
Approved by:	re (gjb), markj (mentor)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D16877
2018-08-28 23:56:52 +00:00
Alex Richardson
c97e51679b Only bootstrap localedef if ${MK_LOCALES} != "no"
During the build it is only used by share/ctypedef and share/colldef
which will not be built if ${MK_LOCALE} == "no". This saves a tiny bit
of time when building without locales.

Approved By:	jhb (mentor)
2018-08-23 18:19:21 +00:00
Alex Richardson
4acc8a67ba Don't create directories in ${WORLDTMP}/legacy with mtree
This has two advantages:
1) We no longer create lots of empty directories that are not needed
2) This is a requirement for building on non-FreeBSD hosts since mtree will
only exist after the bootstrap-tools phase there.

Aproved By:	jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D16773
2018-08-20 10:39:53 +00:00
Kyle Evans
7920ad944b libbe(3): Move build goop back out of cddl/
Some background: in the GSoC project, libbe/Makefile lived in lib/libbe. I
created projects/bectl branch, maintained the above for all of five
minutes before I misread Makefile.inc1 and decided that it couldn't possibly
build outside of cddl/, so I kicked the Makefile out into the cddl/ build
and all was good. The misreading was of the bit where .WAIT is added to
SUBDIR after lib, libexec but prior to building bin and cddl *only during
the install targets*, which is the critical part.

Fast forward- buildworld was still broken in my branch unbeknownst to me
because I didn't nuke my OBJDIR. Combing through Makefile.inc1 eventually
revealed the necessary magic to make sure that libbe's dependencies are
specified well enough, and it becomes clear what needs done to make a
non-cddl/ build work. This is an interesting prospect, because the build
split is kind of annoying to work with.

IGNORE_PRAGMA is added to avoid dropping WARNS by one more. This was
previously pulled in via cddl/Makefile.inc.
2018-08-18 03:20:59 +00:00
Bjoern A. Zeeb
49f1692a3b METALOG, unless manually overwritten, is defined as ${DESTDIR}/${DISTDIR}/METALOG
In the create-world-packages target we manually piece this together (unless
it is undefined), without the DISTDIR.  Normally DISTDIR is empty (unset) and
no one notices.  Now DISTDIR is a well known long-standing PORTS environment
variable and if that is set in the local environment the path to METALOG
is wrong as it no longer is ${DESTDIR}/METALOG.

Long-term we should start to avoid "publicly well known" names for global
variables, for now just piece ${DISTDIR} in as well.  This allows
create-world-packages to continue if DISTDIR is set in the env.
2018-08-17 21:19:18 +00:00
Roger Pau Monné
2502c66bbd build: skip the database check when generating install media
There are several scripts and targets solely used to generate install
media, make sure DB_FROM_SRC is used in that case in order to prevent
checking the host database, which is irrelevant when generating
install binaries.

Sponsored by:		Citrix Systems R&D
PR:			230459
Reviewed by:		gjb
Differential revision:	https://reviews.freebsd.org/D16638
2018-08-17 07:27:15 +00:00
Kyle Evans
35d2028fb8 libbe(3)/bectl(8): More SYSROOT/GCC build fixes
- Missing include path
- Fully specify libzfs's dependencies (except for deps pulled in by other
  deps) in Makefile.inc1
- Drop WARNS back down to 2 for libbe(3). I do this with much hesitation,
  but the libzfs headers are apparently a hot warning-filled mess as far as
  GCC 4.2 is concerned.
2018-08-11 22:45:39 +00:00
Kyle Evans
f335e41b17 Add libzfs to prebuild_libs, libbe dependency on libzfs 2018-08-11 20:32:50 +00:00
Kyle Evans
2b720021aa Makefile.inc1: Add libl to -legacy as well
libl is needed for config(8), which is a bootstrap-tool. It is possible to
build a system WITHOUT_TOOLCHAIN to exclude lex and thus, libl. We still
need to support building from this kind of host, though.

While here, group the config(8) dependencies together and add a small
explanation. These can likely both be scoped more clearly, but this will
need some further investigation.

Reported by:	rgrimes (not WITHOUT_TOOLCHAIN, but provoked investigation)
MFC after:	immediately
2018-08-10 00:10:57 +00:00
Roger Pau Monné
d0f408fab9 build: skip the database check for the distributeworld target
distributeworld is used to generate install media, so it makes no
sense to check the host database since the install media can be
generated from any box, regardless of the version of FreeBSD it's
running.

Sponsored by:		Citrix Systems R&D
Reviewed by:		ian, gjb
Differential revision:	https://reviews.freebsd.org/D16507
2018-08-08 07:58:29 +00:00
Ian Lepore
9898e6dff2 Alpha-sort the list of user/group IDs to check at install time. 2018-07-22 16:51:11 +00:00
Ian Lepore
fd46d8a8c6 Remove the .if ${MK_FOO} wrappers around the user/group ID checks. These
names are referenced in mtree files without any conditional logic, so the
users/groups must exist even if the corresponding tool(s) are disabled.
2018-07-22 16:42:22 +00:00
Ian Lepore
07b9533326 Add ntpd to the list of users/groups to check before installing. 2018-07-20 00:44:04 +00:00
Warner Losh
8b6b96c93d As discussed several times on freebsd-arch, start to decommission armeb.
Remove armeb/arm from KNOWN_ARCHS.
Remove armeb from arm universe targets.

Differential Revision:	https://reviews.freebsd.org/D16257
2018-07-17 23:23:34 +00:00
Kyle Evans
44a83ae3ae Unconditionally build libnv in legacy
Rather than using a config(8) built from new tree linking libnv built on
host.
2018-07-16 13:14:53 +00:00
Bryan Drewery
0d26206d04 Fix parsing of create-kernel-packages
MFC after:	3 days
Reported by:	rene
2018-07-10 21:20:49 +00:00
Kyle Evans
88171893e2 config(8): De-dupe hint/env vars within a single file
r335653 flipped the order in which hints/env files are concatenated to match
the order in which vars are processed by the kernel. This is the other
hammer to drop.

Use nv(9) to de-dupe entries within a single `hint` or `env` file, using the
latest value specified for a key. This leaves some duplicates if a variable
is specified in multiple hint/env files or via `envvar` in a kernel config,
but the reversed order of concatenation (from r335653) makes this a
non-issue as the latest-specified version will be seen first.

This change also silently rewrote hint bits to use the same sanitization
process that ian@ wrote for r335642. To the kernel, hints and env vars are
basically the same thing through early boot, then get merged into the
dynamic environment once kmem becomes available and the dynamic environment
is created. They should be subjected to the same restrictions.

libnv has been added to -legacy for the time being to support the build of
config(8) with the new cnvlist API.

Tested with:	universe (11 host & 12 host)
MFC after:	1 month
2018-07-06 01:11:06 +00:00
Kyle Evans
417d105fae Revert r336011,r336012 until I can competently test 2018-07-05 18:55:42 +00:00
Kyle Evans
f1e0a986a8 Fix build after r336011
Add libnv to bootstrap-tools, use ${SRCTOP}/sys headers.
2018-07-05 18:39:02 +00:00
Wolfram Schneider
d0338de5ca `make installworld' should display "completed" message if done
PR:             225159
Reviewed by:    bdrewery
Approved by:    cem (mentor)
Differential Revision:  https://reviews.freebsd.org/D14057
2018-07-01 10:05:45 +00:00
Bryan Drewery
2e90942fa6 META_MODE: Fix clang-tblgen flip-flop building after r335707.
The build of this would have MK_LLVM_TARGET_ALL=yes for bootstrap-tools
but MK_LLVM_TARGET_ALL=no for cross-tools and thus would rebuild between
the two.

MFC after:	2 weeks
X-MFC-with:	r335707
Sponsored by:	Dell EMC
2018-06-30 19:36:02 +00:00
Alex Richardson
55a5b46aff Don't change directory owner to root when building with -DNO_ROOT
Currently the mtree calls in Makefile.inc1 all change the directory owner
to match the spec file. However, we should not be doing this during
distributeworld if -DNO_ROOT is passed. Additionally, when creating the
WORLDTMP directory hierachy there is no need to change the owner to root so
we now always pass the -W flag when populating WORLDTMP.

This is also required for building FreeBSD on Linux/Mac since the required
groups/users will not exist there which is how I discovered this issue.

Reviewed By:	emaste, bdrewery, imp
Approved By:	brooks (mentor)
Differential Revision: https://reviews.freebsd.org/D14185
2018-06-29 21:15:26 +00:00
Bryan Drewery
8706983ff6 Fix unknown target check after r335450.
X-MFC-with:	r335450
Pointyhat to:	bdrewery
Sponsored by:	Dell EMC
2018-06-28 22:24:16 +00:00
John Baldwin
151578dc5f Remove the various build flag hacks for GCC cross-compile.
The xtoolchain GCC packages have not required these flags since ports
commits r465416 and r466701.  The in-tree GCC 4.2.1 has also been patched
in r335716 and r335717 to correctly honor --sysroot when looking for
includes and libraries.

Reviewed by:	bdrewery
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D16055
2018-06-28 21:26:14 +00:00
Bryan Drewery
52b7824bde SYSTEM_COMPILER/LINKER: Fix cross-build support after r335706.
X-MFC-With:	r335706
MFC after:	2 weeks
Sponsored by:	Dell EMC
2018-06-28 19:01:53 +00:00
Brad Davis
f59e535254 Simplify using bsd.endian.mk and have it provide CAP_MKDB_ENDIAN, since it is
the most common usage.

Approved by:	bapt (mentor)
2018-06-28 13:48:59 +00:00