summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-11-01 21:17:38 +0000
committerbapt <bapt@FreeBSD.org>2015-11-01 21:17:38 +0000
commit1477bec6db952893631d0121f1a0b921b7352899 (patch)
treed7eefbc43ae961805537882e088a954e7b9cf530 /share
parente29f1d2f891c995886c7e37be37546b3dfd29efd (diff)
parenta23a95f981ff4d4789caf8a8349c8b017b1ac351 (diff)
downloadFreeBSD-src-1477bec6db952893631d0121f1a0b921b7352899.zip
FreeBSD-src-1477bec6db952893631d0121f1a0b921b7352899.tar.gz
Merge from head
Diffstat (limited to 'share')
-rw-r--r--share/colldef/Makefile2
-rw-r--r--share/ctypedef/Makefile2
-rw-r--r--share/examples/smbfs/Makefile2
-rw-r--r--share/examples/smbfs/print/Makefile2
-rw-r--r--share/keys/pkg/trusted/Makefile2
-rw-r--r--share/man/man4/Makefile3
-rw-r--r--share/man/man4/cloudabi.47
-rw-r--r--share/man/man4/ioat.479
-rw-r--r--share/man/man4/isp.454
-rw-r--r--share/man/man4/tcp.413
-rw-r--r--share/man/man4/wlan.43
-rw-r--r--share/man/man5/style.Makefile.59
-rw-r--r--share/man/man7/build.716
-rw-r--r--share/man/man9/BUS_ADD_CHILD.921
-rw-r--r--share/man/man9/Makefile30
-rw-r--r--share/man/man9/bitset.919
-rw-r--r--share/man/man9/cpuset.9352
-rw-r--r--share/man/man9/device_add_child.916
-rw-r--r--share/man/man9/getenv.920
-rw-r--r--share/man/man9/sysctl.938
-rw-r--r--share/misc/bsd-family-tree30
-rw-r--r--share/misc/committers-src.dot11
-rw-r--r--share/misc/scsi_modes2
-rw-r--r--share/mk/bsd.README1
-rw-r--r--share/mk/bsd.compiler.mk31
-rw-r--r--share/mk/bsd.confs.mk18
-rw-r--r--share/mk/bsd.crunchgen.mk156
-rw-r--r--share/mk/bsd.files.mk3
-rw-r--r--share/mk/bsd.man.mk34
-rw-r--r--share/mk/bsd.progs.mk10
-rw-r--r--share/mk/bsd.subdir.mk82
-rw-r--r--share/mk/src.opts.mk21
-rw-r--r--share/monetdef/Makefile2
-rw-r--r--share/msgdef/Makefile2
-rw-r--r--share/numericdef/Makefile2
-rw-r--r--share/sendmail/Makefile2
-rw-r--r--share/skel/Makefile4
37 files changed, 842 insertions, 259 deletions
diff --git a/share/colldef/Makefile b/share/colldef/Makefile
index 5beb8ba..b6869e1 100644
--- a/share/colldef/Makefile
+++ b/share/colldef/Makefile
@@ -2,7 +2,7 @@
# Warning: Do not edit. This file is automatically generated from the
# tools in /usr/src/tools/tools/locale.
-LOCALEDIR= /usr/share/locale
+LOCALEDIR= ${SHAREDIR}/locale
FILESNAME= LC_COLLATE
.SUFFIXES: .src .LC_COLLATE
MAPLOC= ${.CURDIR}/../../tools/tools/locale/etc/final-maps
diff --git a/share/ctypedef/Makefile b/share/ctypedef/Makefile
index f3ce92b..fcefcca 100644
--- a/share/ctypedef/Makefile
+++ b/share/ctypedef/Makefile
@@ -2,7 +2,7 @@
# Warning: Do not edit. This file is automatically generated from the
# tools in /usr/src/tools/tools/locale.
-LOCALEDIR= /usr/share/locale
+LOCALEDIR= ${SHAREDIR}/locale
FILESNAME= LC_CTYPE
.SUFFIXES: .src .LC_CTYPE
MAPLOC= ${.CURDIR}/../../tools/tools/locale/etc/final-maps
diff --git a/share/examples/smbfs/Makefile b/share/examples/smbfs/Makefile
index 9e5b99a..3867b80 100644
--- a/share/examples/smbfs/Makefile
+++ b/share/examples/smbfs/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
NO_OBJ=
-BINDIR= /usr/share/examples/smbfs
+FILESDIR= ${SHAREDIR}/examples/smbfs
FILES= dot.nsmbrc
.PATH: ${.CURDIR}/../../../contrib/smbfs/examples
diff --git a/share/examples/smbfs/print/Makefile b/share/examples/smbfs/print/Makefile
index eb66815..67f4823 100644
--- a/share/examples/smbfs/print/Makefile
+++ b/share/examples/smbfs/print/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
NO_OBJ=
-BINDIR= /usr/share/examples/smbfs/print
+FILESDIR= ${SHAREDIR}/examples/smbfs/print
FILES= lj6l ljspool printcap.sample tolj
.PATH: ${.CURDIR}/../../../../contrib/smbfs/examples/print
diff --git a/share/keys/pkg/trusted/Makefile b/share/keys/pkg/trusted/Makefile
index ee0d4c9..bc8d13a 100644
--- a/share/keys/pkg/trusted/Makefile
+++ b/share/keys/pkg/trusted/Makefile
@@ -4,7 +4,7 @@ NO_OBJ=
FILES= pkg.freebsd.org.2013102301
-FILESDIR= /usr/share/keys/pkg/trusted
+FILESDIR= ${SHAREDIR}/keys/pkg/trusted
FILESMODE= 644
.include <bsd.prog.mk>
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index 94c2ad3..cfb6646 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -672,6 +672,7 @@ MLINKS+=nge.4 if_nge.4
MLINKS+=${_ntb.4} ${_if_ntb.4} \
${_ntb.4} ${_ntb_hw.4}
MLINKS+=${_nxge.4} ${_if_nxge.4}
+MLINKS+=otus.4 if_otus.4
MLINKS+=ow.4 onewire.4
MLINKS+=patm.4 if_patm.4
MLINKS+=pccbb.4 cbb.4
@@ -685,6 +686,7 @@ MLINKS+=rl.4 if_rl.4
MLINKS+=rue.4 if_rue.4
MLINKS+=rum.4 if_rum.4
MLINKS+=run.4 if_run.4
+MLINKS+=rsu.4 if_rsu.4
MLINKS+=scsi.4 CAM.4 \
scsi.4 cam.4 \
scsi.4 scbus.4 \
@@ -713,6 +715,7 @@ MLINKS+=tl.4 if_tl.4
MLINKS+=tun.4 if_tun.4
MLINKS+=tx.4 if_tx.4
MLINKS+=txp.4 if_txp.4
+MLINKS+=urtwn.4 if_urtwn.4
MLINKS+=vge.4 if_vge.4
MLINKS+=vlan.4 if_vlan.4
MLINKS+=vxlan.4 if_vxlan.4
diff --git a/share/man/man4/cloudabi.4 b/share/man/man4/cloudabi.4
index 1986735..e7a5653 100644
--- a/share/man/man4/cloudabi.4
+++ b/share/man/man4/cloudabi.4
@@ -22,7 +22,7 @@
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
-.Dd July 31, 2015
+.Dd October 22, 2015
.Dt CLOUDABI 4
.Os
.Sh NAME
@@ -73,7 +73,7 @@ module can be loaded on any architecture supported by
.Fx ,
the
.Nm cloudabi64
-module is only available for amd64.
+module is only available for amd64 and arm64.
.Pp
A full cross compilation toolchain for CloudABI is available in the
.Pa devel/cloudabi-toolchain
@@ -95,6 +95,9 @@ restricted set of resources.
.Pp
cloudlibc on GitHub:
.Pa https://github.com/NuxiNL/cloudlibc .
+.Pp
+The CloudABI Ports Collection on GitHub:
+.Pa https://github.com/NuxiNL/cloudabi-ports .
.Sh HISTORY
CloudABI support first appeared in
.Fx 11.0 .
diff --git a/share/man/man4/ioat.4 b/share/man/man4/ioat.4
index 301ab4f..62d85f1 100644
--- a/share/man/man4/ioat.4
+++ b/share/man/man4/ioat.4
@@ -24,14 +24,25 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 24, 2015
+.Dd October 31, 2015
.Dt IOAT 4
.Os
.Sh NAME
.Nm I/OAT
.Nd Intel I/O Acceleration Technology
.Sh SYNOPSIS
+To compile this driver into your kernel,
+place the following line in your kernel configuration file:
+.Bd -ragged -offset indent
.Cd "device ioat"
+.Ed
+.Pp
+Or, to load the driver as a module at boot, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ioat_load="YES"
+.Ed
+.Pp
In
.Xr loader.conf 5 :
.Pp
@@ -46,11 +57,13 @@ In
(only critical errors; maximum of 3)
.Pp
.Ft typedef void
-.Fn (*bus_dmaengine_callback_t) "void *arg"
+.Fn (*bus_dmaengine_callback_t) "void *arg" "int error"
.Pp
.Ft bus_dmaengine_t
.Fn ioat_get_dmaengine "uint32_t channel_index"
.Ft void
+.Fn ioat_put_dmaengine "bus_dmaengine_t dmaengine"
+.Ft void
.Fn ioat_acquire "bus_dmaengine_t dmaengine"
.Ft void
.Fn ioat_release "bus_dmaengine_t dmaengine"
@@ -65,6 +78,16 @@ In
.Fa "uint32_t flags"
.Fc
.Ft struct bus_dmadesc *
+.Fo ioat_blockfill
+.Fa "bus_dmaengine_t dmaengine"
+.Fa "bus_addr_t dst"
+.Fa "uint64_t fillpattern"
+.Fa "bus_size_t len"
+.Fa "bus_dmaengine_callback_t callback_fn"
+.Fa "void *callback_arg"
+.Fa "uint32_t flags"
+.Fc
+.Ft struct bus_dmadesc *
.Fo ioat_null
.Fa "bus_dmaengine_t dmaengine"
.Fa "bus_dmaengine_callback_t callback_fn"
@@ -82,7 +105,9 @@ There is a number of DMA channels per CPU package.
Each may be used independently.
Operations on a single channel proceed sequentially.
.Pp
-Copy operations may be used to offload memory copies to the DMA engines.
+Blockfill operations can be used to write a 64-bit pattern to memory.
+.Pp
+Copy operations can be used to offload memory copies to the DMA engines.
.Pp
Null operations do nothing, but may be used to test the interrupt and callback
mechanism.
@@ -92,6 +117,26 @@ All operations can optionally trigger an interrupt at completion with the
flag.
For example, a user might submit multiple operations to the same channel and
only enable an interrupt and callback for the last operation.
+.Pp
+All operations are safe to use in a non-blocking context with the
+.Ar DMA_NO_WAIT
+flag.
+(Of course, allocations may fail and operations requested with
+.Ar DMA_NO_WAIT
+may return NULL.)
+.Pp
+All operations, as well as
+.Fn ioat_get_dmaengine ,
+can return NULL in special circumstances.
+For example, if the
+.Nm
+driver is being unloaded, or the administrator has induced a hardware reset, or
+a usage error has resulted in a hardware error state that needs to be recovered
+from.
+.Pp
+It is invalid to attempt to submit new DMA operations in a
+.Fa bus_dmaengine_callback_t
+context.
.Sh USAGE
A typical user will lookup the DMA engine object for a given channel with
.Fn ioat_get_dmaengine .
@@ -101,10 +146,11 @@ the
.Ar bus_dmaengine_t
object for exclusive access to enqueue operations on that channel.
Then, they will submit one or more operations using
-.Fn ioat_copy
+.Fn ioat_blockfill ,
+.Fn ioat_copy ,
or
.Fn ioat_null .
-Finally, they will
+After queueing one or more individual DMA operations, they will
.Fn ioat_release
the
.Ar bus_dmaengine_t
@@ -114,6 +160,19 @@ The routine they provided for the
argument will be invoked with the provided
.Fa callback_arg
when the operation is complete.
+When they are finished with the
+.Ar bus_dmaengine_t ,
+the user should
+.Fn ioat_put_dmaengine .
+.Pp
+Users MUST NOT block between
+.Fn ioat_acquire
+and
+.Fn ioat_release .
+Users SHOULD NOT hold
+.Ar bus_dmaengine_t
+references for a very long time to enable fault recovery and kernel module
+unload.
.Pp
For an example of usage, see
.Pa src/sys/dev/ioat/ioat_test.c .
@@ -135,19 +194,23 @@ The
.Nm
driver was developed by
.An \&Jim Harris Aq Mt jimharris@FreeBSD.org ,
+.An \&Carl Delsey Aq Mt carl.r.delsey@intel.com ,
and
-.An \&Carl Delsey Aq Mt carl.r.delsey@intel.com .
+.An \&Conrad Meyer Aq Mt cem@FreeBSD.org .
This manual page was written by
.An \&Conrad Meyer Aq Mt cem@FreeBSD.org .
.Sh CAVEATS
Copy operation takes bus addresses as parameters, not virtual addresses.
.Pp
-Copies larger than max transfer size (1MB) are not supported.
+Buffers for individual copy operations must be physically contiguous.
+.Pp
+Copies larger than max transfer size (1MB, but may vary by hardware) are not
+supported.
Future versions will likely support this by breaking up the transfer into
smaller sizes.
.Sh BUGS
The
.Nm
-driver only supports copy and null operations at this time.
+driver only supports blockfill, copy, and null operations at this time.
The driver does not yet support advanced DMA modes, such as XOR, that some
I/OAT devices support.
diff --git a/share/man/man4/isp.4 b/share/man/man4/isp.4
index 6d3a49a..767db68 100644
--- a/share/man/man4/isp.4
+++ b/share/man/man4/isp.4
@@ -29,7 +29,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 1, 2014
+.Dd October 29, 2015
.Dt ISP 4
.Os
.Sh NAME
@@ -60,8 +60,7 @@ devices.
SCSI features include support for Ultra SCSI and wide mode transactions
for
.Tn SCSI ,
-Ultra2 LVD (for the ISP1080 and ISP1280), and Ultra3 LVD (for the
-ISP12160).
+Ultra2 LVD (ISP1080, ISP1280), and Ultra3 LVD (ISP12160).
.Pp
Fibre Channel support uses FCP SCSI profile for
.Tn FibreChannel ,
@@ -69,15 +68,13 @@ and utilizes Class 3 and Class 2 connections (Qlogic 2100 is Class
3 only, minor patches to the Qlogic 2200 to force Class 2 mode).
Support is available for Public and Private loops, and for
point-to-point connections (Qlogic 2200 only).
-The newer 2-Gigabit cards (2300, 2312, 2322) and 4-Gigabit (2422, 2432)
-are also supported.
-Command tagging is
-supported for all (in fact,
+The newer 2-Gigabit cards (2300, 2312, 2322), 4-Gigabit (2422, 2432)
+and 8-Gigabit (2532) are also supported.
+Command tagging is supported for all (in fact,
.Tn FibreChannel
requires tagging).
Fabric support is enabled by default for other than 2100 cards.
-Fabric
-support for 2100 cards has been so problematic and these cards are so
+Fabric support for 2100 cards has been so problematic and these cards are so
old now that it is just not worth your time to try it.
.Sh FIRMWARE
Firmware is available if the
@@ -103,15 +100,16 @@ Qlogic 1020 Fast Wide and Differential Fast Wide PCI cards.
.It ISP1040
Qlogic 1040 Ultra Wide and Differential Ultra Wide PCI cards.
Also known as the DEC KZPBA-CA (single ended) and KZPBA-CB (HVD differential).
-.It Qlogic 1240
-Qlogic 1240 Dual Bus Ultra Wide and Differential Ultra Wide PCI
-cards.
.It Qlogic 1020
Qlogic 1020 SCSI cards.
.It Qlogic 1040
Qlogic 1040 Ultra SCSI cards.
.It Qlogic 1080
-Qlogic 1280 LVD Ultra2 Wide PCI cards.
+Qlogic 1080 LVD Ultra2 Wide SCSI cards.
+.It Qlogic 10160
+Qlogic 10160 LVD Ultra3 Wide PCI cards.
+.It Qlogic 1240
+Qlogic 1240 Dual Bus Ultra Wide and Differential Ultra Wide PCI cards.
.It Qlogic 1280
Qlogic 1280 Dual Bus LVD Ultra2 Wide PCI cards.
.It Qlogic 12160
@@ -123,21 +121,21 @@ Loop (single, dual).
Qlogic 2200 Copper and Optical Fibre Channel Arbitrated Loop PCI
cards (single, dual, quad).
.It Qlogic 2300
-Qlogic 2300 Optical Fibre Channel PCI cards.
+Qlogic 2300 Optical 2Gb Fibre Channel PCI cards.
.It Qlogic 2312
-Qlogic 2312 Optical Fibre Channel PCI cards.
+Qlogic 2312 Optical 2Gb Fibre Channel PCI cards.
.It Qlogic 234X
-Qlogic 234X Optical Fibre Channel PCI cards (2312 chipset, single and dual attach).
+Qlogic 234X Optical 2Gb Fibre Channel PCI cards (2312 chipset, single and dual attach).
.It Qlogic 2322
-Qlogic 2322 Optical Fibre Channel PCIe cards.
+Qlogic 2322 Optical 2Gb Fibre Channel PCIe cards.
.It Qlogic 200
-Dell Branded version of the QLogic 2312 Fibre Channel PCI cards.
+Dell branded version of the QLogic 2312.
.It Qlogic 2422
-Qlogic 2422 Optical Fibre Channel PCI cards (4 Gigabit)
-.It Qlogic 2432
-Qlogic 2432 Optical Fibre Channel PCIe cards (4 Gigabit)
+Qlogic 2422 Optical 4Gb Fibre Channel PCI cards.
.It Qlogic 2432
-Qlogic 2532 Optical Fibre Channel PCIe cards (8 Gigabit)
+Qlogic 2432 Optical 4Gb Fibre Channel PCIe cards.
+.It Qlogic 2532
+Qlogic 2532 Optical 8Gb Fibre Channel PCIe cards.
.El
.Sh CONFIGURATION OPTIONS
Target mode support may be enabled with the
@@ -232,13 +230,11 @@ The
.Nm
driver was written by
.An Matthew Jacob
-originally for NetBSD at
-NASA/Ames Research Center.
+originally for NetBSD at NASA/Ames Research Center.
+Some later improvement was done by
+.An Alexander Motin Aq Mt mav@FreeBSD.org .
.Sh BUGS
The driver currently ignores some NVRAM settings.
.Pp
-Target mode support is not completely reliable yet.
-It works reasonably
-well for Fibre Channel, somewhat well for Qlogic 1040 cards, but
-does not yet work for the other cards (due to last minute unannounced
-changes in firmware interfaces).
+Target mode support works reasonably well for 23xx and above Fibre Channel
+cards, but not really tested on older ones.
diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4
index 351e4b4..8c5887f 100644
--- a/share/man/man4/tcp.4
+++ b/share/man/man4/tcp.4
@@ -34,7 +34,7 @@
.\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93
.\" $FreeBSD$
.\"
-.Dd October 13, 2014
+.Dd October 27, 2015
.Dt TCP 4
.Os
.Sh NAME
@@ -454,6 +454,17 @@ code.
For this reason, we use 200ms of slop and a near-0
minimum, which gives us an effective minimum of 200ms (similar to
.Tn Linux ) .
+.It Va initcwnd_segments
+Enable the ability to specify initial congestion window in number of segments.
+The default value is 10 as suggested by RFC 6928.
+Changing the value on fly would not affect connections using congestion window
+from the hostcache.
+Caution:
+This regulates the burst of packets allowed to be sent in the first RTT.
+The value should be relative to the link capacity.
+Start with small values for lower-capacity links.
+Large bursts can cause buffer overruns and packet drops if routers have small
+buffers or the link is experiencing congestion.
.It Va rfc3042
Enable the Limited Transmit algorithm as described in RFC 3042.
It helps avoid timeouts on lossy links and also when the congestion window
diff --git a/share/man/man4/wlan.4 b/share/man/man4/wlan.4
index 9bfbb4a..747e040 100644
--- a/share/man/man4/wlan.4
+++ b/share/man/man4/wlan.4
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 10, 2015
+.Dd October 29, 2015
.Dt WLAN 4
.Os
.Sh NAME
@@ -182,6 +182,7 @@ may not interoperate.
.Xr malo 4 ,
.Xr mwl 4 ,
.Xr netintro 4 ,
+.Xr otus 4 ,
.Xr ral 4 ,
.Xr rsu 4 ,
.Xr rum 4 ,
diff --git a/share/man/man5/style.Makefile.5 b/share/man/man5/style.Makefile.5
index c3a3288..5e34b96 100644
--- a/share/man/man5/style.Makefile.5
+++ b/share/man/man5/style.Makefile.5
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 8, 2005
+.Dd October 21, 2015
.Dt STYLE.MAKEFILE 5
.Os
.Sh NAME
@@ -117,6 +117,13 @@ i.e., no space between the variable name and the
.Ic = .
Keep values sorted alphabetically, if possible.
.It
+Variables are expanded with
+.Sy {} ,
+not
+.Sy () .
+Such as
+.Va ${VARIABLE} .
+.It
Do not use
.Ic +=
to set variables that are only set once
diff --git a/share/man/man7/build.7 b/share/man/man7/build.7
index 6980dc2..be6fe09 100644
--- a/share/man/man7/build.7
+++ b/share/man/man7/build.7
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 31, 2014
+.Dd October 21, 2015
.Dt BUILD 7
.Os
.Sh NAME
@@ -463,7 +463,19 @@ for more details.
.It Va SUBDIR_OVERRIDE
Override the default list of sub-directories and only build the
sub-directory named in this variable.
-This variable is useful when debugging failed builds.
+If combined with
+.Cm buildworld
+then all libraries and includes, and some of the build tools will still build
+as well.
+When combined with
+.Cm buildworld
+it is necesarry to override
+.Va LOCAL_LIB_DIRS
+with any custom directories containing libraries.
+This allows building a subset of the system in the same way as
+.Cm buildworld
+does using its sysroot handling.
+This variable can also be useful when debugging failed builds.
.Bd -literal -offset indent
make some-target SUBDIR_OVERRIDE=foo/bar
.Ed
diff --git a/share/man/man9/BUS_ADD_CHILD.9 b/share/man/man9/BUS_ADD_CHILD.9
index 8b69d5a..1e98ffe 100644
--- a/share/man/man9/BUS_ADD_CHILD.9
+++ b/share/man/man9/BUS_ADD_CHILD.9
@@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 13, 2004
+.Dd October 28, 2015
.Dt BUS_ADD_CHILD 9
.Os
.Sh NAME
@@ -44,6 +44,8 @@ The
.Fn BUS_ADD_CHILD
method
is used by the driver identify routine to add devices to the tree.
+It can also be used to add children to buses that implement this
+routine in other contexts, although the behavior is bus specific.
Please see
.Xr device_add_child 9
for more details.
@@ -53,18 +55,31 @@ however, the bus'
.Fn BUS_ADD_CHILD
is called.
.Pp
-Busses implementing
+Buses implementing
.Fn BUS_ADD_CHILD
should insert the device into the tree using
.Xr device_add_child 9
before adding things such as their own ivars and resource lists to the device.
+.Fn BUS_ADD_CHILD
+is not called by
+.Xr device_add_child 9 .
+.Fn BUS_ADD_CHILD
+instead calls
+.Xr device_add_child 9 .
+.Pp
+A panic will result when called for a bus that does not implement
+.Fn BUS_ADD_CHILD .
+Some buses require a special bus-specific routine to be called instead
+of
+.Fn BUS_ADD_CHILD .
.Sh RETURN VALUES
The
.Fn BUS_ADD_CHILD
method returns
.Vt device_t
added to the tree, or
-.Dv NULL .
+.Dv NULL
+to indicate failure.
.Sh SEE ALSO
.Xr device 9 ,
.Xr device_add_child 9 ,
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index a529366..516d6c3 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -57,6 +57,7 @@ MAN= accept_filter.9 \
contigmalloc.9 \
copy.9 \
counter.9 \
+ cpuset.9 \
cr_cansee.9 \
critical_enter.9 \
cr_seeothergids.9 \
@@ -636,6 +637,31 @@ MLINKS+=counter.9 counter_u64_alloc.9 \
counter.9 counter_u64_add_protected.9 \
counter.9 counter_u64_fetch.9 \
counter.9 counter_u64_zero.9
+MLINKS+=cpuset.9 CPUSET_T_INITIALIZER.9 \
+ cpuset.9 CPUSET_FSET.9 \
+ cpuset.9 CPU_CLR.9 \
+ cpuset.9 CPU_COPY.9 \
+ cpuset.9 CPU_ISSET.9 \
+ cpuset.9 CPU_SET.9 \
+ cpuset.9 CPU_ZERO.9 \
+ cpuset.9 CPU_FILL.9 \
+ cpuset.9 CPU_SETOF.9 \
+ cpuset.9 CPU_EMPTY.9 \
+ cpuset.9 CPU_ISFULLSET.9 \
+ cpuset.9 CPU_FFS.9 \
+ cpuset.9 CPU_COUNT.9 \
+ cpuset.9 CPU_SUBSET.9 \
+ cpuset.9 CPU_OVERLAP.9 \
+ cpuset.9 CPU_CMP.9 \
+ cpuset.9 CPU_OR.9 \
+ cpuset.9 CPU_AND.9 \
+ cpuset.9 CPU_NAND.9 \
+ cpuset.9 CPU_CLR_ATOMIC.9 \
+ cpuset.9 CPU_SET_ATOMIC.9 \
+ cpuset.9 CPU_SET_ATOMIC_ACQ.9 \
+ cpuset.9 CPU_AND_ATOMIC.9 \
+ cpuset.9 CPU_OR_ATOMIC.9 \
+ cpuset.9 CPU_COPY_STORE_REL.9
MLINKS+=critical_enter.9 critical.9 \
critical_enter.9 critical_exit.9
MLINKS+=crypto.9 crypto_dispatch.9 \
@@ -1603,6 +1629,8 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \
sysctl.9 SYSCTL_ADD_ROOT_NODE.9 \
sysctl.9 SYSCTL_ADD_STRING.9 \
sysctl.9 SYSCTL_ADD_STRUCT.9 \
+ sysctl.9 SYSCTL_ADD_U8.9 \
+ sysctl.9 SYSCTL_ADD_U16.9 \
sysctl.9 SYSCTL_ADD_UAUTO.9 \
sysctl.9 SYSCTL_ADD_UINT.9 \
sysctl.9 SYSCTL_ADD_ULONG.9 \
@@ -1620,6 +1648,8 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \
sysctl.9 SYSCTL_ROOT_NODE.9 \
sysctl.9 SYSCTL_STRING.9 \
sysctl.9 SYSCTL_STRUCT.9 \
+ sysctl.9 SYSCTL_U8.9 \
+ sysctl.9 SYSCTL_U16.9 \
sysctl.9 SYSCTL_UINT.9 \
sysctl.9 SYSCTL_ULONG.9 \
sysctl.9 SYSCTL_UQUAD.9
diff --git a/share/man/man9/bitset.9 b/share/man/man9/bitset.9
index 361b0e5..19f53a2 100644
--- a/share/man/man9/bitset.9
+++ b/share/man/man9/bitset.9
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 17, 2015
+.Dd October 20, 2015
.Dt BITSET 9
.Os
.Sh NAME
@@ -352,16 +352,9 @@ myset = BITSET_T_INITIALIZER(BITSET_FSET(__bitset_words(MYSETSIZE)));
myset = BITSET_T_INITIALIZER(0x1);
.Ed
.Sh SEE ALSO
-The older
-.Xr bitstring 3 .
+.Xr bitstring 3 ,
+.Xr cpuset 9
.Sh HISTORY
-.In sys/cpuset.h
-first appeared in
-.Fx 7.1 ,
-released in January 2009, and in
-.Fx 8.0 ,
-released in November 2009 .
-.Pp
The
.Nm
macros first appeared in
@@ -377,11 +370,9 @@ This manual page first appeared in
.An -nosplit
The
.Nm
-macros were written for
+macros were generalized and pulled out of
.In sys/cpuset.h
-by
-.An Jeff Roberson Aq Mt jeff@FreeBSD.org ;
-they were generalized and pulled out as
+as
.In sys/_bitset.h
and
.In sys/bitset.h
diff --git a/share/man/man9/cpuset.9 b/share/man/man9/cpuset.9
new file mode 100644
index 0000000..fb0a9fc
--- /dev/null
+++ b/share/man/man9/cpuset.9
@@ -0,0 +1,352 @@
+.\" Copyright (c) 2015 Conrad Meyer <cem@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
+.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 20, 2015
+.Dt CPUSET 9
+.Os
+.Sh NAME
+.Nm cpuset(9)
+\(em
+.Nm CPUSET_T_INITIALIZER ,
+.Nm CPUSET_FSET ,
+.Nm CPU_CLR ,
+.Nm CPU_COPY ,
+.Nm CPU_ISSET ,
+.Nm CPU_SET ,
+.Nm CPU_ZERO ,
+.Nm CPU_FILL ,
+.Nm CPU_SETOF ,
+.Nm CPU_EMPTY ,
+.Nm CPU_ISFULLSET ,
+.Nm CPU_FFS ,
+.Nm CPU_COUNT ,
+.Nm CPU_SUBSET ,
+.Nm CPU_OVERLAP ,
+.Nm CPU_CMP ,
+.Nm CPU_OR ,
+.Nm CPU_AND ,
+.Nm CPU_NAND ,
+.Nm CPU_CLR_ATOMIC ,
+.Nm CPU_SET_ATOMIC ,
+.Nm CPU_SET_ATOMIC_ACQ ,
+.Nm CPU_AND_ATOMIC ,
+.Nm CPU_OR_ATOMIC ,
+.Nm CPU_COPY_STORE_REL
+.Nd cpuset manipulation macros
+.Sh SYNOPSIS
+.In sys/_cpuset.h
+.In sys/cpuset.h
+.\"
+.Fn CPUSET_T_INITIALIZER "ARRAY_CONTENTS"
+.Vt CPUSET_FSET
+.\"
+.Fn CPU_CLR "size_t cpu_idx" "cpuset_t *cpuset"
+.Fn CPU_COPY "cpuset_t *from" "cpuset_t *to"
+.Ft bool
+.Fn CPU_ISSET "size_t cpu_idx" "cpuset_t *cpuset"
+.Fn CPU_SET "size_t cpu_idx" "cpuset_t *cpuset"
+.Fn CPU_ZERO "cpuset_t *cpuset"
+.Fn CPU_FILL "cpuset_t *cpuset"
+.Fn CPU_SETOF "size_t cpu_idx" "cpuset_t *cpuset"
+.Ft bool
+.Fn CPU_EMPTY "cpuset_t *cpuset"
+.Ft bool
+.Fn CPU_ISFULLSET "cpuset_t *cpuset"
+.Ft size_t
+.Fn CPU_FFS "cpuset_t *cpuset"
+.Ft size_t
+.Fn CPU_COUNT "cpuset_t *cpuset"
+.\"
+.Ft bool
+.Fn CPU_SUBSET "cpuset_t *haystack" "cpuset_t *needle"
+.Ft bool
+.Fn CPU_OVERLAP "cpuset_t *cpuset1" "cpuset_t *cpuset2"
+.Ft bool
+.Fn CPU_CMP "cpuset_t *cpuset1" "cpuset_t *cpuset2"
+.Fn CPU_OR "cpuset_t *dst" "cpuset_t *src"
+.Fn CPU_AND "cpuset_t *dst" "cpuset_t *src"
+.Fn CPU_NAND "cpuset_t *dst" "cpuset_t *src"
+.\"
+.Fn CPU_CLR_ATOMIC "size_t cpu_idx" "cpuset_t *cpuset"
+.Fn CPU_SET_ATOMIC "size_t cpu_idx" "cpuset_t *cpuset"
+.Fn CPU_SET_ATOMIC_ACQ "size_t cpu_idx" "cpuset_t *cpuset"
+.\"
+.Fn CPU_AND_ATOMIC "cpuset_t *dst" "cpuset_t *src"
+.Fn CPU_OR_ATOMIC "cpuset_t *dst" "cpuset_t *src"
+.Fn CPU_COPY_STORE_REL "cpuset_t *from" "cpuset_t *to"
+.Sh DESCRIPTION
+The
+.Nm
+family of macros provide a flexible and efficient CPU set implementation,
+backed by the
+.Xr bitset 9
+macros.
+Each CPU is represented by a single bit.
+The maximum number of CPUs representable by
+.Vt cpuset_t
+is
+.Va MAXCPU .
+Individual CPUs in cpusets are referenced with indices zero through
+.Fa MAXCPU - 1 .
+.Pp
+The
+.Fn CPUSET_T_INITIALIZER
+macro allows one to initialize a
+.Vt cpuset_t
+with a compile time literal value.
+.Pp
+The
+.Fn CPUSET_FSET
+macro defines a compile time literal, usable by
+.Fn CPUSET_T_INITIALIZER ,
+representing a full cpuset (all CPUs present).
+For examples of
+.Fn CPUSET_T_INITIALIZER
+and
+.Fn CPUSET_FSET
+usage, see the
+.Sx CPUSET_T_INITIALIZER EXAMPLE
+section.
+.Pp
+The
+.Fn CPU_CLR
+macro removes CPU
+.Fa cpu_idx
+from the cpuset pointed to by
+.Fa cpuset .
+The
+.Fn CPU_CLR_ATOMIC
+macro is identical, but the bit representing the CPU is cleared with atomic
+machine instructions.
+.Pp
+The
+.Fn CPU_COPY
+macro copies the contents of the cpuset
+.Fa from
+to the cpuset
+.Fa to .
+.Fn CPU_COPY_STORE_REL
+is similar, but copies component machine words from
+.Fa from
+and writes them to
+.Fa to
+with atomic store with release semantics.
+(That is, if
+.Fa to
+is composed of multiple machine words,
+.Fn CPU_COPY_STORE_REL
+performs multiple individually atomic operations.)
+.Pp
+The
+.Fn CPU_SET
+macro adds CPU
+.Fa cpu_idx
+to the cpuset pointed to by
+.Fa cpuset ,
+if it is not already present.
+The
+.Fn CPU_SET_ATOMIC
+macro is identical, but the bit representing the CPU is set with atomic
+machine instructions.
+The
+.Fn CPU_SET_ATOMIC_ACQ
+macro sets the bit representing the CPU with atomic acquire semantics.
+.Pp
+The
+.Fn CPU_ZERO
+macro removes all CPUs from
+.Fa cpuset .
+.Pp
+The
+.Fn CPU_FILL
+macro adds all CPUs to
+.Fa cpuset .
+.Pp
+The
+.Fn CPU_SETOF
+macro removes all CPUs in
+.Fa cpuset
+before adding only CPU
+.Fa cpu_idx .
+.Pp
+The
+.Fn CPU_EMPTY
+macro returns
+.Dv true
+if
+.Fa cpuset
+is empty.
+.Pp
+The
+.Fn CPU_ISFULLSET
+macro returns
+.Dv true
+if
+.Fa cpuset
+is full (the set of all CPUs).
+.Pp
+The
+.Fn CPU_FFS
+macro returns the 1-index of the first (lowest) CPU in
+.Fa cpuset ,
+or zero if
+.Fa cpuset
+is empty.
+Like with
+.Xr ffs 3 ,
+to use the non-zero result of
+.Fn CPU_FFS
+as a
+.Fa cpu_idx
+index parameter to any other
+.Nm
+macro, you must subtract one from the result.
+.Pp
+The
+.Fn CPU_COUNT
+macro returns the total number of CPUs in
+.Fa cpuset .
+.Pp
+The
+.Fn CPU_SUBSET
+macro returns
+.Dv true
+if
+.Fa needle
+is a subset of
+.Fa haystack .
+.Pp
+The
+.Fn CPU_OVERLAP
+macro returns
+.Dv true
+if
+.Fa cpuset1
+and
+.Fa cpuset2
+have any common CPUs.
+(That is, if
+.Fa cpuset1
+AND
+.Fa cpuset2
+is not the empty set.)
+.Pp
+The
+.Fn CPU_CMP
+macro returns
+.Dv true
+if
+.Fa cpuset1
+is NOT equal to
+.Fa cpuset2 .
+.Pp
+The
+.Fn CPU_OR
+macro adds CPUs present in
+.Fa src
+to
+.Fa dst .
+(It is the
+.Nm
+equivalent of the scalar:
+.Fa dst
+|=
+.Fa src . )
+.Fn CPU_OR_ATOMIC
+is similar, but sets the bits representing CPUs in the component machine words
+in
+.Fa dst
+with atomic machine instructions.
+(That is, if
+.Fa dst
+is composed of multiple machine words,
+.Fn CPU_OR_ATOMIC
+performs multiple individually atomic operations.)
+.Pp
+The
+.Fn CPU_AND
+macro removes CPUs absent from
+.Fa src
+from
+.Fa dst .
+(It is the
+.Nm
+equivalent of the scalar:
+.Fa dst
+&=
+.Fa src . )
+.Fn CPU_AND_ATOMIC
+is similar, with the same atomic semantics as
+.Fn CPU_OR_ATOMIC .
+.Pp
+The
+.Fn CPU_NAND
+macro removes CPUs in
+.Fa src
+from
+.Fa dst .
+(It is the
+.Nm
+equivalent of the scalar:
+.Fa dst
+&=
+.Fa ~ src . )
+.Sh CPUSET_T_INITIALIZER EXAMPLE
+.Bd -literal
+cpuset_t myset;
+
+/* Initialize myset to filled (all CPUs) */
+myset = CPUSET_T_INITIALIZER(CPUSET_FSET);
+
+/* Initialize myset to only the lowest CPU */
+myset = CPUSET_T_INITIALIZER(0x1);
+.Ed
+.Sh SEE ALSO
+.Xr cpuset 1 ,
+.Xr cpuset 2 ,
+.Xr bitset 9
+.Sh HISTORY
+.In sys/cpuset.h
+first appeared in
+.Fx 7.1 ,
+released in January 2009, and in
+.Fx 8.0 ,
+released in November 2009.
+.Pp
+This manual page first appeared in
+.Fx 11.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+macros were written by
+.An Jeff Roberson Aq Mt jeff@FreeBSD.org .
+This manual page was written by
+.An Conrad Meyer Aq Mt cem@FreeBSD.org .
+.Sh CAVEATS
+Unlike every other reference to individual set members, which are zero-indexed,
+.Fn CPU_FFS
+returns a one-indexed result (or zero if the cpuset is empty).
diff --git a/share/man/man9/device_add_child.9 b/share/man/man9/device_add_child.9
index 7ddd19a..052db92 100644
--- a/share/man/man9/device_add_child.9
+++ b/share/man/man9/device_add_child.9
@@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 12, 2006
+.Dd October 28, 2015
.Dt DEVICE_ADD_CHILD 9
.Os
.Sh NAME
@@ -74,14 +74,14 @@ Normally unit numbers will be chosen automatically by the system and a
unit number of
.Dv -1
should be given.
-When a specific unit number is desired (e.g.\& for wiring a particular
+When a specific unit number is desired (e.g.,\& for wiring a particular
piece of hardware to a pre-configured unit number), that unit should
be passed.
If the specified unit number is already allocated, a new
unit will be allocated and a diagnostic message printed.
.Pp
If the devices attached to a bus must be probed in a specific order
-(e.g.\& for the ISA bus some devices are sensitive to failed probe attempts
+(e.g.,\& for the ISA bus some devices are sensitive to failed probe attempts
of unrelated drivers and therefore must be probed first),
the
.Fa order
@@ -109,10 +109,18 @@ Authors of bus drivers must likewise be careful when adding children
when they are loaded and unloaded to avoid duplication of children
devices.
.Pp
-Identify routines should use
+When adding a child to another device node, such as in an identify
+routine, use
.Xr BUS_ADD_CHILD 9
instead of
.Xr device_add_child 9 .
+.Xr BUS_ADD_CHILD 9
+will call
+.Xr device_add_child 9
+and add the proper bus-specific data to the new child.
+.Fn device_add_child
+does not call
+.Xr BUS_ADD_CHILD 9 .
.Sh RETURN VALUES
The new device if successful, NULL otherwise.
.Sh SEE ALSO
diff --git a/share/man/man9/getenv.9 b/share/man/man9/getenv.9
index a530ca4..cf5d889 100644
--- a/share/man/man9/getenv.9
+++ b/share/man/man9/getenv.9
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 22, 2013
+.Dd October 22, 2015
.Dt GETENV 9
.Os
.Sh NAME
@@ -78,7 +78,6 @@ function obtains the current value of the kernel environment variable
.Fa name
and returns a pointer to the string value.
The caller should not modify the string pointed to by the return value.
-.Pp
The
.Fn getenv
function may allocate temporary storage,
@@ -88,12 +87,24 @@ function must be called to release any allocated resources when the value
returned by
.Fn getenv
is no longer needed.
+.Pp
+The
+.Fn freeenv
+function is used to release the resources allocated by a previous call to
+.Fn getenv .
The
.Fa env
argument passed to
.Fn freeenv
is the pointer returned by the earlier call to
.Fn getenv .
+Like
+.Xr free 3 ,
+the
+.Fa env
+argument can be
+.Va NULL ,
+in which case no action occurs.
.Pp
The
.Fn setenv
@@ -156,7 +167,8 @@ Otherwise,
the value is interpreted as decimal.
The value may contain a single character suffix specifying a unit for
the value.
-The interpreted value is multipled by the unit's magnitude before being returned.
+The interpreted value is multiplied by the unit's magnitude before being
+returned.
The following unit suffixes are supported:
.Bl -column -offset indent ".Sy Unit" ".Sy Magnitude"
.It Sy Unit Ta Sy Magnitude
@@ -179,7 +191,7 @@ zero is returned.
If the variable exists,
up to
.Fa size - 1
-characters of it's value are copied to the buffer pointed to by
+characters of its value are copied to the buffer pointed to by
.Fa data
followed by a null character and a non-zero value is returned.
.Sh RETURN VALUES
diff --git a/share/man/man9/sysctl.9 b/share/man/man9/sysctl.9
index 51ab5d7..c0f8363 100644
--- a/share/man/man9/sysctl.9
+++ b/share/man/man9/sysctl.9
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 20, 2014
+.Dd October 23, 2015
.Dt SYSCTL 9
.Os
.Sh NAME
@@ -39,6 +39,8 @@
.Nm SYSCTL_ADD_ROOT_NODE ,
.Nm SYSCTL_ADD_STRING ,
.Nm SYSCTL_ADD_STRUCT ,
+.Nm SYSCTL_ADD_U8 ,
+.Nm SYSCTL_ADD_U16 ,
.Nm SYSCTL_ADD_UAUTO ,
.Nm SYSCTL_ADD_UINT ,
.Nm SYSCTL_ADD_ULONG ,
@@ -56,6 +58,8 @@
.Nm SYSCTL_ROOT_NODE ,
.Nm SYSCTL_STRING ,
.Nm SYSCTL_STRUCT ,
+.Nm SYSCTL_U8 ,
+.Nm SYSCTL_U16 ,
.Nm SYSCTL_UINT ,
.Nm SYSCTL_ULONG ,
.Nm SYSCTL_UQUAD
@@ -162,6 +166,28 @@
.Fa "const char *descr"
.Fc
.Ft struct sysctl_oid *
+.Fo SYSCTL_ADD_U8
+.Fa "struct sysctl_ctx_list *ctx"
+.Fa "struct sysctl_oid_list *parent"
+.Fa "int number"
+.Fa "const char *name"
+.Fa "int ctlflags"
+.Fa "unsigned int *ptr"
+.Fa "intptr_t val"
+.Fa "const char *descr"
+.Fc
+.Ft struct sysctl_oid *
+.Fo SYSCTL_ADD_U16
+.Fa "struct sysctl_ctx_list *ctx"
+.Fa "struct sysctl_oid_list *parent"
+.Fa "int number"
+.Fa "const char *name"
+.Fa "int ctlflags"
+.Fa "unsigned int *ptr"
+.Fa "intptr_t val"
+.Fa "const char *descr"
+.Fc
+.Ft struct sysctl_oid *
.Fo SYSCTL_ADD_UINT
.Fa "struct sysctl_ctx_list *ctx"
.Fa "struct sysctl_oid_list *parent"
@@ -228,6 +254,8 @@
.Fn SYSCTL_STRING parent number name ctlflags arg len descr
.Fn SYSCTL_STRUCT parent number name ctlflags ptr struct_type descr
.Fn SYSCTL_ROOT_NODE number name ctlflags handler descr
+.Fn SYSCTL_U8 parent number name ctlflags ptr val descr
+.Fn SYSCTL_U16 parent number name ctlflags ptr val descr
.Fn SYSCTL_UINT parent number name ctlflags ptr val descr
.Fn SYSCTL_ULONG parent number name ctlflags ptr val descr
.Fn SYSCTL_UQUAD parent number name ctlflags ptr val descr
@@ -413,6 +441,8 @@ Static sysctls are declared using one of the
.Fn SYSCTL_ROOT_NODE ,
.Fn SYSCTL_STRING ,
.Fn SYSCTL_STRUCT ,
+.Fn SYSCTL_U8 ,
+.Fn SYSCTL_U16 ,
.Fn SYSCTL_UINT ,
.Fn SYSCTL_ULONG
or
@@ -429,6 +459,8 @@ Dynamic nodes are created using one of the
.Fn SYSCTL_ADD_ROOT_NODE ,
.Fn SYSCTL_ADD_STRING ,
.Fn SYSCTL_ADD_STRUCT ,
+.Fn SYSCTL_ADD_U8 ,
+.Fn SYSCTL_ADD_U16 ,
.Fn SYSCTL_ADD_UAUTO ,
.Fn SYSCTL_ADD_UINT ,
.Fn SYSCTL_ADD_ULONG ,
@@ -459,6 +491,10 @@ This is an opaque data structure.
.It Dv CTLTYPE_STRUCT
Alias for
.Dv CTLTYPE_OPAQUE .
+.It Dv CTLTYPE_U8
+This is an 8-bit unsigned integer.
+.It Dv CTLTYPE_U16
+This is a 16-bit unsigned integer.
.It Dv CTLTYPE_UINT
This is an unsigned integer.
.It Dv CTLTYPE_LONG
diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree
index 4ff700d..ad954d1 100644
--- a/share/misc/bsd-family-tree
+++ b/share/misc/bsd-family-tree
@@ -320,17 +320,21 @@ FreeBSD 5.2 | | | |
| | | | OpenBSD 5.6 |
| FreeBSD | | | |
| 10.1 | | | DragonFly 4.0.1
- | | | | |
- | | | | DragonFly 4.0.2
- | | | | |
- | | | | DragonFly 4.0.3
- | | | | |
- | | | | DragonFly 4.0.4
- | | | | |
- | | | | DragonFly 4.0.5
- | | | | |
- | | | OpenBSD 5.7 |
- | | | | DragonFly 4.2.0
+ | | | | | |
+ | | | | | DragonFly 4.0.2
+ | | | | | |
+ | | | | | DragonFly 4.0.3
+ | | | | | |
+ | | | | | DragonFly 4.0.4
+ | | | | | |
+ | | | | | DragonFly 4.0.5
+ | | | | | |
+ | | | | OpenBSD 5.7 |
+ | | | | | DragonFly 4.2.0
+ | FreeBSD | | | |
+ | 10.2 | | | |
+ | OS X NetBSD 7.0 | |
+ | 10.11 | OpenBSD 5.8 |
| | | | |
FreeBSD 11 -current | NetBSD -current OpenBSD -current DragonFly -current
| | | | |
@@ -673,6 +677,10 @@ DragonFly 4.0.4 2015-03-09 [DFB]
DragonFly 4.0.5 2015-03-23 [DFB]
OpenBSD 5.7 2015-05-01 [OBD]
DragonFly 4.2.0 2015-06-29 [DFB]
+FreeBSD 10.2 2015-08-13 [FBD]
+NetBSD 7.0 2015-09-25 [NBD]
+OS X 10.11 2015-09-30 [APL]
+OpenBSD 5.8 2015-10-18 [OBD]
Bibliography
------------------------
diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot
index 1ebf420..2b8866f 100644
--- a/share/misc/committers-src.dot
+++ b/share/misc/committers-src.dot
@@ -119,6 +119,7 @@ art [label="Artem Belevich\nart@FreeBSD.org\n2011/03/29"]
arybchik [label="Andrew Rybchenko\narybchik@FreeBSD.org\n2014/10/12"]
asomers [label="Alan Somers\nasomers@FreeBSD.org\n2013/04/24"]
avg [label="Andriy Gapon\navg@FreeBSD.org\n2009/02/18"]
+avos [label="Andriy Voskoboinyk\navos@FreeBSD.org\n2015/09/24"]
bapt [label="Baptiste Daroussin\nbapt@FreeBSD.org\n2011/12/23"]
bdrewery [label="Bryan Drewery\nbdrewery@FreeBSD.org\n2013/12/14"]
benl [label="Ben Laurie\nbenl@FreeBSD.org\n2011/05/18"]
@@ -205,6 +206,7 @@ joerg [label="Joerg Wunsch\njoerg@FreeBSD.org\n1993/11/14"]
jon [label="Jonathan Chen\njon@FreeBSD.org\n2000/10/17"]
jonathan [label="Jonathan Anderson\njonathan@FreeBSD.org\n2010/10/07"]
jpaetzel [label="Josh Paetzel\njpaetzel@FreeBSD.org\n2011/01/21"]
+jtl [label="Jonathan T. Looney\njtl@FreeBSD.org\n2015/10/26"]
julian [label="Julian Elischer\njulian@FreeBSD.org\n1993/04/19"]
jwd [label="John De Boskey\njwd@FreeBSD.org\n2000/05/19"]
kaiw [label="Kai Wang\nkaiw@FreeBSD.org\n2007/09/26"]
@@ -216,6 +218,7 @@ kib [label="Konstantin Belousov\nkib@FreeBSD.org\n2006/06/03"]
kmacy [label="Kip Macy\nkmacy@FreeBSD.org\n2005/06/01"]
kp [label="Kristof Provost\nkp@FreeBSD.org\n2015/03/22"]
le [label="Lukas Ertl\nle@FreeBSD.org\n2004/02/02"]
+lidl [label="Kurt Lidl\nlidl@FreeBSD.org\n2015/10/21"]
loos [label="Luiz Otavio O Souza\nloos@FreeBSD.org\n2013/07/03"]
lstewart [label="Lawrence Stewart\nlstewart@FreeBSD.org\n2008/10/06"]
marcel [label="Marcel Moolenaar\nmarcel@FreeBSD.org\n1999/07/03"]
@@ -232,6 +235,7 @@ melifaro [label="Alexander V. Chernikov\nmelifaro@FreeBSD.org\n2011/10/04"]
mjacob [label="Matt Jacob\nmjacob@FreeBSD.org\n1997/08/13"]
mjg [label="Mateusz Guzik\nmjg@FreeBSD.org\n2012/06/04"]
mlaier [label="Max Laier\nmlaier@FreeBSD.org\n2004/02/10"]
+mmel [label="Michal Meloun\nmmel@FreeBSD.org\n2015/11/01"]
monthadar [label="Monthadar Al Jaberi\nmonthadar@FreeBSD.org\n2012/04/02"]
mp [label="Mark Peek\nmp@FreeBSD.org\n2001/07/27"]
mr [label="Michael Reifenberger\nmr@FreeBSD.org\n2001/09/30"]
@@ -283,6 +287,7 @@ sephe [label="Sepherosa Ziehau\nsephe@FreeBSD.org\n2007/03/28"]
sepotvin [label="Stephane E. Potvin\nsepotvin@FreeBSD.org\n2007/02/15"]
simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2006/03/07"]
sjg [label="Simon J. Gerraty\nsjg@FreeBSD.org\n2012/10/23"]
+skra [label="Svatopluk Kraus\nslm@FreeBSD.org\n2015/10/28"]
slm [label="Stephen McConnell\nslm@FreeBSD.org\n2014/05/07"]
smh [label="Steven Hartland\nsmh@FreeBSD.org\n2012/11/12"]
sobomax [label="Maxim Sobolev\nsobomax@FreeBSD.org\n2001/07/25"]
@@ -332,6 +337,8 @@ day1 -> rgrimes
day1 -> alm
day1 -> dg
+adrian -> avos
+adrian -> lidl
adrian -> loos
adrian -> monthadar
adrian -> ray
@@ -456,6 +463,7 @@ gnn -> davide
gnn -> arybchik
gnn -> erj
gnn -> kp
+gnn -> jtl
grehan -> bryanv
@@ -565,11 +573,13 @@ kib -> jlh
kib -> jpaetzel
kib -> lulf
kib -> melifaro
+kib -> mmel
kib -> pho
kib -> pluknet
kib -> rdivacky
kib -> rmacklem
kib -> rmh
+kib -> skra
kib -> stas
kib -> tijl
kib -> trociny
@@ -658,6 +668,7 @@ rpaulo -> avg
rpaulo -> bschmidt
rpaulo -> dim
rpaulo -> jmmv
+rpaulo -> lidl
rpaulo -> ngie
rrs -> brucec
diff --git a/share/misc/scsi_modes b/share/misc/scsi_modes
index 781b8f1..80752e7 100644
--- a/share/misc/scsi_modes
+++ b/share/misc/scsi_modes
@@ -106,7 +106,7 @@
{EBACKERR} t1
{LogErr} t1
{Reserved} *t4
- {MRIE} b4
+ {MRIE} t4
{Interval Timer} i4
{Report Count} i4
}
diff --git a/share/mk/bsd.README b/share/mk/bsd.README
index cb6e41f..5aa1949 100644
--- a/share/mk/bsd.README
+++ b/share/mk/bsd.README
@@ -20,6 +20,7 @@ bsd.arch.inc.mk - includes arch-specific Makefile.$arch
bsd.compiler.mk - defined based on current compiler
bsd.confs.mk - install of configuration files
bsd.cpu.mk - sets CPU/arch-related variables (included from sys.mk)
+bsd.crunchgen.mk - building crunched binaries using crunchgen(1)
bsd.dep.mk - handle Makefile dependencies
bsd.doc.mk - building troff system documents
bsd.endian.mk - TARGET_ENDIAN=1234(little) or 4321 (big) for target
diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk
index dcdf598..9ad4bae 100644
--- a/share/mk/bsd.compiler.mk
+++ b/share/mk/bsd.compiler.mk
@@ -25,13 +25,34 @@
.if !target(__<bsd.compiler.mk>__)
__<bsd.compiler.mk>__:
+# Try to import COMPILER_TYPE and COMPILER_VERSION from parent make.
+# The value is only used/exported for the same environment that impacts
+# CC and COMPILER_* settings here.
+_exported_vars= COMPILER_TYPE COMPILER_VERSION
+_cc_hash= ${CC}${MACHINE}${PATH}
+_cc_hash:= ${_cc_hash:hash}
+# Only import if none of the vars are set somehow else.
+_can_export= yes
+.for var in ${_exported_vars}
+.if defined(${var})
+_can_export= no
+.endif
+.endfor
+.if ${_can_export} == yes
+.for var in ${_exported_vars}
+.if defined(${var}.${_cc_hash})
+${var}= ${${var}.${_cc_hash}}
+.endif
+.endfor
+.endif
+
.if ${MACHINE} == "common"
# common is a pseudo machine for architecture independent
# generated files - thus there is no compiler.
COMPILER_TYPE= none
COMPILER_VERSION= 0
.elif !defined(COMPILER_TYPE) || !defined(COMPILER_VERSION)
-_v!= ${CC} --version 2>/dev/null || echo 0.0.0
+_v!= ${CC} --version || echo 0.0.0
.if !defined(COMPILER_TYPE)
. if ${CC:T:M*gcc*}
@@ -54,6 +75,14 @@ COMPILER_VERSION!=echo ${_v:M[1-9].[0-9]*} | awk -F. '{print $$1 * 10000 + $$2 *
.undef _v
.endif
+# Export the values so sub-makes don't have to look them up again, using the
+# hash key computed above.
+.for var in ${_exported_vars}
+${var}.${_cc_hash}:= ${${var}}
+.export-env ${var}.${_cc_hash}
+.undef ${var}.${_cc_hash}
+.endfor
+
.if ${COMPILER_TYPE} == "clang" || \
(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40800)
COMPILER_FEATURES= c++11
diff --git a/share/mk/bsd.confs.mk b/share/mk/bsd.confs.mk
index 36298d7..aa5191f 100644
--- a/share/mk/bsd.confs.mk
+++ b/share/mk/bsd.confs.mk
@@ -4,11 +4,10 @@
.error bsd.conf.mk cannot be included directly.
.endif
-.if ${MK_INCLUDES} != "no"
CONFGROUPS?= CONFS
.if !target(buildconfig)
-.for group in ${CONFSGROUPS}
+.for group in ${CONFGROUPS}
buildconfig: ${${group}}
.endfor
.endif
@@ -22,10 +21,9 @@ all: buildconfig
${group}OWN?= ${SHAREOWN}
${group}GRP?= ${SHAREGRP}
${group}MODE?= ${CONFMODE}
-${group}DIR?= ${CONFIGDIR}/
+${group}DIR?= ${CONFDIR}
STAGE_SETS+= ${group}
STAGE_DIR.${group}= ${STAGE_OBJTOP}${${group}DIR}
-STAGE_SYMLINKS_DIR.${group}= ${STAGE_OBJTOP}
_${group}CONFS=
.for cnf in ${${group}}
@@ -46,7 +44,6 @@ STAGE_AS_${cnf:T}= ${${group}NAME_${cnf:T}}
# XXX {group}OWN,GRP,MODE
STAGE_DIR.${cnf:T}= ${STAGE_OBJTOP}${${group}DIR_${cnf:T}}
stage_as.${cnf:T}: ${cnf}
-stage_config: stage_as.${cnf:T}
installconfig: _${group}INS_${cnf:T}
_${group}INS_${cnf:T}: ${cnf}
@@ -60,7 +57,6 @@ _${group}CONFS+= ${cnf}
.endfor
.if !empty(_${group}CONFS)
stage_files.${group}: ${_${group}CONFS}
-stage_config: stage_files.${group}
installconfig: _${group}INS
_${group}INS: ${_${group}CONFS}
@@ -78,10 +74,12 @@ _${group}INS: ${_${group}CONFS}
.endif # !target(installconfig)
-.if ${MK_STAGING} != "no" && !defined(_SKIP_BUILD)
-.if !defined(NO_STAGE_CONFIG)
-STAGE_TARGETS+= stage_config
+.if ${MK_STAGING} != "no"
+.if !empty(STAGE_SETS)
+buildconfig: stage_files
+.if !empty(STAGE_AS_SETS)
+buildconfig: stage_as
+.endif
.endif
.endif
-.endif # ${MK_INCLUDES} != "no"
diff --git a/share/mk/bsd.crunchgen.mk b/share/mk/bsd.crunchgen.mk
index 0f0edd3..9618f5e 100644
--- a/share/mk/bsd.crunchgen.mk
+++ b/share/mk/bsd.crunchgen.mk
@@ -1,5 +1,7 @@
#################################################################
#
+# Generate crunched binaries using crunchgen(1).
+#
# General notes:
#
# A number of Make variables are used to generate the crunchgen config file.
@@ -13,14 +15,14 @@
# local architecture.
#
# Special options can be specified for individual programs
-# CRUNCH_SRCDIR_$(P): base source directory for program $(P)
-# CRUNCH_BUILDOPTS_$(P): additional build options for $(P)
-# CRUNCH_ALIAS_$(P): additional names to be used for $(P)
+# CRUNCH_SRCDIR_${P}: base source directory for program ${P}
+# CRUNCH_BUILDOPTS_${P}: additional build options for ${P}
+# CRUNCH_ALIAS_${P}: additional names to be used for ${P}
#
# By default, any name appearing in CRUNCH_PROGS or CRUNCH_ALIAS_${P}
# will be used to generate a hard link to the resulting binary.
# Specific links can be suppressed by setting
-# CRUNCH_SUPPRESS_LINK_$(NAME) to 1.
+# CRUNCH_SUPPRESS_LINK_${NAME} to 1.
#
# If CRUNCH_GENERATE_LINKS is set to no, no links will be generated.
#
@@ -31,138 +33,124 @@
# The following is pretty nearly a generic crunchgen-handling makefile
#
-CONF= $(PROG).conf
-OUTMK= $(PROG).mk
-OUTC= $(PROG).c
-OUTPUTS=$(OUTMK) $(OUTC) $(PROG).cache
+CONF= ${PROG}.conf
+OUTMK= ${PROG}.mk
+OUTC= ${PROG}.c
+OUTPUTS=${OUTMK} ${OUTC} ${PROG}.cache
CRUNCHOBJS= ${.OBJDIR}
.if defined(MAKEOBJDIRPREFIX)
CANONICALOBJDIR:= ${MAKEOBJDIRPREFIX}${.CURDIR}
.elif defined(MAKEOBJDIR) && ${MAKEOBJDIR:M/*} != ""
-CANONICALOBJDIR:=${MAKEOBJDIR}
+CANONICALOBJDIR:= ${MAKEOBJDIR}
.else
CANONICALOBJDIR:= /usr/obj${.CURDIR}
.endif
-CRUNCH_GENERATE_LINKS?= yes
+CRUNCH_GENERATE_LINKS?= yes
-CLEANFILES+= $(CONF) *.o *.lo *.c *.mk *.cache *.a *.h
+CLEANFILES+= ${CONF} *.o *.lo *.c *.mk *.cache *.a *.h
# Don't try to extract debug info from ${PROG}.
-MK_DEBUG_FILES=no
+MK_DEBUG_FILES= no
+
+# Set a default SRCDIR for each for simpler handling below.
+.for D in ${CRUNCH_SRCDIRS}
+.for P in ${CRUNCH_PROGS_${D}}
+CRUNCH_SRCDIR_${P}?= ${.CURDIR}/../../${D}/${P}
+.endfor
+.endfor
# Program names and their aliases contribute hardlinks to 'rescue' executable,
# except for those that get suppressed.
-.for D in $(CRUNCH_SRCDIRS)
-.for P in $(CRUNCH_PROGS_$(D))
-.ifdef CRUNCH_SRCDIR_${P}
-$(OUTPUTS): $(CRUNCH_SRCDIR_${P})/Makefile
-.else
-$(OUTPUTS): $(.CURDIR)/../../$(D)/$(P)/Makefile
-.endif
+.for D in ${CRUNCH_SRCDIRS}
+.for P in ${CRUNCH_PROGS_${D}}
+${OUTPUTS}: ${CRUNCH_SRCDIR_${P}}/Makefile
.if ${CRUNCH_GENERATE_LINKS} == "yes"
.ifndef CRUNCH_SUPPRESS_LINK_${P}
-LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(P)
+LINKS+= ${BINDIR}/${PROG} ${BINDIR}/${P}
.endif
-.for A in $(CRUNCH_ALIAS_$(P))
+.for A in ${CRUNCH_ALIAS_${P}}
.ifndef CRUNCH_SUPPRESS_LINK_${A}
-LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(A)
+LINKS+= ${BINDIR}/${PROG} ${BINDIR}/${A}
.endif
.endfor
.endif
.endfor
.endfor
-all: $(PROG)
-exe: $(PROG)
+all: ${PROG}
+exe: ${PROG}
-$(CONF): Makefile
- echo \# Auto-generated, do not edit >$(.TARGET)
+${CONF}: Makefile
+ echo \# Auto-generated, do not edit >${.TARGET}
.ifdef CRUNCH_BUILDOPTS
- echo buildopts $(CRUNCH_BUILDOPTS) >>$(.TARGET)
+ echo buildopts ${CRUNCH_BUILDOPTS} >>${.TARGET}
.endif
.ifdef CRUNCH_LIBS
- echo libs $(CRUNCH_LIBS) >>$(.TARGET)
+ echo libs ${CRUNCH_LIBS} >>${.TARGET}
.endif
.ifdef CRUNCH_SHLIBS
- echo libs_so $(CRUNCH_SHLIBS) >>$(.TARGET)
-.endif
-.for D in $(CRUNCH_SRCDIRS)
-.for P in $(CRUNCH_PROGS_$(D))
- echo progs $(P) >>$(.TARGET)
-.ifdef CRUNCH_SRCDIR_${P}
- echo special $(P) srcdir $(CRUNCH_SRCDIR_${P}) >>$(.TARGET)
-.else
- echo special $(P) srcdir $(.CURDIR)/../../$(D)/$(P) >>$(.TARGET)
+ echo libs_so ${CRUNCH_SHLIBS} >>${.TARGET}
.endif
+.for D in ${CRUNCH_SRCDIRS}
+.for P in ${CRUNCH_PROGS_${D}}
+ echo progs ${P} >>${.TARGET}
+ echo special ${P} srcdir ${CRUNCH_SRCDIR_${P}} >>${.TARGET}
.ifdef CRUNCH_BUILDOPTS_${P}
- echo special $(P) buildopts DIRPRFX=${DIRPRFX}${P}/ \
- $(CRUNCH_BUILDOPTS_${P}) >>$(.TARGET)
+ echo special ${P} buildopts DIRPRFX=${DIRPRFX}${P}/ \
+ ${CRUNCH_BUILDOPTS_${P}} >>${.TARGET}
.else
- echo special $(P) buildopts DIRPRFX=${DIRPRFX}${P}/ >>$(.TARGET)
+ echo special ${P} buildopts DIRPRFX=${DIRPRFX}${P}/ >>${.TARGET}
.endif
-.for A in $(CRUNCH_ALIAS_$(P))
- echo ln $(P) $(A) >>$(.TARGET)
+.for A in ${CRUNCH_ALIAS_${P}}
+ echo ln ${P} ${A} >>${.TARGET}
.endfor
.endfor
.endfor
CRUNCHGEN?= crunchgen
-# XXX Make sure we don't pass -P to crunchgen(1).
-.MAKEFLAGS:= ${.MAKEFLAGS:N-P}
-.ORDER: $(OUTPUTS) objs
-$(OUTPUTS): $(CONF) .META
- MAKE=${MAKE} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${CRUNCHGEN} -fq -m $(OUTMK) \
- -c $(OUTC) $(CONF)
+CRUNCHENV?= MK_TESTS=no
+.ORDER: ${OUTPUTS} objs
+${OUTPUTS}: ${CONF} .META
+ MAKE=${MAKE} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${CRUNCHGEN} -fq \
+ -m ${OUTMK} -c ${OUTC} ${CONF}
-$(PROG): $(OUTPUTS) objs
- MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) exe
+# These 2 targets cannot use .MAKE since they depend on the generated
+# ${OUTMK} above.
+${PROG}: ${OUTPUTS} objs
+ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f ${OUTMK} exe
-objs: $(OUTMK)
- MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) objs
+objs: ${OUTMK}
+ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f ${OUTMK} objs
# <sigh> Someone should replace the bin/csh and bin/sh build-tools with
# shell scripts so we can remove this nonsense.
-build-tools:
-.for _tool in $(CRUNCH_BUILDTOOLS)
- cd $(.CURDIR)/../../${_tool}; \
- MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \
- MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools
+.for _tool in ${CRUNCH_BUILDTOOLS}
+build-tools-${_tool}:
+ ${_+_}cd ${.CURDIR}/../../${_tool}; \
+ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \
+ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools
+build-tools: build-tools-${_tool}
.endfor
# Use a separate build tree to hold files compiled for this crunchgen binary
# Yes, this does seem to partly duplicate bsd.subdir.mk, but I can't
# get that to cooperate with bsd.prog.mk. Besides, many of the standard
# targets should NOT be propagated into the components.
-cleandepend cleandir obj objlink:
-.for D in $(CRUNCH_SRCDIRS)
-.for P in $(CRUNCH_PROGS_$(D))
-.ifdef CRUNCH_SRCDIR_${P}
- cd ${CRUNCH_SRCDIR_$(P)} && \
- MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
- DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET}
-.else
- cd $(.CURDIR)/../../${D}/${P} && \
- MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
- DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET}
-.endif
+.for __target in clean cleandepend cleandir obj objlink
+.for D in ${CRUNCH_SRCDIRS}
+.for P in ${CRUNCH_PROGS_${D}}
+${__target}_crunchdir_${P}: .PHONY .MAKE
+ ${_+_}cd ${CRUNCH_SRCDIR_${P}} && \
+ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
+ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${__target}
+${__target}: ${__target}_crunchdir_${P}
+.endfor
.endfor
.endfor
clean:
rm -f ${CLEANFILES}
- if [ -e ${.OBJDIR}/$(OUTMK) ]; then \
- MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) clean; \
+ ${_+_}if [ -e ${.OBJDIR}/${OUTMK} ]; then \
+ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} \
+ -f ${OUTMK} clean; \
fi
-.for D in $(CRUNCH_SRCDIRS)
-.for P in $(CRUNCH_PROGS_$(D))
-.ifdef CRUNCH_SRCDIR_${P}
- cd ${CRUNCH_SRCDIR_$(P)} && \
- MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
- DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET}
-.else
- cd $(.CURDIR)/../../${D}/${P} && \
- MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
- DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET}
-.endif
-.endfor
-.endfor
diff --git a/share/mk/bsd.files.mk b/share/mk/bsd.files.mk
index 6a6c66a..17a99d2 100644
--- a/share/mk/bsd.files.mk
+++ b/share/mk/bsd.files.mk
@@ -30,13 +30,12 @@ ${group}DIR?= ${BINDIR}
STAGE_SETS+= ${group}
.endif
STAGE_DIR.${group}= ${STAGE_OBJTOP}${${group}DIR}
-STAGE_SYMLINKS_DIR.${group}= ${STAGE_OBJTOP}
_${group}FILES=
.for file in ${${group}}
.if defined(${group}OWN_${file:T}) || defined(${group}GRP_${file:T}) || \
defined(${group}MODE_${file:T}) || defined(${group}DIR_${file:T}) || \
- defined(${group}NAME_${file:T})
+ defined(${group}NAME_${file:T}) || defined(${group}NAME)
${group}OWN_${file:T}?= ${${group}OWN}
${group}GRP_${file:T}?= ${${group}GRP}
${group}MODE_${file:T}?= ${${group}MODE}
diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk
index 72aedfb..d0992b6 100644
--- a/share/mk/bsd.man.mk
+++ b/share/mk/bsd.man.mk
@@ -104,8 +104,8 @@ ${__target}: ${__page}
.endfor
.endif
.endfor
-.endif
-.else
+.endif # !empty(MAN)
+.else # !defined(MANFILTER)
.if defined(MAN) && !empty(MAN)
CLEANFILES+= ${MAN:T:S/$/${CATEXT}/g}
.if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
@@ -120,9 +120,9 @@ ${__target}: ${__page}
_manpages: ${MAN}
.endif
.endif
-.endif
+.endif # defined(MANFILTER)
-.else
+.else # ${MK_MANCOMPRESS} == "yes"
ZEXT= ${MCOMPRESS_EXT}
@@ -169,7 +169,7 @@ ${__target}: ${__page}
.endfor
.endif
-.endif
+.endif # ${MK_MANCOMPRESS} == "no"
maninstall: _maninstall
_maninstall:
@@ -185,20 +185,26 @@ _maninstall: ${MAN}
${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page}
.endif
.endfor
-.else
-.for _page _sect in ${.ALLSRC:C/\.([^.]*)$/.\1 \1/}
- @d=${DESTDIR}${MANDIR}${_sect}${MANSUBDIR}/; \
- ${ECHO} ${MINSTALL} ${_page} $${d}; \
- ${MINSTALL} $${page} $${d};
-.endfor
+.else # !defined(MANFILTER)
+ @set ${.ALLSRC:C/\.([^.]*)$/.\1 \1/}; \
+ while : ; do \
+ case $$# in \
+ 0) break;; \
+ 1) echo "warn: missing extension: $$1"; break;; \
+ esac; \
+ page=$$1; shift; sect=$$1; shift; \
+ d=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}; \
+ ${ECHO} ${MINSTALL} $${page} $${d}; \
+ ${MINSTALL} $${page} $${d}; \
+ done
.if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
.for __page in ${MAN}
${MINSTALL} ${__page:T:S/$/${CATEXT}/} \
${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T}
.endfor
.endif
-.endif
-.else
+.endif # defined(MANFILTER)
+.else # ${MK_MANCOMPRESS} == "yes"
.for __page in ${MAN}
${MINSTALL} ${__page:T:S/$/${MCOMPRESS_EXT}/g} \
${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR}/
@@ -207,7 +213,7 @@ _maninstall: ${MAN}
${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T:S/$/${MCOMPRESS_EXT}/}
.endif
.endfor
-.endif
+.endif # ${MK_MANCOMPRESS} == "no"
.endif
.if !defined(NO_MLINKS) && defined(MLINKS) && !empty(MLINKS)
diff --git a/share/mk/bsd.progs.mk b/share/mk/bsd.progs.mk
index 2da30c7..c84e94b 100644
--- a/share/mk/bsd.progs.mk
+++ b/share/mk/bsd.progs.mk
@@ -31,7 +31,7 @@ UPDATE_DEPENDFILE_PROG = ${PROGS:[1]}
# They may have asked us to build just one
.for t in ${PROGS}
.if make($t)
-.if ${PROGS_CXX:M${t}}
+.if ${PROGS_CXX:U:M${t}}
PROG_CXX ?= $t
.endif
PROG ?= $t
@@ -116,16 +116,16 @@ x.$p= PROG_CXX=$p
$p ${p}_p: .PHONY .MAKE
(cd ${.CURDIR} && \
DEPENDFILE=.depend.$p \
- ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \
- SUBDIR= PROG=$p ${x.$p})
+ NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \
+ PROG=$p ${x.$p})
# Pseudo targets for PROG, such as 'install'.
.for t in ${PROGS_TARGETS:O:u}
$p.$t: .PHONY .MAKE
(cd ${.CURDIR} && \
DEPENDFILE=.depend.$p \
- ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \
- SUBDIR= PROG=$p ${x.$p} ${@:E})
+ NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \
+ PROG=$p ${x.$p} ${@:E})
.endfor
.endfor
diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk
index 037a7fe..f9b9e97 100644
--- a/share/mk/bsd.subdir.mk
+++ b/share/mk/bsd.subdir.mk
@@ -28,6 +28,10 @@
# See ALL_SUBDIR_TARGETS for list of targets that will recurse.
# Custom targets can be added to SUBDIR_TARGETS in src.conf.
#
+# Targets defined in STANDALONE_SUBDIR_TARGETS will always be ran
+# with SUBDIR_PARALLEL and will not respect .WAIT or SUBDIR_DEPEND_
+# values.
+#
.if !target(__<bsd.subdir.mk>__)
__<bsd.subdir.mk>__:
@@ -38,6 +42,10 @@ ALL_SUBDIR_TARGETS= all all-man buildconfig checkdpadd clean cleandepend \
realinstall regress tags \
${SUBDIR_TARGETS}
+# Described above.
+STANDALONE_SUBDIR_TARGETS?= obj checkdpadd clean cleandepend cleandir \
+ cleanilinks cleanobj
+
.include <bsd.init.mk>
.if !defined(NEED_SUBDIR)
@@ -63,35 +71,37 @@ distribute: .MAKE
.endfor
.endif
-_SUBDIR: .USE .MAKE
-.if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR)
- @${_+_}for entry in ${SUBDIR:N.WAIT}; do \
- if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \
- ${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE_ARCH} (${.TARGET:S,realinstall,install,:S,^_sub.,,})"; \
- edir=$${entry}.${MACHINE_ARCH}; \
- cd ${.CURDIR}/$${edir}; \
- else \
- ${ECHODIR} "===> ${DIRPRFX}$$entry (${.TARGET:S,realinstall,install,:S,^_sub.,,})"; \
- edir=$${entry}; \
- cd ${.CURDIR}/$${edir}; \
+# Subdir code shared among 'make <subdir>', 'make <target>' and SUBDIR_PARALLEL.
+_SUBDIR_SH= \
+ if test -d ${.CURDIR}/$${dir}.${MACHINE_ARCH}; then \
+ dir=$${dir}.${MACHINE_ARCH}; \
fi; \
- ${MAKE} ${.TARGET:S,realinstall,install,:S,^_sub.,,} \
- DIRPRFX=${DIRPRFX}$$edir/; \
- done
+ ${ECHODIR} "===> ${DIRPRFX}$${dir} ($${target})"; \
+ cd ${.CURDIR}/$${dir}; \
+ ${MAKE} $${target} DIRPRFX=${DIRPRFX}$${dir}/
+
+_SUBDIR: .USEBEFORE
+.if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR)
+ @${_+_}target=${.TARGET:S,realinstall,install,}; \
+ for dir in ${SUBDIR:N.WAIT}; do ( ${_SUBDIR_SH} ); done
.endif
${SUBDIR:N.WAIT}: .PHONY .MAKE
- ${_+_}@if test -d ${.TARGET}.${MACHINE_ARCH}; then \
- cd ${.CURDIR}/${.TARGET}.${MACHINE_ARCH}; \
- else \
- cd ${.CURDIR}/${.TARGET}; \
- fi; \
- ${MAKE} all
+ ${_+_}@target=all; \
+ dir=${.TARGET}; \
+ ${_SUBDIR_SH};
# Work around parsing of .if nested in .for by putting .WAIT string into a var.
__wait= .WAIT
.for __target in ${ALL_SUBDIR_TARGETS}
-.ifdef SUBDIR_PARALLEL
+# Can ordering be skipped for this and SUBDIR_PARALLEL forced?
+.if make(${__target}) && ${STANDALONE_SUBDIR_TARGETS:M${__target}}
+_is_standalone_target= 1
+SUBDIR:= ${SUBDIR:N.WAIT}
+.else
+_is_standalone_target= 0
+.endif
+.if defined(SUBDIR_PARALLEL) || ${_is_standalone_target} == 1
__subdir_targets=
.for __dir in ${SUBDIR}
.if ${__wait} == ${__dir}
@@ -99,31 +109,24 @@ __subdir_targets+= .WAIT
.else
__subdir_targets+= ${__target}_subdir_${__dir}
__deps=
+.if ${_is_standalone_target} == 0
.for __dep in ${SUBDIR_DEPEND_${__dir}}
__deps+= ${__target}_subdir_${__dep}
.endfor
-${__target}_subdir_${__dir}: .MAKE ${__deps}
+.endif
+${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps}
.if !defined(NO_SUBDIR)
- @${_+_}if test -d ${.CURDIR}/${__dir}.${MACHINE_ARCH}; then \
- ${ECHODIR} "===> ${DIRPRFX}${__dir}.${MACHINE_ARCH} (${__target:realinstall=install})"; \
- edir=${__dir}.${MACHINE_ARCH}; \
- cd ${.CURDIR}/$${edir}; \
- else \
- ${ECHODIR} "===> ${DIRPRFX}${__dir} (${__target:realinstall=install})"; \
- edir=${__dir}; \
- cd ${.CURDIR}/$${edir}; \
- fi; \
- ${MAKE} ${__target:realinstall=install} \
- DIRPRFX=${DIRPRFX}$$edir/
+ @${_+_}target=${__target:realinstall=install}; \
+ dir=${__dir}; \
+ ${_SUBDIR_SH};
.endif
.endif
-.endfor
+.endfor # __dir in ${SUBDIR}
${__target}: ${__subdir_targets}
.else
-${__target}: _sub.${__target}
-_sub.${__target}: _SUBDIR
-.endif
-.endfor
+${__target}: _SUBDIR
+.endif # SUBDIR_PARALLEL || _is_standalone_target
+.endfor # __target in ${ALL_SUBDIR_TARGETS}
# This is to support 'make includes' calling 'make buildincludes' and
# 'make installincludes' in the proper order, and to support these
@@ -132,8 +135,7 @@ _sub.${__target}: _SUBDIR
.for __stage in build install
${__stage}${__target}:
.if make(${__stage}${__target})
-${__stage}${__target}: _sub.${__stage}${__target}
-_sub.${__stage}${__target}: _SUBDIR
+${__stage}${__target}: _SUBDIR
.endif
.endfor
.if !target(${__target})
diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
index a5e78a3..7aca914 100644
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -210,21 +210,22 @@ __TT=${MACHINE}
.endif
.include <bsd.compiler.mk>
-.if !${COMPILER_FEATURES:Mc++11}
-# If the compiler is not C++11 capable, disable clang and use gcc instead.
-__DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX
-__DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC
-.elif ${__T} == "aarch64" || ${__T} == "amd64" || ${__TT} == "arm" || \
- ${__T} == "i386"
-# On x86 and arm, clang is enabled, and will be installed as the default cc.
+# If the compiler is not C++11 capable, disable Clang and use GCC instead.
+# This means that architectures that have GCC 4.2 as default can not
+# build Clang without using an external compiler.
+
+.if ${COMPILER_FEATURES:Mc++11} && (${__T} == "aarch64" || \
+ ${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386")
+# Clang is enabled, and will be installed as the default /usr/bin/cc.
__DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC
__DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX
-.elif ${__T:Mpowerpc*}
-# On powerpc, clang is enabled, but gcc is installed as the default cc.
+.elif ${COMPILER_FEATURES:Mc++11} && ${__T:Mpowerpc*}
+# On powerpc, if an external compiler that supports C++11 is used as ${CC},
+# then Clang is enabled, but GCC is installed as the default /usr/bin/cc.
__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX
__DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC
.else
-# Everything else disables clang, and uses gcc instead.
+# Everything else disables Clang, and uses GCC instead.
__DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX
__DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC
.endif
diff --git a/share/monetdef/Makefile b/share/monetdef/Makefile
index 8a5aab7..c15e245 100644
--- a/share/monetdef/Makefile
+++ b/share/monetdef/Makefile
@@ -2,7 +2,7 @@
# Warning: Do not edit. This file is automatically generated from the
# tools in /usr/src/tools/tools/locale.
-LOCALEDIR= /usr/share/locale
+LOCALEDIR= ${SHAREDIR}/locale
FILESNAME= LC_MONETARY
.SUFFIXES: .src .out
diff --git a/share/msgdef/Makefile b/share/msgdef/Makefile
index 008fb7b..6dcb747 100644
--- a/share/msgdef/Makefile
+++ b/share/msgdef/Makefile
@@ -2,7 +2,7 @@
# Warning: Do not edit. This file is automatically generated from the
# tools in /usr/src/tools/tools/locale.
-LOCALEDIR= /usr/share/locale
+LOCALEDIR= ${SHAREDIR}/locale
FILESNAME= LC_MESSAGES
.SUFFIXES: .src .out
diff --git a/share/numericdef/Makefile b/share/numericdef/Makefile
index c1dbcc8..ed32a68 100644
--- a/share/numericdef/Makefile
+++ b/share/numericdef/Makefile
@@ -2,7 +2,7 @@
# Warning: Do not edit. This file is automatically generated from the
# tools in /usr/src/tools/tools/locale.
-LOCALEDIR= /usr/share/locale
+LOCALEDIR= ${SHAREDIR}/locale
FILESNAME= LC_NUMERIC
.SUFFIXES: .src .out
diff --git a/share/sendmail/Makefile b/share/sendmail/Makefile
index 8153d49..a548b63 100644
--- a/share/sendmail/Makefile
+++ b/share/sendmail/Makefile
@@ -7,7 +7,7 @@ CFDIR= cf
CFDIRS!= (cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type d -print)
CFFILES!= (cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type f -print)
-DDIR= ${DESTDIR}/usr/share/sendmail
+DDIR= ${DESTDIR}${SHAREDIR}/sendmail
# Define SHARED to indicate whether you want symbolic links to the system
# source (``symlinks''), or a separate copy (``copies'')
diff --git a/share/skel/Makefile b/share/skel/Makefile
index 305a455..6b67d2b 100644
--- a/share/skel/Makefile
+++ b/share/skel/Makefile
@@ -5,8 +5,8 @@ FILESGROUPS= FILES1 FILES2
FILES1= dot.cshrc dot.login dot.login_conf dot.mailrc dot.profile \
dot.shrc
FILES2= dot.mail_aliases dot.rhosts
-FILES1DIR= /usr/share/skel
-FILES2DIR= /usr/share/skel
+FILES1DIR= ${SHAREDIR}/skel
+FILES2DIR= ${SHAREDIR}/skel
FILES1MODE= 0644
FILES2MODE= 0600
OpenPOWER on IntegriCloud