Commit Graph

1587 Commits

Author SHA1 Message Date
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