Commit Graph

17603 Commits

Author SHA1 Message Date
Bryan Drewery
9c8b82a95f WITH_SYSTEM_COMPILER: Disable with WITH_META_MODE for now.
The WITH_META_MODE build is intended to be a working incremental build.
It spies on the build command to see if things should be rebuilt if the
command changes.  If you run buildworld, it builds a cross-compiler,
then do installworld and buildworld again it will invoke the
WITH_SYSTEM_COMPILER logic.  This then adds on -target/--sysroot, etc,
and causes rebuilds due to the changed build command even though the
compiler used is technically the same revision.  Since the incremental
build is not cleaning anything by default then there is much
less risk to rebuilding the already-existing cross-compiler.  Just
disable the combined logic and always use and build the cross-compiler.

An alternative to this would be to always pass -target/--sysroot.  Doing
so may occur in the future.

Sponsored by:	EMC / Isilon Storage Division
2016-06-05 23:05:04 +00:00
Bryan Drewery
7f17cd1c8d WITH_META_MODE: Avoid host tool timestamps causing a rebuild.
Using buildworld, installworld, buildworld.  It is expected that nothing
should rebuild.  However any host tool used could have its timestamp
updated.  Any library used by dynamic tools could have its timestamp
updated.  The filemon(4) data in the .meta files captures all reads to
these files.  This causes the 2nd buildworld to rebuild everything since
host tools and files have been updated.

Because the build is self-reliant and bootstraps itself, it should be
safe to ignore mtime changes on host files used during the build.  Host
files should only impact the build of legacy, build-tools, bootstrap-tools,
cross-tools, but those are already intended to be reproducible from its
own bootstrapping.  It is possible in a rare case that a bug in a host
file does produce a broken build tool.  If that happens it will just
have to be communicated properly.

An alternative solution would be to update the mtime of all files in the
object directory after installworld so that the host files are not newer
than the object files.  That also requires special care for read-only
obj directories and special care to not mess with any intended timestamps in
the build, such as done for reproducibility.

Reported by:	many
Sponsored by:	EMC / Isilon Storage Division
2016-06-05 23:05:01 +00:00
Bryan Drewery
3681768c3f WITH_META_MODE: Enable bmake's missing meta rebuild feature 2016-06-05 23:04:42 +00:00
Bryan Drewery
96306ff24d Import latest meta.stage.mk 1.45 (r301462) 2016-06-05 21:21:41 +00:00
Landon J. Fuller
5748426280 Update my e-mail address (and fix related typo in siba.4)
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D6714
2016-06-04 19:00:11 +00:00
Bryan Drewery
987c375f87 WITH_META_MODE: Avoid "building" .depend if there is nothing to do.
This avoids 'Building /path/.depend' when it will not actually produce a
file.

Sponsored by:	EMC / Isilon Storage Division
2016-06-03 21:35:19 +00:00
Bryan Drewery
6c24213e61 WITH_CCACHE_BUILD + WITH_META_MODE: Ignore ccache changes.
Ccache will not affect the output of the objects, so just ignore it for
meta mode handling.  This avoids having everything rebuild if ccache is
updated.

Sponsored by:	EMC / Isilon Storage Division
2016-06-03 19:25:45 +00:00
Bryan Drewery
92edc96667 WITH_META_MODE: Don't expect meta files for side-effect generated files.
The first file in these lists will generate everything else so only
it should be getting a .meta file.  With bmake's missing=yes meta
feature these would otherwise cause a rebuild without the
.NOMETA hint.

Sponsored by:	EMC / Isilon Storage Division
2016-06-03 19:25:41 +00:00
Bryan Drewery
5852ae2d99 Revert r301079.
This breaks cross-building with WITH_META_MODE since it will rebuild
'build-tools' during the 'everything' phase.

A more proper fix is coming to bmake to implicitly require .META unless
.NOMETA (and other restrictions) are in place.
2016-06-03 19:25:36 +00:00
Eric van Gyzen
28e3357884 Improve errno documentation in pthread_create(3) and thr_new(2)
Add some missing errno values to thr_new(2) and pthread_create(3).
In particular, EDEADLK was not documented in the latter.
While I'm here, improve some English and cross-references.

Reviewed by:	kib
Sponsored by:	Dell Inc.
Differential Revision:	https://reviews.freebsd.org/D6663
2016-06-03 14:30:32 +00:00
Bjoern A. Zeeb
484149def8 Introduce a per-VNET flag to enable/disable netisr prcessing on that VNET.
Add accessor functions to toggle the state per VNET.
The base system (vnet0) will always enable itself with the normal
registration. We will share the registered protocol handlers in all
VNETs minimising duplication and management.
Upon disabling netisr processing for a VNET drain the netisr queue from
packets for that VNET.

Update netisr consumers to (de)register on a per-VNET start/teardown using
VNET_SYS(UN)INIT functionality.

The change should be transparent for non-VIMAGE kernels.

Reviewed by:	gnn (, hiren)
Obtained from:	projects/vnet
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6691
2016-06-03 13:57:10 +00:00
Kurt Lidl
95856e1457 Add basic blacklist build support
Reviewed by:	rpaulo
Approved by:	rpaulo
Relnotes:	YES
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5913
2016-06-02 19:06:04 +00:00
Landon J. Fuller
8e5675eda7 Add myself as src commiter.
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D6686
2016-06-01 23:20:32 +00:00
Mark Johnston
4a07671ebd Remove the BUGS entry in memguard's man page.
UMA refcounting is gone as of r296243, so this bug no longer exists. In
particular, it's now possible to guard mbuf clusters with memguard.
2016-06-01 22:34:21 +00:00
Glen Barber
ea580d0b45 Revert r301137 and r301163, and implement a correct fix
for the CONFS issue with dma.conf and ppp.conf.

Thank you very much to Bryan Drewery for looking into the
problem and providing this fix.

Pointyhat:	gjb
Sponsored by:	The FreeBSD Foundation
2016-06-01 20:44:28 +00:00
Mariusz Zaborski
dc3be4f872 Fix the library name.
Reviewed by:	bdrewery
2016-06-01 19:54:17 +00:00
Bjoern A. Zeeb
3f58662dd9 The pr_destroy field does not allow us to run the teardown code in a
specific order.  VNET_SYSUNINITs however are doing exactly that.
Thus remove the VIMAGE conditional field from the domain(9) protosw
structure and replace it with VNET_SYSUNINITs.
This also allows us to change some order and to make the teardown functions
file local static.
Also convert divert(4) as it uses the same mechanism ip(4) and ip6(4) use
internally.

Slightly reshuffle the SI_SUB_* fields in kernel.h and add a new ones, e.g.,
for pfil consumers (firewalls), partially for this commit and for others
to come.

Reviewed by:		gnn, tuexen (sctp), jhb (kernel.h)
Obtained from:		projects/vnet
MFC after:		2 weeks
X-MFC:			do not remove pr_destroy
Sponsored by:		The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6652
2016-06-01 10:14:04 +00:00
Bryan Drewery
2dcffa9cb7 WITH_META_MODE: Resolve SYSDIR to avoid changed build commands.
Sponsored by:	EMC / Isilon Storage Division
2016-05-31 23:08:43 +00:00
Bryan Drewery
c89283ce26 WITH_META_MODE: Require filemon(4) be loaded.
Since META_MODE is being sold and used as a working incremental build, it won't
make much sense if filemon data is excluded.  There is no way to recover
from that in a subsequent build.

Sponsored by:	EMC / Isilon Storage Division
2016-05-31 22:37:11 +00:00
Bryan Drewery
28849c57d6 WITH_META_MODE: Mitigate switching from without to with META_MODE.
Adding .META to targets-to-build will ensure that they will rebuild if there
is no .meta file.

Adding it to all SUFFIXES and objects ensures that at least objects will
rebuild if there is no .meta file.

This will be reverted if bmake's behavior changes to rebuild on missing .meta
files.

Sponsored by:	EMC / Isilon Storage Division
2016-05-31 21:22:19 +00:00
Jilles Tjoelker
631e4e3abe Remove mentions that PTHREAD_PROCESS_SHARED is not supported from man pages.
Also add support for process-shared synchronization objects to the HISTORY
sections where they already exist.
2016-05-31 21:16:34 +00:00
Jilles Tjoelker
a8aad86462 Fix typo ESRC -> ESRCH in pthread man pages. 2016-05-31 21:09:42 +00:00
Remko Lodder
0393e22f73 Update the Security Team member list with the actual
members.

Discussed with:	glebius
2016-05-31 17:23:27 +00:00
Rene Ladan
7c8a79a8a8 share/misc/organization.dot: list myself as the new portmgr-secretary 2016-05-30 19:30:41 +00:00
Baptiste Daroussin
e936bb40df Regenerate timedef:
For Russian:
- Convert AM/PM which are badly formatted in CLDR to replace it by the proper
  cyrillic
- Add a dependency on Text::Iconv so non unicode get the proper encoding for
  AM/PM
- fix the date format having 'r.,' and convert it to 'r.' (also fixed in Bulgarian)

For All:
- Use complete Day of Week instead of the abbreviated one

Reported by:	ache
2016-05-29 22:28:39 +00:00
Jilles Tjoelker
60404ec965 Remove non-history libkse references and fix PTHREAD_PROCESSES_PRIVATE typo. 2016-05-29 18:25:11 +00:00
Bryan Drewery
f661dbee81 GCC External: Revert r300886, r300904, r300917, r300918
The fix in r300873 is mostly enough.  A fix for lib32 will be
committed.separately.
2016-05-29 06:20:15 +00:00
Bryan Drewery
727dd78afa External GCC: Ensure our libstdc++ symlink to libc++ is found.
Similar to r300917, the search path for our symlink hack must come
before the =/usr/lib search path.

This fixes the atf-check build after r300886.
2016-05-29 00:10:23 +00:00
Bryan Drewery
c3c4167236 GCC XCC -isystem hack: Ensure CXX search =/usr/include/c++1/v1 first.
The C++ header files must be searched before /usr/include.

The original code in Makefile.inc1 did this before the change in r297271 to
use -isystem.  The libc++ import in r300770 fixed the bug introduced in
r297271 by swapping XCFLAGS and XCXXFLAGS ordering in CROSSENV.

Moving the code from Makefile.inc1 to bsd.sys.mk in r300886 also made it
more difficult to control the order of the flags.  CXXFLAGS is based on
CFLAGS, so any additions to it will come after CFLAGS.  The CROSSENV
code from Makefile.inc1 was such that it was ensured the CXXFLAGS came
first by setting them directly in CXX.  Using CXXFLAGS+=-I would work
here, but instead continue to use -isystem by adding it to CXX so it
comes before CFLAGS.

Reported by:	dim
2016-05-28 23:10:07 +00:00
Baptiste Daroussin
ee972428cd Readd week day to default dates
Requested by:	many
2016-05-28 21:26:50 +00:00
Alan Somers
7a0c41d5d7 zfsd(8), the ZFS fault management daemon
Add zfsd, which deals with hard drive faults in ZFS pools. It manages
hotspares and replements in drive slots that publish physical paths.

cddl/usr.sbin/zfsd
	Add zfsd(8) and its unit tests

cddl/usr.sbin/Makefile
	Add zfsd to the build

lib/libdevdctl
	A C++ library that helps devd clients process events

lib/Makefile
share/mk/bsd.libnames.mk
share/mk/src.libnames.mk
	Add libdevdctl to the build. It's a private library, unusable by
	out-of-tree software.

etc/defaults/rc.conf
	By default, set zfsd_enable to NO

etc/mtree/BSD.include.dist
	Add a directory for libdevdctl's include files

etc/mtree/BSD.tests.dist
	Add a directory for zfsd's unit tests

etc/mtree/BSD.var.dist
	Add /var/db/zfsd/cases, where zfsd stores case files while it's shut
	down.

etc/rc.d/Makefile
etc/rc.d/zfsd
	Add zfsd's rc script

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
	Fix the resource.fs.zfs.statechange message. It had a number of
	problems:

	It was only being emitted on a transition to the HEALTHY state.
	That made it impossible for zfsd to take actions based on drives
	getting sicker.

	It compared the new state to vdev_prevstate, which is the state that
	the vdev had the last time it was opened.  That doesn't make sense,
	because a vdev can change state multiple times without being
	reopened.

	vdev_set_state contains logic that will change the device's new
	state based on various conditions.  However, the statechange event
	was being posted _before_ that logic took effect.  Now it's being
	posted after.

Submitted by:	gibbs, asomers, mav, allanjude
Reviewed by:	mav, delphij
Relnotes:	yes
Sponsored by:	Spectra Logic Corp, iX Systems
Differential Revision:	https://reviews.freebsd.org/D6564
2016-05-28 17:43:40 +00:00
Bryan Drewery
26816d3384 Always export X_* vars.
This fixes CROSS_TOOLCHAIN builds after r300886 since it
relies on X_COMPILER_TYPE being set.

The X_* vars will only represent the external compiler
being used.

Sponsored by:	EMC / Isilon Storage Division
2016-05-28 16:21:05 +00:00
Bryan Drewery
ce00342bb2 Move external GCC compiler hacks to bsd.sys.mk.
This allows respecting -nostdinc, -nostdinc++ and -nostdlib before
making the decision to add in -isystem, etc.  The -isystem flags
are problematic for building lib/libc++ and lib/libcxxrt which wants
to only use its own headers.

More information the need of these flags can be found at
https://gcc.gnu.org/ml/gcc/2016-03/msg00219.html

This also reverts r300873.

Sponsored by:	EMC / Isilon Storage Division
2016-05-27 23:03:44 +00:00
Dru Lavigne
23413065d4 Remove duplicate sentence from pfsync.8.
PR: 209539
Submitted by: olivier@
Reviewed by: timmoore88@gmail.com
Sponsored by: iXsystems
2016-05-27 18:52:58 +00:00
Bryan Drewery
38f6966b70 DIRDEPS_BUILD: Fix and hookup rescue/rescue to the build.
Sponsored by:	EMC / Isilon Storage Division
2016-05-26 23:20:40 +00:00
Bryan Drewery
eb9b07bb77 WITH_AUTO_OBJ: Fix crunchgen builds.
Passing MAKEOBJDIRPREFIX to the main prog build (rescue) would confuse
WITH_AUTO_OBJ and cause it to create a recursed object directory that
then broke the actual prog build.  This is normally not a problem since
we do not call 'make -f prog.mk obj' before building anything in it.

Crunchgen(1) also assumes that if -o is not passed then if an object
directory does not already exist then it should build in the source
directories.  The normal buildworld process will have already ran 'make
obj' in each of the component directories so this is not a problem.
With WITH_AUTO_OBJ though this is not the case.  So we must tell
crunchgen(1) that MK_AUTO_OBJ=yes will create the directory and to not
require it be present before generating its Makefile.

Sponsored by:	EMC / Isilon Storage Division
2016-05-26 23:20:36 +00:00
Bryan Drewery
b3d8f67703 Don't strip paths away from META_XTRAS.
This would otherwise disallow using meta files from a foreign build that
spread them around in directories outside our own .OBJDIR.

Sponsored by:	EMC / Isilon Storage Division
2016-05-26 23:20:33 +00:00
Bryan Drewery
8ab3985652 Avoid redundant 'make objs' tree-walk when building the main prog.
The main prog has a dependency on the submake targets to ensure they are
built.  From bsd.crunchgen.mk though we already have our own dependency
on 'make objs' so there is no need for another one.  Crunchgen(1) is
doing the right thing here so it is not modified.

This also prevents the CC fix tainting the submake environment with
META_MODE and causing rebuilds.  The CC passed is is only intended for
the main prog itself.

Sponsored by:	EMC / Isilon Storage Division
2016-05-26 23:20:30 +00:00
Bryan Drewery
ec02e5e3ba Pass CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS to the main crunch exec build.
This fixes --sysroot and other CFLAGS/LDFLAGS not being respected
in the crunchgen build since it is not including bsd.sys.mk and
other files.  For example, this fixes building rescue itself without
--sysroot and other CFLAGS.

Sponsored by:	EMC / Isilon Storage Division
2016-05-26 23:20:27 +00:00
Bryan Drewery
a13e2ac519 WITH_META_MODE: Only expect a .meta file for the main target.
Since multiple files are generated from one build command, only
the first to run will actually generate a .meta file.  This fix
prevents 'required but missing' rebuilds on each target.

Sponsored by:	EMC / Isilon Storage Division
2016-05-26 23:20:24 +00:00
Bryan Drewery
409bf2b097 DIRDEPS_BUILD: Don't show finished stats, which confuses crunchgen(1).
It would show 'make error:' lines for each auto object directory created.

Sponsored by:	EMC / Isilon Storage Division
2016-05-26 23:20:20 +00:00
Bryan Drewery
7c75c54f37 Fix MAKESYSPATH not being sent to sub-makes after r266566.
Because bmake defaults to .../share/mk now, this code was not doing anything
to help objdir builds (such as the rescue build).  Export the same default.

Sponsored by:	EMC / Isilon Storage Division
2016-05-26 23:20:04 +00:00
John Baldwin
28a235e1a7 Update default KMODDIR in comment after r299393.
Submitted by:	hselasky
2016-05-26 18:28:10 +00:00
Andriy Voskoboinyk
9a5e3bff0d wpi: refresh manpage.
Reflect all recent changes in the manpage:
- add adhoc-demo and hostap into list of supported modes;
add few examples for them;
- mention encryption/decryption offload for CCMP cipher;
- extend list of driver messages in the DIAGNOSTICS;
- document hostap mode limitations / powersave instability
in the CAVEATS section.

Differential Revision:	https://reviews.freebsd.org/D5149
2016-05-26 10:55:19 +00:00
Bryan Drewery
fe3c46927c Regenerate 2016-05-24 23:19:03 +00:00
Andrew Rybchenko
929c7feb83 sfxge(4): cleanup: update copyright to 2016
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6509
2016-05-24 12:16:57 +00:00
Baptiste Daroussin
b821f297e0 Update pci_vendors to 2016.05.23 2016-05-23 22:01:06 +00:00
Bryan Drewery
f0c619b22f Be more clear about LOCKLEAF being exclusive and add LOCKSHARED. 2016-05-23 21:29:57 +00:00
Alan Somers
1b82e02f4d Add bit_count to the bitstring(3) api
Add a bit_count function, which efficiently counts the number of bits set in
a bitstring.

sys/sys/bitstring.h
tests/sys/sys/bitstring_test.c
share/man/man3/bitstring.3
	Add bit_alloc

sys/kern/subr_unit.c
	Use bit_count instead of a naive counting loop in check_unrhdr, used
	when INVARIANTS are enabled. The userland test runs about 6x faster
	in a generic build, or 8.5x faster when built for Nehalem, which has
	the POPCNT instruction.

sys/sys/param.h
	Bump __FreeBSD_version due to the addition of bit_alloc

UPDATING
	Add a note about the ABI incompatibility of the bitstring(3)
	changes, as suggested by lidl.

Suggested by:	gibbs
Reviewed by:	gibbs, ngie
MFC after:	9 days
X-MFC-With:	299090, 300538
Relnotes:	yes
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D6255
2016-05-23 20:29:18 +00:00
Bryan Drewery
699f93b956 Properly allow META_MODE to be set from environment.
Sponsored by:	EMC / Isilon Storage Division
2016-05-23 17:27:42 +00:00