Commit Graph

19623 Commits

Author SHA1 Message Date
Enji Cooper
760b1a815b Standardize -std=c++* as CXXSTD`
CXXSTD was added as the C++ analogue to CSTD.

CXXSTD defaults to `-std=c++11` with supporting compilers; `-std=gnu++98`,
otherwise for older versions of g++.

This change standardizes the CXXSTD variable, originally added to
googletest.test.inc.mk as part of r345203.

As part of this effort, convert all `CXXFLAGS+= -std=*` calls to use `CXXSTD`.

Notes:

This value is not sanity checked in bsd.sys.mk, however, given the two
most used C++ compilers on FreeBSD (clang++ and g++) support both modes, it is
likely to work with both toolchains. This method will be refined in the future
to support more variants of C++, as not all versions of clang++ and g++ (for
instance) support C++14, C++17, etc.

Any manual appending of `-std=*` to `CXXFLAGS` should be replaced with CXXSTD.
Example:

Before this commit:
```
CXXFLAGS+=	-std=c++14
```

After this commit:
```
CXXSTD=	c++14
```

Reviewed by:	asomers
Approved by:	emaste (mentor)
MFC after:	1 month
MFC with:	r345203, r345704, r345705
Relnotes:	yes
Tested with:	make tinderbox
Differential Revision:	https://reviews.freebsd.org/D19732
2019-03-29 18:31:48 +00:00
Enji Cooper
752cabaa1c Revert r345704
I accidentally committed code from two reviews. I will reintroduce the code to
bsd.progs.mk as part of a separate commit from r345704.

Approved by:	emaste (mentor, implicit)
MFC after:	2 months
MFC with:	r345704
2019-03-29 18:16:33 +00:00
Enji Cooper
9a41926bfb CXXSTD is the C++ analogue to CSTD.
CXXSTD defaults to `-std=c++11` with supporting compilers; `-std=gnu++98`,
otherwise for older versions of g++.

This change standardizes the CXXSTD variable, originally added to
googletest.test.inc.mk as part of r345203.

As part of this effort, convert all `CXXFLAGS+= -std=*` calls to use `CXXSTD`.

Notes:

This value is not sanity checked in bsd.sys.mk, however, given the two
most used C++ compilers on FreeBSD (clang++ and g++) support both modes, it is
likely to work with both toolchains. This method will be refined in the future
to support more variants of C++, as not all versions of clang++ and g++ (for
instance) support C++14, C++17, etc.

Any manual appending of `-std=*` to `CXXFLAGS` should be replaced with CXXSTD.
Example:

Before this commit:
```
CXXFLAGS+=	-std=c++14
```

After this commit:
```
CXXSTD=	c++14
```

Reviewed by:	asomers
Approved by:	emaste (mentor)
MFC after:	1 month
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D19732
2019-03-29 18:13:44 +00:00
Alan Somers
b432a7f8cb Add man page for VOP_FDATASYNC(9)
Reviewed by:    kib
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D19678
2019-03-29 02:44:20 +00:00
Enji Cooper
fb72cf61ac Spam CXXFLAGS with -I${DESTDIR}/usr/include/private, instead of GTEST_CXXFLAGS
This makes it easier for googletest users to leverage googletest, instead of
forcing them to plug GTEST_CXXFLAGS into CXXFLAGS manually (resulting in
unnecessary duplication).

I will be following this up with a more proper fix in src.libnames.mk, as
src.libnames.mk should be automatically adding this directory to
CFLAGS/CXXFLAGS when private libraries are referenced. Not doing so can result
in mismatches between base-provided private library's and ports-provided
library's headers.

While here, tweak the comment to clarify what the intent is behind spamming
CXXFLAGS.

MFC after:	5 weeks
MFC with:	r345203
Reported by:	asomers
Reviewed by:	asomers
Approved by:	emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D19731
2019-03-28 17:22:31 +00:00
John Baldwin
ffad9893e7 Remove the TIMED src option from the list of options.
This was missed in r342139 when timed(8) was removed and fixes a
warning when running makeman to regenerate src.conf.5.

Differential Revision:	https://reviews.freebsd.org/D19486
2019-03-26 20:44:02 +00:00
Philip Paeps
107510b8a4 SZ has been known as Eswatini since April 2018 (formerly Swaziland).
Sources:
https://www.iso.org/obp/ui/#iso:code:3166:SZ
http://www.un.org/en/member-states/index.html#gotoE
http://www.times.co.sz/news/118373-kingdom-of-eswatini-change-now-official.html

MFC after:	3 days
2019-03-26 09:46:17 +00:00
Michael Tuexen
0999766ddf Add sysctl variable net.inet.tcp.rexmit_initial for setting RTO.Initial
used by TCP.

Reviewed by:		rrs@, 0mp@
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D19355
2019-03-23 21:36:59 +00:00
Andrey V. Elsukov
0bd4858ed3 Add ability to automatically load ipfw_nat64, ipfw_nptv6 and ipfw_pmod
modules by declaring corresponding variables in rc.conf. Also document
them in rc.conf(5).

Submitted by:	Dries Michiels
Differential Revision:	https://reviews.freebsd.org/D19673
2019-03-23 15:41:32 +00:00
Konstantin Belousov
fc56fdf35a Add UPDATING note for geom_uzip(4)/xz, and bump geom_uzip(4) man page date.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2019-03-23 10:13:01 +00:00
Alan Somers
f6a363a50d Add man page for VOP_FDATASYNC(9)
Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D19678
2019-03-22 18:42:34 +00:00
Mitchell Horne
0d3cbca80b Update mentor and calendar files
Add an entry for myself (mhorne) to these files.

Approved by:	markj
2019-03-22 17:37:14 +00:00
Jung-uk Kim
0fa5ee1f53 Catch up with Clang 8.0. 2019-03-21 21:45:02 +00:00
Jung-uk Kim
f4590b8c3a Catch up with Clang 7.0.
MFC after:	3 days
2019-03-21 21:43:23 +00:00
Edward Tomasz Napierala
6017706303 Attach the vmci(4) man page to the build. Looks like it's been
missed by mistake.

MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2019-03-21 08:51:32 +00:00
Eric Joyner
10a1e981d4 iflib: mark isc_driver_version as constant
From Jake:
The iflib core never modifies the isc_driver_version string. Allow
drivers to safely assign pointers to constant buffers by marking this
parameter const.

Submitted by:	Jacob Keller <jacob.e.keller@intel.com>
Reviewed by:	erj@, gallatin@, jhb@
MFC after:	1 week
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D19577
2019-03-19 23:44:26 +00:00
Dimitry Andric
07302582b6 Turn on MK_OPENMP for i386 by default, now that it can build.
Noticed by:	jbeich
PR:		236062, 236582
MFC after:	1 month
X-MFC-With:	r344779
2019-03-19 06:58:28 +00:00
Dimitry Andric
b0840a28f6 Connect lib/libomp to the build.
* Set MK_OPENMP to yes by default only on amd64, for now.
* Bump __FreeBSD_version to signal this addition.
* Ensure gcc's conflicting omp.h is not installed if MK_OPENMP is yes.
* Update OptionalObsoleteFiles.inc to cope with the conflicting omp.h.
* Regenerate src.conf(5) with new WITH/WITHOUT fragments.

Relnotes:	yes
PR:		236062
MFC after:	1 month
X-MFC-With:	r344779
2019-03-16 15:45:15 +00:00
Oleksandr Tymoshenko
0004c28dda Fix build for KLD dyn_sysctl example
Looks like the example was broken by change of SYSCTL_STATIC_CHILDREN
definition in r267992. Fix build by switching to using SYSCTL_ADD_ROOT_NODE

PR:		236139
Submitted by:	Andrew Reiter <arr@watson.org>
MFC after:	1 week
2019-03-16 04:24:02 +00:00
Enji Cooper
7840b63a78 Regenerate src.conf(5) after r345203 (MK_GOOGLETEST addition)
MFC after:	2 months
MFC with:	r345203
Approved by:	emaste (mentor; implicit: https://reviews.freebsd.org/D19551)
2019-03-15 21:46:54 +00:00
Enji Cooper
5193fcde8d Initial googlemock/googletest integration into the build/FreeBSD test suite
This initial integration takes googlemock/googletest release 1.8.1, integrates
the library, tests, and sample unit tests into the build.

googlemock/googletest's inclusion is optionally available via `MK_GOOGLETEST`.
`MK_GOOGLETEST` is dependent on `MK_TESTS` and is enabled by default when
built with a C++11 capable toolchain.

Google tests can be specified via the `GTESTS` variable, which, in comparison
with the other test drivers, is more simplified/streamlined, as Googletest only
supports C++ tests; not raw C or shell tests (C tests can be written in C++
using the standard embedding methods).

No dependent libraries are assumed for the tests. One must specify `gmock`,
`gmock_main`, `gtest`, or `gtest_main`, via `LIBADD` for the program.

More information about googlemock and googletest can be found on the
Googletest [project page](https://github.com/google/googletest), and the
[GoogleMock](https://github.com/google/googletest/blob/v1.8.x/googlemock/docs/Documentation.md)
and
[GoogleTest](https://github.com/google/googletest/tree/v1.8.x/googletest/docs)
docs.

These tests are originally integrated into the build as plain driver tests, but
will be natively integrated into Kyua in a later version.

Known issues/Errata:
* [WhenDynamicCastToTest.AmbiguousCast fails on FreeBSD](https://github.com/google/googletest/issues/2172)

Reviewed by:	asomers
Approved by:	emaste (mentor)
MFC after:	2 months
Differential Revision: https://reviews.freebsd.org/D19551
2019-03-15 21:43:52 +00:00
Alan Somers
398467c1e4 VOP_INACTIVE(9): clarify wording
Reviewed by:	kib, 0mp
MFC after: 	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D19596
2019-03-15 21:11:47 +00:00
Guangyuan Yang
ee072597f3 Add myself to committers-doc.dot.
Reminded by:	rgrimes
2019-03-15 00:20:28 +00:00
Ed Maste
22ae5464d6 firmware(9): remove uuencoded example
We can (should) just commit the binary files to the source tree.

Reviewed by:	bz, imp, 0mp
Differential Revision:	https://reviews.freebsd.org/D19581
2019-03-14 17:09:07 +00:00
Eugene Grosbein
9405761f7b mfi.4, mrsas.4: document how to get ATA TRIM support for SSD
while using LSI RAID adapters as it was completely obscure before:
mfi has no TRIM support at all and mrsas provides TRIM
if underlying adapter does it (for Non-RAID drives generally).
2019-03-13 09:48:33 +00:00
Benedict Reuschling
1b35da5af7 Extend descriptions and comments about the need to create /etc/pf.conf.
FreeBSD removed the default /etc/pf.conf file in previous releases, but
the documentation kept mentioning it like any other file present in the
system.  Change pf.conf(5) to mention in the description of the default
ruleset location that this file needs to be created manually. Also, the
default rc.conf file had it's comment extended a bit to let people know
that this file does not exist by default.

PR:		    231977
Submitted by:	    koobs@
Reviewed by:	    kp@, 0mp@
Approved by:	    kp@
MFC after:	    10 days
Differential Revision:	https://reviews.freebsd.org/D19530
2019-03-12 20:08:37 +00:00
Mateusz Piotrowski
96fdbc90b2 ports.7: Add an example of how to use flavors
At the moment the manual page is not documenting how to build
a flavored package. Let's start documenting flavors with
an example of a typical use case.

Reported by:	cem, dim
Reviewed by:	bcr, cem, mat, matthew
Approved by:	cem (src)
Differential Revision:	https://reviews.freebsd.org/D19531
2019-03-12 09:27:37 +00:00
John Baldwin
1c37687de1 Update ccr(4) to note recent support for SHA2-224 and plain SHA hashes.
MFC after:	3 days
Sponsored by:	Chelsio Communications
2019-03-11 23:18:09 +00:00
Enji Cooper
eb1761b004 MFhead@r345025 2019-03-11 21:00:58 +00:00
Enji Cooper
9bfc4020c4 Compile and install most of the googletest examples
sample9_unittest is not compiled/installed, because it intentionally fails
and would result in red test runs until broken to always pass.
2019-03-11 19:50:44 +00:00
Glen Barber
735a3eae28 Update entries for accounts@, backups@, dnsadm@, mirror-admin@, and
remove refadm@.

Sponsored by:	The FreeBSD Foundation
2019-03-11 15:47:26 +00:00
Glen Barber
1da1f2c229 Update the re@ member list.
Sponsored by:	The FreeBSD Foundation
2019-03-11 15:36:24 +00:00
Enji Cooper
ff511f1f39 MFhead@r344996 2019-03-11 03:02:58 +00:00
Andriy Voskoboinyk
786ac7035f Fix ieee80211_radiotap(9) usage in wireless drivers:
- Alignment issues:
 * Add missing __packed attributes + padding across all drivers; in
most places there was an assumption that padding will be always
minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) -
padding was just missing.
 * Add __aligned(8) attribute for all Rx radiotap headers since they can
contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so
just drop the attribute here. Refresh ieee80211_radiotap(9) man page
accordingly.

- Since net80211 automatically updates channel frequency / flags in
ieee80211_radiotap_chan_change() drop duplicate setup for these fields
in drivers.

Tested with Netgear WG111 v3 (urtw(4)), STA mode.

MFC after:	2 weeks
2019-03-11 01:27:01 +00:00
Mateusz Piotrowski
ca588aed6d style.mdoc.5: Fix formatting issues
Reviewed by:	bcr
Approved by:	bcr (doc)
Approved by:	krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D19532
2019-03-10 20:58:59 +00:00
Benedict Reuschling
849bfb6d3d Update members of doceng in the chart.
Update the members of the doceng team to include ryusuke@ and me.
Sort and reduce number of line breaks so that our bubble in the
chart is a bit more compact (similar to portmgr next to it).

Reminded by:    gjb
2019-03-08 18:58:41 +00:00
John Baldwin
2e43efd0bb Drop "All rights reserved" from my copyright statements.
Reviewed by:	rgrimes
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D19485
2019-03-06 22:11:45 +00:00
John Baldwin
e91609a771 Divorce MK_GDB from MK_BINUTILS.
This permits legacy GDB to still be built and installed if
WITHOUT_BINUTILS is set (e.g. if base/binutils is installed).

Reviewed by:	emaste
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D19480
2019-03-06 20:13:02 +00:00
John Baldwin
bfdf8aa9f7 Regenerate src.conf.5 for recent changes.
Updates include removal of DRM2 and addition of several options
related to secure booting.
2019-03-06 20:10:23 +00:00
Benedict Reuschling
1e61b94049 Update the core-secretary role.
With the last core election, matthew@ stepped down and handed over to jrm@ to
serve as new core secretary. Update this file to match.

Approved by:	core (implicit)
2019-03-06 17:37:56 +00:00
Marcin Wojtas
13ea0450a9 Extend libsecureboot(old libve) to obtain trusted certificates from UEFI and implement revocation
UEFI related headers were copied from edk2.

A new build option "MK_LOADER_EFI_SECUREBOOT" was added to allow
loading of trusted anchors from UEFI.

Certificate revocation support is also introduced.
The forbidden certificates are loaded from dbx variable.
Verification fails in two cases:

There is a direct match between cert in dbx and the one in the chain.
The CA used to sign the chain is found in dbx.
One can also insert a hash of TBS section of a certificate into dbx.
In this case verifications fails only if a direct match with a
certificate in chain is found.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Reviewed by: sjg
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision:	https://reviews.freebsd.org/D19093
2019-03-06 06:39:42 +00:00
Enji Cooper
b18a4ccab9 MFhead@r344786 2019-03-05 01:00:38 +00:00
Ian Lepore
e70ece1297 Allow the sector size of the disk device to be configured using hints or
FDT data.  The sector size must be a multiple of the device's page size.
If not configured, use the historical default of the device page size.

Setting the disk sector size to 512 or 4096 allows a variety of standard
filesystems to be used on the device.  Of course you wouldn't want to be
writing frequently to a SPI flash chip like it was a disk drive, but for
data that gets written once (or rarely) and read often, using a standard
filesystem is a nice convenient thing.
2019-03-02 23:20:47 +00:00
Enji Cooper
1ece6232d2 Remove references to pdwait4(2) and CAP_PDWAIT from rights(4)
@cem removed references to pdwait4(2) (a nonexistent syscall) in
r320058.

This change removes references to pdwait4(2) and `CAP_PDWAIT` in
rights(4) to not mislead the user into thinking that pdwait4(2)/`CAP_PDWAIT` is
actually implemented in the stock FreeBSD kernel.

The goal of this functionality was to simplify monitoring/manipulating
processes started with `pdfork`, et al, and avoid races with waiting on pids.
The syscall was never completed though--just discussed on the capsicum mailing
list back in 2015:
https://lists.cam.ac.uk/pipermail/cl-capsicum-discuss/2015-May/msg00012.html
. That being said, there are members of the project (@rwatson, etc) who
have longterm goals to implement this syscall to better secure pdfork(2)
calls.

PR:		235871
Reviewed by:	emaste
Discussed with:	rwatson
Approved by:	emaste (mentor)
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D18950
2019-02-28 18:12:14 +00:00
Alexander Motin
17ec774693 Add to isp(4) tunables to limit MSI/MSI-X usage.
There are some problem reports possibly related to the new driver use of
multiple interrupts on older cards.  Hopefully this allow to workaround
them.

MFC after:	1 week
Sponsored by:	iXsystems, Inc.
2019-02-28 15:24:00 +00:00
Ian Lepore
5a978eadf7 Add manpages for at45d(4) and mx25l(4). 2019-02-26 22:50:01 +00:00
Konstantin Belousov
e8643b01e6 Modularize xz.
Embedded lzma decompression library becomes a module usable by other
consumers, in addition to geom_uzip.

Most important code changes are
- removal of XZ_DEC_SINGLE define, we need the code to work
  with XZ_DEC_DYNALLOC;
- xz_crc32_init() call is removed from geom_uzip, xz module handles
  initialization on its own.

xz is no longer embedded into geom_uzip, instead the depend line for
the module is provided, and corresponding kernel option is added to
each MIPS kernel config file using geom_uzip.

The commit also carries unrelated cleanup by removing excess "device geom_uzip"
in places which were missed in r344479.

Reviewed by:	cem, hselasky, ray, slavash (previous versions)
Sponsored by:	Mellanox Technologies
Differential revision:	https://reviews.freebsd.org/D19266
MFC after:	3 weeks
2019-02-26 19:55:03 +00:00
Simon J. Gerraty
a92958df34 Enable build of libbearssl
Reviewed by:	emaste
Sponsored by:	Juniper Networks
Differential Revision:	D16337
2019-02-26 06:11:01 +00:00
Ed Maste
e1157dcec4 Make libifconfig INTERNALLIB
Instead of PRIVATELIB + NO_PIC.  This avoids the need for the wlandebug
PIE special case added in r344211, and provides a stronger guarantee
against 3rd party software coming to depend on the API or ABI.

If / when we declare the API/ABI to be stable we can make it a normal
library.

Discussed with:	bapt
Sponsored by:	The FreeBSD Foundation
2019-02-25 18:22:20 +00:00
Enji Cooper
18b18078f2 MFhead@r344527 2019-02-25 18:00:14 +00:00