Commit Graph

18530 Commits

Author SHA1 Message Date
Enji Cooper
927b89d07b Fix typo with missing line continuation added in r321956 2017-08-02 22:02:33 +00:00
Enji Cooper
2b2566c4c4 Expose _TESTS_USE_OBJDIR as MK_MAKE_CHECK_USE_SANDBOX and anchor the default
value on MK_TESTS.

Use bsd.opts.mk in suite.test.mk to toggle the behavior.
2017-08-02 22:01:06 +00:00
Enji Cooper
a1c2413d52 Promote MK_TESTS from src.opts.mk to bsd.opts.mk
This knob is needed here to avoid polluting suite.tests.mk with src.opts.mk for
a knob that will be introduced in the following commit.
2017-08-02 21:52:59 +00:00
Enji Cooper
ba25b1ca42 Delete comment above "__DEFAULT_DEPENDENT_OPTIONS" related to "meta mode options"
src.conf(5) should document which knobs are which and the dependency between each;
remove the comment so the variable can apply to non-"meta mode options".

MFC after:	2 weeks
2017-08-02 21:49:37 +00:00
Enji Cooper
57a87b0695 Regenerate src.conf(5) per change made in r321952 2017-08-02 21:40:51 +00:00
Enji Cooper
edb58145c8 Allowing MK_NLS_CATALOGS to be enabled if MK_NLS == no doesn't make a whole lot
of sense. Anchor MK_NLS_CATALOGS being enabled off of MK_NLS.

MFC after:	1 month
2017-08-02 21:38:15 +00:00
Enji Cooper
f117e4e1df Some minor doc fixups
- Tweak a sentence by placing the modifier before an adjective to make it flow
  better.
- Fix a typo.

MFC after:	3 days
2017-08-02 21:31:46 +00:00
Enji Cooper
fa895917d3 Only tweak DESTDIR, etc if actively invoking "make check"
This fixes "make installworld"/"make install" (standard use).
2017-08-02 20:23:25 +00:00
Dru Lavigne
eb4db65b18 Update my entry in marketing. 2017-08-02 12:31:03 +00:00
Enji Cooper
d511b20a69 Add HAS_TESTS to all Makefiles that are currently using the
`SUBDIR.${MK_TESTS}+= tests` idiom.

This is a follow up to r321912.
2017-08-02 08:50:42 +00:00
Enji Cooper
46b37aa2c4 MFhead@r321912 2017-08-02 08:38:36 +00:00
Enji Cooper
4b330699f8 Convert traditional ${MK_TESTS} conditional idiom for including test
directories to SUBDIR.${MK_TESTS} idiom

This is being done to pave the way for future work (and homogenity) in
^/projects/make-check-sandbox .

No functional change intended.

MFC after:	1 weeks
2017-08-02 08:35:51 +00:00
Enji Cooper
5e291c3faf Hook HAS_TESTS (r321901) in to bsd.lib.mk and bsd.prog.mk
Apply the required sugar to make "make check" just work (tm) when
invoked from a subdirectory where HAS_TESTS is defined in the
relevant Makefile.

Adjust $LD_LIBRARY_PATH and $PATH appropriately from bsd.lib.mk
and bsd.prog.mk to make the "user experience" more out of the
box/seamless.
2017-08-02 03:18:24 +00:00
Enji Cooper
fee25c6847 Clean up DESTDIR, not CHECKDIR
While here, make the variable immediate to avoid silly mistakes that might
result in wiping out / by accident if the variable is evaluated in a delayed
manner due to poor use of $DESTDIR.
2017-08-02 03:09:55 +00:00
Enji Cooper
63c10f414b Make "make check" smarter when run from a root directory
If the user decides to specify HAS_TESTS in the upper directory, "make check"
will now iterate down the "test" directory, running the tests with an assumably
sane default value for $LD_LIBRARY_PATH, $PATH, etc.

The purpose of this work is to simplify "make check" -- in particular, to
increase dev-test velocity and get me (and others who pay attention, like
me) out of the business of paying attention to Jenkins runs and get other
developers to (hopefully) test their code more often prior to commit.

Huge caveat:

Obviously, this will fail miserably when the host can't run the target
architecture/code. Necessary compat layer or qemu usermode will be required
to make this possible, which is outside the scope of this work (batteries
not included).
2017-08-02 03:06:08 +00:00
Enji Cooper
ea75327a3c Add _FILESMKDIR
_FILESMKDIR is an internal knob for creating directories

It's by no means a substitute for mtrees since the semantics for using install
are a bit rudimentary -- it's meant purely to simplify automatic directory creation
without having to invoke "make hier[archy]" from ${SRCTOP} in order to populate
a directory tree.
2017-08-02 02:56:48 +00:00
Bryan Drewery
91234af7d8 CCACHE_BUILD: Follow-up r321880: Fix some PATH issues with buildworld.
- bsd.compiler.mk: Must ensure that the CCACHE_WRAPPER_PATH comes first
  in PATH.
- Makefile.inc1: Must prepend the CCACHE_WRAPPER_PATH into BPATH as it
  overrides the PATH set in bsd.compiler.mk in sub-makes.  The PATH
  set in bsd.compiler.mk is not exported and doing so would cause it to
  then override the BPATH set from environment.  The only sane solution
  is to prepend into BPATH as needed.
CCACHE_PATH could possibly be used for some of this as well.

Sponsored by:	Dell EMC Isilon
2017-08-01 18:26:20 +00:00
Sevan Janiyan
26b5613dfc For the udp-client example, instruct user to add an entry for a udp based
service.
For tcp-client & udp-client, use the same port in configuration snippet as used
in the comment prior to remove any ambiguity on the port number which needs to
be specified.

Reviewed by:	bcr (mentor) wblock (mentor)
Approved by:	gavin
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D9830
2017-08-01 16:20:33 +00:00
Bryan Drewery
e2a659ea64 CCACHE_BUILD: Allow setting CCACHE_BUILD_TYPE=wrapper.
This uses the /usr/local/libexec/ccache/<cc,c++> wrappers rather than
modifying CC to be '/usr/local/bin/ccache cc'.  Some forms of compilation
do not support the 'command' type.

Sponsored by:	Dell EMC Isilon
2017-08-01 16:15:08 +00:00
Glen Barber
6f4c1b61b2 Update doceng, re, security-officer, clusteradm, webmaster and
donations entries.

Requested by:	sevan
Sponsored by:	The FreeBSD Foundation
2017-08-01 16:05:23 +00:00
Stefan Eßer
eb69150993 Adjust path to X11 locale files (/usr/X11 has been changed to /usr/local a
long ago) in comment. No functional change.
2017-08-01 09:34:15 +00:00
Stefan Eßer
5c4a023c86 Add alternate Turkish keyboard layout F. The layout and menu texts have
been provided by Ufuk Güler, with minor changes for consistency by me.

Submitted by:	Ufuk Güler <ufukguler@yahoo.com>
MFC after:	1 week
2017-08-01 09:30:21 +00:00
Dmitry Chagin
77d3337c9f Implement proper Linux /dev/fd and /proc/self/fd behavior by adding
Linux specific things to the native fdescfs file system.

Unlike FreeBSD, the Linux fdescfs is a directory containing a symbolic
links to the actual files, which the process has open.
A readlink(2) call on this file returns a full path in case of regular file
or a string in a special format (type:[inode], anon_inode:<file-type>, etc..).
As well as in a FreeBSD, opening the file in the Linux fdescfs directory is
equivalent to duplicating the corresponding file descriptor.

Here we have mutually exclusive requirements:
- in case of readlink(2) call fdescfs lookup() method should return VLNK
vnode otherwise our kern_readlink() fail with EINVAL error;
- in the other calls fdescfs lookup() method should return non VLNK vnode.

For what new vnode v_flag VV_READLINK was added, which is set if fdescfs has beed
mounted with linrdlnk option an modified kern_readlinkat() to properly handle it.

For now For Linux ABI compatibility mount fdescfs volume with linrdlnk option:

    mount -t fdescfs -o linrdlnk null /compat/linux/dev/fd

Reviewed by:	kib@
MFC after:	1 week
Relnotes:	yes
2017-08-01 03:40:19 +00:00
Baptiste Daroussin
282aa9d648 Update pci_vendors to 2017.07.27
MFC after:	2 days
2017-07-31 19:51:36 +00:00
Ian Lepore
f37b7fc2d4 Add taskqueue_enqueue_timeout_sbt(), because sometimes you want more control
over the scheduling precision than 'ticks' can offer, and because sometimes
you're already working with sbintime_t units and it's dumb to convert them
to ticks just so they can get converted back to sbintime_t under the hood.
2017-07-31 00:54:50 +00:00
Andriy Voskoboinyk
7e8196cdb3 rtwn(4): refresh manpage
- Remove 'if_rtwn_load="YES"' line from loader.conf; the module was
renamed in r319733 + it will be loaded automatically as a dependency.
- Move new sentence to new line.
- Add short description for dev.rtwn.%d.rx_buf_size tunable.
2017-07-31 00:03:42 +00:00
Bryan Drewery
ecc39238d3 Allow -DNO_SKIP_DEPEND to override the _SKIP_DEPEND logic.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-07-25 16:46:12 +00:00
Andrew Turner
cd7b1e3a75 Build the 32-bit ARM libstand and loader parts with -fPIC. Many of them are
already built with this flag so libstand should also be build as such.
This will be needed when moving to lld as it refuses to link due to
incompatible relocations.

Sponsored by:	DARPA, AFRL
2017-07-25 10:41:34 +00:00
Bryan Drewery
01ba2b6319 cleandir: Fix ESTALE errors from parallel removals.
This fixes 'make cleandir' to use the same ordering as 'make cleanobj'.
Meaning that SUBDIR will be recursed before the current directory is
handled.  This avoids an 'rm -rf /usr/obj/usr/src/lib/libc' while
a child 'rm -rf /usr/obj/usr/src/lib/libc/tests' is being ran next,
or even removing the current directory and then recursing into a child
and using the 'missing OBJDIR' logic to remove files rather than the
directory.

The most ideal ordering here would be for 'cleanobj' and 'cleandir' to
simply remove the .OBJDIR and then not recurse at all.  This is only
safe if it is guaranteed that all children directories have no orphaned
files in their source checkout and are only using obj directories.  This
is usually safe from the top-level build targets and when using
WITH_AUTO_OBJ.  Improving the build for those cases is coming.

Reported by:	cperciva, scottl
X-MFC-With:	r321427
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-07-25 00:12:48 +00:00
Bryan Drewery
c2fd1d01e8 Allow disabling dependency tracking if DEPEND_CFLAGS is empty.
This falls back on using the guesssed dependencies if so.
Also remove a pre-bmake check while here.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-07-24 23:32:40 +00:00
Bryan Drewery
711019f70d Slightly simplify logic for which depend file is expected.
This is a NOP.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-07-24 23:32:36 +00:00
Enji Cooper
5f65e20c64 Use __DEFAULT_DEPENDENT_OPTIONS for articulating dependency relationship
between MK_STALE_STAGED and MK_STAGING instead of using equivalent ad hoc
logic.

MFC after:	1 month
2017-07-24 18:21:01 +00:00
Bryan Drewery
1335398624 PROGS: Fix ESTALE errors on NFS while cleaning in directories with PROGS.
- Only recurse on cleanobj/cleandir if there is no .OBJDIR being used.
  If we don't recurse then bsd.obj.mk will just rm -rf the OBJDIR dir.
- When recursing on cleanobj/cleandir don't remove dependfiles/dirs
  redundantly from the child and main processes.  Meaning '.depend', and
  'tags', and '.depend.*' will now only be removed from the main
  process.
- Stop recursing on 'cleandepend' since the main process can handle
  removing all files via the default glob patterns in CLEANDEPENDFILES.
- This reverts r288201, by readding recursion on 'cleanobj', due to
  r291635 changing how bsd.subdir.mk handles recursion.

This is primarily targeting ESTALE NFS errors from rm(1) during a
buildworld but is also a performance optimization as both issues fixed
were redundant anyway.

Reported by:	cperciva, scottl
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-07-24 17:54:03 +00:00
Bryan Drewery
2ae976822c cleanobj: Unhide removal of directory.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-07-24 17:53:45 +00:00
Ed Maste
0a80853736 lld 5.0 supports filter libraries, so enable linker feature flag
Also switch the logic to enable this for any non-lld linker, since
filter library support is fairly simple and is very likely supported
by any other linker capable of linking the FreeBSD base system.

MFC after:	2 months
MFC with:	r321369
Sponsored by:	The FreeBSD Foundation
2017-07-24 15:39:09 +00:00
Marcin Wojtas
4ce96bd5bd Add myself (mw) as a src committer and cognet as my mentor.
Reviewed by: cognet (mentor)
Approved by: cognet (mentor)
2017-07-23 19:00:28 +00:00
Bryan Drewery
9ef60181ae Respect INSTALL_AS_USER for FILES.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-07-21 16:14:35 +00:00
Ruslan Bukin
1ec31f2c6f Add warning flags for GCC 7.1.0 compiler.
Sponsored by:	DARPA, AFRL
2017-07-21 14:50:32 +00:00
Matt Joras
e19a00813e Add myself and mentor line to committers-src.dot.
Approved by:	rstone (mentor)
Differential Revision:	https://reviews.freebsd.org/D11672
2017-07-20 18:14:27 +00:00
Emmanuel Vadot
2a4727a472 ipfw_netflow: Add support for FIB
If ipfw_netflow_fib, the ipfw rule will only match packets in that FIB.

While here correct some value in rc.conf(5) to be int and not str.

Sponsored by:	Gandi.net
2017-07-18 14:02:02 +00:00
Enji Cooper
2474da3267 Sort the tests alphabetically before adding them to the Kyuafiles
This is being done to aid in debugging test runs, in the event the
output shifts due to refactored Makefiles, added tests, etc.

MFC after:	1 month
2017-07-17 18:20:54 +00:00
Emmanuel Vadot
fd75b64d7e ipfw_netflow: add +ipfw_netflow_enable="NO" to defaults/rc.conf and document
usage in rc.conf(5)

Reported by:	markj
Sponsored by:	Gandi.net
2017-07-17 08:53:51 +00:00
Baptiste Daroussin
af5147ecaf Update pci_vendors to 2017.07.13
MFC after:	2 days
2017-07-14 14:58:10 +00:00
Xin LI
a1103e048b Update arcmsr(4) to 1.40.00.00 in order to add support of
ARC-1884 SATA RAID controllers.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by:	黃清隆 <ching2048 areca com tw>
MFC after:	3 days
2017-07-14 14:53:13 +00:00
Konstantin Belousov
99ac8154ff Provide libdl.
Create libdl.so.1 as a filter for libc.so.7 which exports public dl*
functions. The functions are resolved from the rtld instead, the goal
of creating library is to avoid errors from the static linker due to
missed libdl. For static binaries, an empty .o is compiled into
libdl.a so that static binaries still get dl stubs from libc.a.

Right now lld cannot create filter objects, disable libdl on arm64
when binutils are not used.

Reviewed by:	bdrewery, dim (previos version); emaste
Exp run:	PR 220525, done by antoine
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
Differential revision:	https://reviews.freebsd.org/D11504
2017-07-10 14:59:21 +00:00
Glen Barber
9f861cfc6b Connect ena(4) to the build.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2017-07-07 16:22:09 +00:00
Konstantin Belousov
e967aa2682 Improve BIT_FLS() documentation.
Submitted by:	Sebastian Huber <sebastian.huber@embedded-brains.de>
MFC after:	6 days
2017-07-07 05:43:44 +00:00
Konstantin Belousov
1550c62236 Add BIT_FLS() analogous to BIT_FFS().
The benefit of BIT_FLS() is that ffsl() can be implemented with a
count leading zeros instruction which is more widespread available.

Submitted by:	Sebastian Huber <sebastian.huber@embedded-brains.de>
MFC after:	1 week
2017-07-06 21:47:17 +00:00
Enji Cooper
5c021049f0 Regenerate src.conf(5) 2017-07-06 05:43:04 +00:00
Enji Cooper
f37852c173 Add tests to help verify Links functionality for .../contrib/tzdata/backwards
MFC after:	1 month
MFC with:	r320702
2017-07-06 04:30:06 +00:00
Enji Cooper
c5cba06079 Formalize LEAPSECONDS and OLDTIMEZONES in share/zoneinfo/... as
`MK_ZONEINFO_LEAPSECONDS_SUPPORT == yes` and
`MK_ZONEINFO_OLD_TIMEZONES_SUPPORT == yes`.

Keep `LEAPSECONDS` and `OLDTIMEZONES` for backwards compatibility,
but print out a warning notifying users that they should use the new
variables, in an effort to migrate them to the variables. This is being
done mostly for automated build tools, etc, that might rely on these
variables being set. The variables will be removed in the future on
^/head, e.g., after ^/stable/12 is cut.

MFC after:      1 month
Relnotes:       yes
Reviewed by:	bdrewery
Differential Revision:	D11376
2017-07-06 04:19:33 +00:00
Edward Tomasz Napierala
df6744e840 Cosmetic tweaks to the default shell rc files, mostly comments.
MFC after:	2 weeks
2017-07-05 13:08:07 +00:00
Edward Tomasz Napierala
f21acf083a Use more canonical .Dt for vt(4).
MFC after:	2 weeks
2017-07-05 10:43:27 +00:00
Edward Tomasz Napierala
dd0e1324ba Run "resizewin -z" from the default shell profile files. This makes
the terminal work properly out of the box when logging over a serial
line, which is quite important for the user experience on boards like
Raspberry Pi.  It doesn't affect cases where the terminal size is
already non-zero, such as SSH or vt(4) sessions.

Note that this doesn't handle a scenario pointed out by rgrimes@:
when the terminal is resized after login, the terminal size won't
get updated even after logging out and back in.

Reviewed by:	imp
Obtained from:	CheriBSD
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D10642
2017-07-05 10:37:37 +00:00
Mark Johnston
61b0ecf4fb Fix a few issues with the lockstat provider man page.
- Address most of the post-commit comments on D11128.[1]
- Reference the man pages for the lock types supported by the provider.
- Add a BUGS section.
- Eliminate some redundancy by describing similar probes in the same
  paragraph.
- Fix several inaccuracies, particularly in the probe argument
  descriptions.

Submitted by:	wblock [1]
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D11293
2017-07-03 23:54:39 +00:00
Alexander Motin
a94fab67bb Switch fabric scans from GID_FT to GID_PT+GFF_ID/GFT_ID.
Instead of using GID_FT SNS request to get list of registered FCP ports,
use GID_PT to get list of all Nx_Ports, and then use GFF_ID and/or GFT_ID
requests to find whether they are FCP and target capable.

The problem with old approach is that GID_FT does not report ports without
FC-4 type registered.  In particular it was impossible to boot OS from
FreeBSD FC target using QLogic FC BIOS, since one does not register FC-4
type even on new cards and so ignored by old code as incompatible.

As a side bonus this allows initiator to skip pointless logins to other
initiators by fetching that information from SNS instead.

In case some switches do not implement GFF_ID/GFT_ID correctly, add sysctls
to disable that functionality.  I handled broken GFF_ID of my Brocade 200E,
but there may be other switches with different bugs.

Linux also uses GID_PT, but GFF_ID is disabled by default there, and GFT_ID
is not supported.

Sponsored by:	iXsystems, Inc.
2017-07-03 15:56:45 +00:00
Ed Maste
993d3ded79 Do not build clang for all riscv*, not just riscv64
Previous test matching on "riscv64" was invalidated by the addition of
riscv64sf.

Sponsored by:	The FreeBSD Foundation
2017-07-01 19:10:59 +00:00
Jeremie Le Hen
cf3de64127 Disable RCMDS by default.
This was announced in this thread:
https://lists.freebsd.org/pipermail/freebsd-arch/2017-June/018239.html

Applying plan proposed by ngie@ in:
https://lists.freebsd.org/pipermail/freebsd-arch/2017-June/018249.html

The port has been submitted as net/bsdrcmds in r444814.

Approved by:	bapt, roberto, and others
2017-07-01 10:04:42 +00:00
Kyle Evans
9722f604fc Add myself to commiters-src.dot, emaste@ as mentor; sort his mentees while here
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D11429
2017-06-30 20:01:31 +00:00
Ed Maste
d786d51091 bsd.linker.mk: add band-aid for linker invocation failure
In some cases bsd.linker.mk reports an error like:

  make[4]: ".../share/mk/bsd.linker.mk" line 56:
  Unknown linker from LD=ld -m elf32ppc_fbsd:"

For now change this to a .warning, and then assume GNU ld 2.17.50.
At present the linker type detection is used only for enabling build-id,
and we can carry on without it when type detection fails.

Also, show errors from ${LD} --version to aid in failure diagnosis.
Successful invocations of ${LD} --version produce no output on stderr
so this will not create any spam in non-failing builds.

Tested by:	swills
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D11424
2017-06-30 16:34:17 +00:00
Cy Schubert
ad6481dddc Allow parallel installworld (-j N) and poudriere installworld
(poudriere jail -c and poudriere jail -u) to proceed.

Reviewed by:	trasz@
Tested by:	trasz@, cy@
MFC after:	1 month
X-MFC-with:	r320362
2017-06-28 19:05:04 +00:00
Enji Cooper
1c3f620ca6 Add kyua TAP test integration examples
The examples are patterned loosely after the ATF examples, similar
to the plain test examples.

MFC after:	1 month
2017-06-28 08:22:04 +00:00
Enji Cooper
c9470efed7 share/examples/tests/{atf,plain}/Makefile: tweak example Makefile snippets
- Including bsd.own.mk isn't required since no MK_<foo> knobs are being
  manipulated.
- Update documentation to note that ${FILES} is installed via bsd.progs.mk,
  not bsd.prog.mk.

MFC after:	1 month
2017-06-28 08:20:51 +00:00
Enji Cooper
a92b124dc9 share/examples/tests/Makefile: clean up example snippets/documentation
- TESTSDIR doesn't need to be specified after r289158.
- Including bsd.own.mk isn't required since no MK_<foo> knobs are being
  manipulated.
- TESTS_SUBDIRS should be written out in an append format, one entry
  per line, to provide a better, more conflict resistant example.

MFC after:      1 month
2017-06-28 07:01:22 +00:00
Ed Maste
f44ebc9c73 Add "Terminus BSD Console" size 32
Dimitar Toshkov, Terminus' creator, has made size 32 available under the
2-clause BSD license for use by *BSD consoles.
2017-06-26 18:11:48 +00:00
Edward Tomasz Napierala
1621f5fe16 Provide visual feedback when timezone files are installed.
After r320003 it wasn't being shown in any way.

Submitted by:	bdrewery
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D11154
2017-06-26 15:40:24 +00:00
Justin Hibbits
fbcf7bcdf4 Solve the y2038 problem for powerpc
AKA Make time_t 64 bits on powerpc(32).

PowerPC currently (until now) was one of two architectures with a 32-bit time_t
on 32-bit archs (the other being i386).  This is an ABI breakage, so all ports,
and all local binaries, *must* be recompiled.

Tested by:	andreast, others
MFC after:	Never
Relnotes:	Yes
2017-06-26 02:25:19 +00:00
Ed Maste
cdd89b9897 Introduce LINKER_FEATURES to avoid duplicating version logic
Submitted by:	bdrewery
Reported by:	kib
2017-06-23 17:21:37 +00:00
Ed Maste
83cff1f8e5 change GNU ld LINKER_TYPE from binutils to bfd
GNU binutils includes two linkers: ld.bfd and ld.gold.  For clarity use
LINKER_TYPE=bfd to refer to ld.bfd, the original binutils linker that
identifies itself as "GNU ld".

Discussed with:	bdrewery
2017-06-23 03:55:00 +00:00
Alan Somers
09986d3bd2 Clarify usage of aio(4) with kqueue(2)
Reviewed by:	jhb
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D11299
2017-06-23 00:40:09 +00:00
Bryan Drewery
6f81bd02b3 Provide proper values for X_LINKER_TYPE/VERSION when XLD == LD.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-06-22 22:53:10 +00:00
Bryan Drewery
ec39013eb2 Don't overwrite already-set LINKER_VERSION/LINKER_TYPE.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-06-22 22:53:07 +00:00
Bryan Drewery
89bf31fd63 LINKER_VERSION: Support external binutils.
The ports binutils stores the version in the 5th word so just look for
a version using a pattern instead.

Reported by:	rpokala
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-06-22 21:22:12 +00:00
Bryan Drewery
19fad65511 Support cached linker values in environment.
This is similar to r289659 for bsd.compiler.mk.

MFC after:	2 weeks
Reviewed by:	emaste
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D11310
2017-06-22 21:03:27 +00:00
Bryan Drewery
08154765ca Support XLD for setting X_LINKER_TYPE and X_LINKER_VERSION.
This is similar to r300350 for bsd.compiler.mk.

MFC after:	2 weeks
Reviewed by:	emaste
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D11309
2017-06-22 21:03:24 +00:00
Bryan Drewery
125902b6af Add basic bsd.linker.mk auto included from bsd.compiler.mk.
This will provide LINKER_TYPE and LINKER_VERSION.

MFC after:	2 weeks
Reviewed by:	emaste
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D11308
2017-06-22 21:03:20 +00:00
Bryan Drewery
b2f4fa1a3d Fix spelling error.
Reported by:	arc
Sponsored by:	Dell EMC Isilon
2017-06-22 20:32:23 +00:00
Bryan Drewery
210ecc0021 Rework logic for skipping .depend/.meta file read/stat/writes.
- Rename _SKIP_READ_DEPEND to _SKIP_DEPEND since it also avoids writing.
- This now uses .NOMETA to avoid reading any .meta files related to
  DEPENDOBJS.  Objects not in OBJS/DEPENDOBJS may still have their .meta
  files read in if they are in the dependency graph.
- This also avoids statting .meta and .depend files in the META_MODE +
  -DNO_FILEMON case.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-06-22 05:34:41 +00:00
Bryan Drewery
e65dd92b24 Remove logic for setting .MAKE.DEPENDFILE=/dev/null already covered by _SKIP_BUILD.
_SKIP_BUILD is defined in bsd.init.mk.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-06-21 20:10:58 +00:00
Bryan Drewery
cd19ecdbdc Similar to r296013 for NO_ROOT, force SUBDIR_PARALLEL for buildworld WORLDTMP staging.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-06-21 18:56:53 +00:00
Bryan Drewery
85ec50508a objwarn should be .PHONY.
Otherwise in META_MODE it may create an objwarn.meta if only bsd.obj.mk
is included;  bsd.sys.mk already had .PHONY: objwarn.

MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2017-06-21 17:11:49 +00:00
Bryan Drewery
05f3e1fe94 Fix 'make clean all' to work again.
This likely broke completely with r308599.

Apply the same fix for 'make destroy' which is a DIRDEPS_BUILD thing.

PR:		219819
Reported by:	trasz
MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2017-06-20 20:52:06 +00:00
Bryan Drewery
fb40136990 LIBADD: Try to support partial tree checkouts in some limited cases.
LIBADD is only supported for in-tree builds because we do not install
share/mk/src.libnames.mk (which provides LIBADD support) into /usr/share/mk.
So if a partial checkout is done then the LIBADDs are ignored and no LDADD is
ever added.

Provide limited support for this case for when LIBADD is composed entirely of
base libraries.  This is to avoid clashes with ports and other out-of-tree
LIBADD uses that should not be mapped to LDADD and because we do not want to
support LIBADD out-of-tree right now.

Reported by:	mckusick, kib
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-06-20 20:34:30 +00:00
Ed Maste
a793c109ae Fall back to GPL dtc(1) when we lack a C++11 compiler
The BSD licensed device tree compiler is written in C++11.

Reported by:	jhibbits
Reviewed by:	jhibbits, manu
Sponsored by:	The FreeBSD Foundation
2017-06-20 15:51:09 +00:00
Emmanuel Vadot
fcf8f4a840 Fix punctionation in UPDATING and regen src.conf after r320127
Reported by:	ngie
2017-06-20 03:44:21 +00:00
Emmanuel Vadot
011717d344 Switch back to the BSDL DTC (Device Tree Compiler).
The BSDL dtc has grown the needed features (overlays mostly) and is able to
compile all of our base DTS.
You can use WITH_GPL_DTC is you need the GPL one or DTC= in make.conf(5)
to specify an alternate location for the compiler to use.

Discussed with: emaste, imp
2017-06-20 02:09:50 +00:00
Bryan Drewery
c99b67a794 Utilize SYSROOT from r320119 in places where DESTDIR may be wanting WORLDTMP.
Since buildenv exports SYSROOT all of these uses will now look in
WORLDTMP by default.

sys/boot/efi/loader/Makefile
        A LIBSTAND hack is no longer required for buildenv.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-06-19 20:47:24 +00:00
Bryan Drewery
ad706c65e1 Follow-up r320061: Need to respect make.conf/env LIBDIR overrides.
This fixes the lib32 build from creating all stale .depend files.

X-MFC-With:	320061
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-06-19 18:08:02 +00:00
Emmanuel Vadot
46375c65f6 make.conf: Add the possibility to use another DTC
Add a make.conf DTC variable that control which DTC (Device Tree Compiler)
to use.

Reviewed by:	bdrewery, imp
Differential Revision:	https://reviews.freebsd.org/D9577
2017-06-17 23:34:53 +00:00
Bryan Drewery
d0ab0ec2fa Fix Makefiles which override LIBDIR to not add incorrect dependencies into .depend.
This fixes these cases which would rebuild every time:
    make[6]: /usr/obj/usr/src/libexec/rtld-elf/tests/libpythagoras/.depend, 1: ignoring stale .depend for /usr/obj/usr/src/tmp/usr/tests/libexec/rtld-elf/libm.a
    make[6]: /usr/obj/usr/src/lib/libxo/tests/encoder/.depend, 1: ignoring stale .depend for /usr/obj/usr/src/tmp/usr/tests/lib/libxo/libxo.a
    make[7]: /usr/obj/usr/src/lib/libthr/tests/dlopen/dso/.depend, 1: ignoring stale .depend for /usr/obj/usr/src/tmp/usr/tests/lib/libthr/dlopen/libpthread.a

The problem is that some Makefiles will override LIBDIR to where they want
their library to install.  bsd.libnames.mk will then use ${LIBDIR} to define
where *existing* libraries are.  This then leads to looking for the
libraries in the *target* place rather than the *expected* place.

We may want to expand this (and all of the other *DIR variables in bsd.own.mk)
into something like what Ports has, a PREFIX and a LOCALBASE.  PREFIX being
where things are being installed to and LOCALBASE being where they already are.

For now store the default expected LIBDIR into LIBDIR_BASE and use that for
library locations.

Reported by:	sbruno
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-06-17 20:33:11 +00:00
Bryan Drewery
7970b89399 WITH_META_MODE: End each ERROR_CMD CMD line with ';'.
This makes it easier to debug multi-line command failures.

X-MFC-With:	r319862
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-06-16 21:48:42 +00:00
Bryan Drewery
2bc743eea1 Fix more incorrect library directories fix 'stale .depend' rebuilds.
Reported by:	sbruno
MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2017-06-16 21:37:05 +00:00
Bryan Drewery
ddbc759f99 Fix LIBAMU location to fix 'stale .depend' rebuilds in usr.sbin/amd.
This originally came in r275052.

Reported by:	sbruno
MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2017-06-16 20:47:12 +00:00
Edward Tomasz Napierala
05f3dec72e Don't print all timezones during installworld.
Submitted by:	Alex Richardson <alr48@cl.cam.ac.uk>
Reviewed by:	gjb
MFC after:	1 month
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D11154
2017-06-16 14:19:23 +00:00
Bryan Drewery
51deaaab90 WITH_META_MODE: Don't try showing command if .ERROR_META_FILE is empty.
This was sed'ing on stdin for failing .PHONY targets.

Reported by:	Mark Millard
X-MFC-With:	r319862
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-06-16 04:28:10 +00:00
Eric van Gyzen
58771f908d copy(9): clarify that copystr() does not return EFAULT
The previous wording implied that copystr() could return EFAULT.

MFC after:	6 weeks
Sponsored by:	Dell EMC
2017-06-15 21:34:43 +00:00
Ryan Libby
7e38d220fa Add myself (rlibby) as a src committer and markj as my mentor.
Approved by:	markj (mentor)
Differential Revision:	https://reviews.freebsd.org/D11189
2017-06-13 23:50:55 +00:00
Bryan Drewery
95a2495fc2 META_MODE: Show .ERROR_CMD in error.
This uses a hack to get the CMD from the meta file rather than
.ERROR_CMD since bmake currently blanks the value for non-jobs
mode.

Reviewed by:	sjg (indirectly)
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-06-12 19:13:29 +00:00
Bryan Drewery
9369f35755 META_MODE: NO_FILEMON should imply nofilemon.
This fixes NO_FILEMON to properly still use .depend.OBJ files
for dependency tracking.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-06-12 18:44:14 +00:00
Sevan Janiyan
cac23196c7 Tidy up minor nits raised by mandoc lint:
Zap trailing white and double spaces
Remove extra coma which is not required.
Bump date.

Reviewed by:	gnn
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D11142
2017-06-11 14:33:16 +00:00
Mark Johnston
eeebff447f List DTrace provider pages in a single variable.
MFC after:	1 week
2017-06-10 21:13:39 +00:00
George V. Neville-Neil
990e7dcfdc Update the variables as well. 2017-06-10 20:50:50 +00:00
George V. Neville-Neil
b8cae9e11c Update Makefile to contain the new DTrace lockstat manual page. 2017-06-10 20:47:37 +00:00
George V. Neville-Neil
566569c45b Manual page for the DTrace lockstat provider
Reviewed by:	markj
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D11128
2017-06-10 20:41:53 +00:00
Edward Tomasz Napierala
758dcc8cb3 Remove mentions of recently removed /usr/share/doc/ subdirectories
from hier(7).
2017-06-10 08:25:46 +00:00
Edward Tomasz Napierala
ed3c0bc845 /usr/share/doc/bind is gone since 20040925.
MFC after:	2 weeks
2017-06-10 08:08:14 +00:00
Edward Tomasz Napierala
04a7bab4b8 Improve formatting by removing yet another case of '-width ".Pa'.
MFC after:	2 weeks
2017-06-10 08:01:05 +00:00
Edward Tomasz Napierala
e5ba368e2f Remove /usr/include/readline/ from hier(7); it's long gone. 2017-06-10 07:47:21 +00:00
Edward Tomasz Napierala
f917bfd4b7 Remove groff(1) leftovers from hier(7). 2017-06-10 07:43:24 +00:00
Andriy Voskoboinyk
15eaaf082a rtwn: rename module (if_rtwn.ko -> rtwn.ko) to match module name + drop
manpage link.

Reported by:	mav, hselasky
2017-06-09 07:08:58 +00:00
Jonathan T. Looney
dc6a41b936 Add the infrastructure to support loading multiple versions of TCP
stack modules.

It adds support for mangling symbols exported by a module by prepending
a string to them. (This avoids overlapping symbols in the kernel linker.)

It allows the use of a macro as the module name in the DECLARE_MACRO()
and MACRO_VERSION() macros.

It allows the code to register stack aliases (e.g. both a generic name
["default"] and version-specific name ["default_10_3p1"]).

With these changes, it is trivial to compile TCP stack modules with
the name defined in the Makefile and to load multiple versions of the
same stack simultaneously. This functionality can be used to enable
side-by-side testing of an old and new version of the same TCP stack.
It also could support upgrading the TCP stack without a reboot.

Reviewed by:	gnn, sjg (makefiles only)
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D11086
2017-06-08 20:41:28 +00:00
Richard Gallamore
d4a698487c Add myself (ultima) as a new port committer.
Reviewed by:	matthew (mentor), lifanov (mentor)
Approved by:	matthew (mentor), lifanov (mentor)
Differential Revision:	https://reviews.freebsd.org/D11089
2017-06-08 01:42:32 +00:00
Baptiste Daroussin
8657a96598 Regenerate src.conf.5 after removal of groff 2017-06-08 00:36:58 +00:00
Baptiste Daroussin
174b3709c8 Finish removal of groff 2017-06-07 23:26:28 +00:00
Baptiste Daroussin
738919c039 Remove groff from base
All manpages in base are now compatible with mandoc(1), all roff documentation
will be relocated in the doc tree. man(1) can now use groff from the ports tree
if it needs.

Also remove checknr(1) and colcrt(1) which are only useful with groff.

Approved by:	(no objections on the mailing lists)
2017-06-07 23:00:34 +00:00
Bryan Drewery
1a9cc831dd META_MODE: Add framework to force rebuilding for major ABI changes.
Normally META_MODE ignores host files for "meta mode" decisions on whether a
file should be rebuilt or not.  This is because a simple installworld can
update timestamps and cause the next build to rebuild all host tools, when the
previous ones may not have any changes in the source tree.  These tools are
normally still ABI compatible.  They are only rebuilt if NO_META_IGNORE_HOST is
set from the workaround/hack in r301467.

One of the major problems with this is when a host tool has objects spread
across many revisions that have mixed-ABI.  For example, if struct stat were to
change on the host, some objects for a tool may have different ideas of that
struct's definition.  If just 1 source file were modified and rebuilt and
linked into the tool, then that toll will have mixed-ABI objects and crash.
This exact thing happened with the ino64 commit in r301467 followed by a
trivial update to libbfd in r318750.  The resulting binary would crash in
buildworld.

Sponsored by:	Dell EMC Isilon
2017-06-05 05:17:39 +00:00
Bryan Drewery
ffe0978fbe META_MODE: Allow not ignoring host headers with NO_META_IGNORE_HOST_HEADERS.
See r301467 for more details on NO_META_IGNORE_HOST.  Usually the full
list of host ignores should have no real impact on the host tools.  The
headers however may reliably define what the ABI is for the host.  It
may be useful to allow using the headers for the build but still not
caring about things like /bin/sh, /lib/libedit.so, etc.

Sponsored by:	Dell EMC Isilon
2017-06-05 05:17:36 +00:00
Edward Tomasz Napierala
d04e6601fa Consistently use lowercase hex numbers in ascii(7).
MFC after:	2 weeks
2017-06-02 15:32:11 +00:00
Bryan Drewery
53b3b05944 META_MODE: Move ignoring of /usr/local/etc/libmap.d to proper place.
This was added in r318194 but local.meta.sys.mk is only used for
DIRDEPS_BUILD.
2017-06-01 23:04:44 +00:00
Eric van Gyzen
c8de781de7 getenv(9): rename to "kern_getenv", etc.
Update the documentation to catch up with r273174, which renamed
      getenv -> kern_getenv
      setenv -> kern_setenv
    unsetenv -> kern_unsetenv

Leave the old links in place to support finger memory.

MFC after:	3 days
Sponsored by:	Dell EMC
2017-06-01 21:07:25 +00:00
Rene Ladan
26f923dca3 Welcome back bapt@ to portmgr 2017-06-01 02:31:14 +00:00
Enji Cooper
4650b8ae52 Regenerate src.conf(5)
This contains a number of content changes due to src.opts.mk changes.

Sponsored by:	Dell EMC Isilon
2017-05-30 18:06:19 +00:00
Edward Tomasz Napierala
726cf92c42 Fix Xrs; they were pointing to the wrong section.
MFC after:	2 weeks
2017-05-28 18:09:49 +00:00
Edward Tomasz Napierala
5b2d5e4fc2 Move mount.conf(8) to mount.conf(5); it's a kernel configuration file
and not an administrative utility.

MFC after:	2 weeks
2017-05-28 18:07:53 +00:00
Edward Tomasz Napierala
f2e34224fa Declutter rctl(8) by moving kernel build instructions into newly
created rctl(4).

MFC after:	2 weeks
2017-05-28 17:25:47 +00:00
Edward Tomasz Napierala
aa21218504 Minor tweaks to iscsi(4) and iscsid(8).
MFC after:	2 weeks
2017-05-28 17:02:29 +00:00
Edward Tomasz Napierala
4b2a6604fc Random tweaks to cfiscsi(4) man page.
MFC after:	2 weeks
2017-05-28 16:53:21 +00:00
Eric van Gyzen
c9d34d6652 Fix INSTALL_AS_USER with external nsswitch databases
The INSTALL_AS_USER option tells "install" to use the current
user name as the owner of the installed file.  The "install"
command executed by the build is statically linked, so it does not
load nsswitch modules, such as nss_ldap.so, so it fails when
the user is only defined in such a database.

Fix it to use the current UID instead of user name.  This works
for all users.  I expect it is also slightly more efficient.

Reviewed by:	sjg
MFC after:	3 days
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D10862
2017-05-28 00:45:28 +00:00
Eric van Gyzen
4f2bab59e7 Fix INSTALL_AS_USER
Move INSTALL_AS_USER into bsd.init.mk to maximize the chance that
it has final authority over fooOWN and fooGRP.

Reviewed by:	sjg
MFC after:	3 days
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D10810
2017-05-28 00:43:12 +00:00
Baptiste Daroussin
3a268233e8 Remove the old man.template
In FreeBSD we only use mdoc(7) format. A template is available as mdoc.template
The usage of man(7) format is discouraged and this file was driving people into
the front direction as a template to use.
2017-05-25 21:16:39 +00:00
Baptiste Daroussin
e119d6d6e7 update to 2017.05.25
MFC after:	2 days
2017-05-25 21:11:25 +00:00
Stephen McConnell
327f2e6c56 Fix several problems with mapping code.
Reviewed by:    ken, scottl, asomers, ambrisko, mav
Approved by:	ken, mav
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D10861
2017-05-25 19:20:06 +00:00
Stephen McConnell
635e58c715 Fix several problems with mapping code.
Reviewed by:    ken, scottl, asomers, ambrisko, mav
Approved by:	ken, mav
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D10878
2017-05-25 19:14:44 +00:00
Baptiste Daroussin
cdc3795316 In preparation for the removal of the roff toolchain, disconnect the
roff documentation from the build.

Those documents will be added to the doc tree and distributed as PDF from
the documentation website. As they are valuable has history, but do not match
current FreeBSD

Further more, the ascii format we were using to distribute them is not really
accurate for such documents.

more details:
https://lists.freebsd.org/pipermail/freebsd-arch/2017-May/018211.html
2017-05-25 14:54:22 +00:00
Baptiste Daroussin
ad9aa9f01c Fix rendering with modern groff
Reported by:	tj
2017-05-25 12:57:15 +00:00
Edward Tomasz Napierala
a9a393b390 Don't end up manpage titles with a full stop.
MFC after:	2 weeks
2017-05-24 21:02:53 +00:00
Glen Barber
9a7af23f46 Update the "first appeared in" version in several manual pages.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2017-05-24 17:47:49 +00:00
Konstantin Belousov
e058e1c43c Add BIT_OR2(), BIT_AND2(), BIT_NAND2(), BIT_XOR() and BIT_XOR2().
Submitted by:	Sebastian Huber <sebastian.huber@embedded-brains.de>
MFC after:	2 weeks
2017-05-24 10:09:54 +00:00
Kevin Lo
7e9a9bd4a0 Add missing MLINKS for functions decribed in iflibdd(9), iflibdi(9), and
iflibtxrx(9).
2017-05-24 01:03:30 +00:00
Kevin Lo
74d1f4c86f Remove duplicate definition of iflib_led_create(). 2017-05-24 01:01:43 +00:00
Allan Jude
f299c47b52 Allow cpuset_{get,set}affinity in capabilities mode
bhyve was recently sandboxed with capsicum, and needs to be able to
control the CPU sets of its vcpu threads

Reviewed by:	emaste, oshogbo, rwatson
MFC after:	2 weeks
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D10170
2017-05-24 00:58:30 +00:00
Edward Tomasz Napierala
edd4d70550 Remove unneccessary call to mtree, which, when building as an unprivileged
user (with -DNO_ROOT), resulted in warnings looking like these:

share/man/cat8:
        user (9, 3819, not modified: Operation not permitted)
        permissions (0755, 0700, modified)

The BSD.usr.mk is already taken care of in etc/Makefile.

Submitted by:	Alex Richardson <alr48@cl.cam.ac.uk>
Reviewed by:	bdrewery
MFC after:	1 month
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D9212
2017-05-23 11:08:36 +00:00
Konstantin Belousov
6992112349 Commit the 64-bit inode project.
Extend the ino_t, dev_t, nlink_t types to 64-bit ints.  Modify
struct dirent layout to add d_off, increase the size of d_fileno
to 64-bits, increase the size of d_namlen to 16-bits, and change
the required alignment.  Increase struct statfs f_mntfromname[] and
f_mntonname[] array length MNAMELEN to 1024.

ABI breakage is mitigated by providing compatibility using versioned
symbols, ingenious use of the existing padding in structures, and
by employing other tricks.  Unfortunately, not everything can be
fixed, especially outside the base system.  For instance, third-party
APIs which pass struct stat around are broken in backward and
forward incompatible ways.

Kinfo sysctl MIBs ABI is changed in backward-compatible way, but
there is no general mechanism to handle other sysctl MIBS which
return structures where the layout has changed. It was considered
that the breakage is either in the management interfaces, where we
usually allow ABI slip, or is not important.

Struct xvnode changed layout, no compat shims are provided.

For struct xtty, dev_t tty device member was reduced to uint32_t.
It was decided that keeping ABI compat in this case is more useful
than reporting 64-bit dev_t, for the sake of pstat.

Update note: strictly follow the instructions in UPDATING.  Build
and install the new kernel with COMPAT_FREEBSD11 option enabled,
then reboot, and only then install new world.

Credits: The 64-bit inode project, also known as ino64, started life
many years ago as a project by Gleb Kurtsou (gleb).  Kirk McKusick
(mckusick) then picked up and updated the patch, and acted as a
flag-waver.  Feedback, suggestions, and discussions were carried
by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles),
and Rick Macklem (rmacklem).  Kris Moore (kris) performed an initial
ports investigation followed by an exp-run by Antoine Brodin (antoine).
Essential and all-embracing testing was done by Peter Holm (pho).
The heavy lifting of coordinating all these efforts and bringing the
project to completion were done by Konstantin Belousov (kib).

Sponsored by:	The FreeBSD Foundation (emaste, kib)
Differential revision:	https://reviews.freebsd.org/D10439
2017-05-23 09:29:05 +00:00
Zbigniew Bodek
9b8d05b8ac Add support for Amazon Elastic Network Adapter (ENA) NIC
ENA is a networking interface designed to make good use of modern CPU
features and system architectures.

The ENA device exposes a lightweight management interface with a
minimal set of memory mapped registers and extendable command set
through an Admin Queue.

The driver supports a range of ENA devices, is link-speed independent
(i.e., the same driver is used for 10GbE, 25GbE, 40GbE, etc.), and has
a negotiated and extendable feature set.

Some ENA devices support SR-IOV. This driver is used for both the
SR-IOV Physical Function (PF) and Virtual Function (VF) devices.

ENA devices enable high speed and low overhead network traffic
processing by providing multiple Tx/Rx queue pairs (the maximum number
is advertised by the device via the Admin Queue), a dedicated MSI-X
interrupt vector per Tx/Rx queue pair, and CPU cacheline optimized
data placement.

The ENA driver supports industry standard TCP/IP offload features such
as checksum offload and TCP transmit segmentation offload (TSO).
Receive-side scaling (RSS) is supported for multi-core scaling.

The ENA driver and its corresponding devices implement health
monitoring mechanisms such as watchdog, enabling the device and driver
to recover in a manner transparent to the application, as well as
debug logs.

Some of the ENA devices support a working mode called Low-latency
Queue (LLQ), which saves several more microseconds. This feature will
be implemented for driver in future releases.

Submitted by:	Michal Krawczyk <mk@semihalf.com>
		Jakub Palider <jpa@semihalf.com>
		Jan Medala <jan@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon.com Inc.
Differential revision: https://reviews.freebsd.org/D10427
2017-05-22 14:46:13 +00:00
John Baldwin
5033c43b7a Add a driver for the Chelsio T6 crypto accelerator engine.
The ccr(4) driver supports use of the crypto accelerator engine on
Chelsio T6 NICs in "lookaside" mode via the opencrypto framework.

Currently, the driver supports AES-CBC, AES-CTR, AES-GCM, and AES-XTS
cipher algorithms as well as the SHA1-HMAC, SHA2-256-HMAC, SHA2-384-HMAC,
and SHA2-512-HMAC authentication algorithms.  The driver also supports
chaining one of AES-CBC, AES-CTR, or AES-XTS with an authentication
algorithm for encrypt-then-authenticate operations.

Note that this driver is still under active development and testing and
may not yet be ready for production use.  It does pass the tests in
tests/sys/opencrypto with the exception that the AES-GCM implementation
in the driver does not yet support requests with a zero byte payload.

To use this driver currently, the "uwire" configuration must be used
along with explicitly enabling support for lookaside crypto capabilities
in the cxgbe(4) driver.  These can be done by setting the following
tunables before loading the cxgbe(4) driver:

    hw.cxgbe.config_file=uwire
    hw.cxgbe.cryptocaps_allowed=-1

MFC after:	1 month
Relnotes:	yes
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D10763
2017-05-17 22:13:07 +00:00
Stephen McConnell
67feec5045 Add tri-mode support (SAS/SATA/PCIe).
This includes NVMe device support and adds support for the following adapters:
    SAS 3408
    SAS 3416
    SAS 3508
    SAS 3516
    SAS 3616
    SAS 3708
    SAS 3716

Reviewed by:    ken, scottl, asomers, mav
Approved by:	ken, scottl, mav
MFC after:      2 weeks
Relnotes:	yes
Differential Revision: https://reviews.freebsd.org/D10095
2017-05-17 21:33:37 +00:00
John Baldwin
00f6cd3f56 Add sglist_append_sglist().
This function permits a range of one scatter/gather list to be appended to
another sglist.  This can be used to construct a scatter/gather list that
reorders or duplicates ranges from one or more existing scatter/gather
lists.

Sponsored by:	Chelsio Communications
2017-05-16 23:31:52 +00:00
John Baldwin
04794d246a Note that the first release of FreeBSD/alpha was 3.2.
Alpha is explicitly mentioned in the release announcements beginning with
3.2.
2017-05-16 23:15:40 +00:00
Simon J. Gerraty
7e6cd74879 Tell bmake (meta mode) to ignore changes to /usr/local/etc/libmap.d/*
Differential Revision:	D10685
Reviewed by:	bdrewery
2017-05-11 19:49:22 +00:00
Edward Tomasz Napierala
f472116578 Improve build(7): add missing "buildkernel" and "installkernel"
to the example, change the architectures to something more common,
and improve description of defaults for TARGET.

Reviewed by:	bdrewery, ngie, imp (older revisions)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D10654
2017-05-11 08:39:55 +00:00
Enji Cooper
2cb572a090 Unconditionally install udp(4) and udplite(4) again
I added this to the MK_USB != no block in error in r278202.

MFC after:	3 weeks
Sponsored by:	Dell EMC Isilon
2017-05-11 06:57:20 +00:00
Bryan Drewery
c889d48074 SUBDIR_OVERRIDE: Note how to restore historical behavior pre-r289725.
Sponsored by:	Dell EMC Isilon
2017-05-10 00:02:24 +00:00
Bryan Drewery
c596c2876f Add a -DNO_LIBS to skip building the libraries phase as well.
This is useful for cases where -DWORLDFAST is useful.

Sponsored by:	Dell EMC Isilon
2017-05-09 23:58:07 +00:00
Glen Barber
1e0358de5b Correct "first appeared in" entries for various drivers that
exist in stable/11.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2017-05-09 20:39:57 +00:00
Bryan Drewery
16892c7713 Support -DWORLDFAST to skip all build steps up to 'libraries' and 'everything'.
This allows for building the world against the already-created
host/sysroot environment.  It is not overly useful outside of cases of
large-impact changes such as a testing a new compiler.  It will
allow quickly getting back to an error in the target-phases of the
build where a new compiler is being used.

Sponsored by:	Dell EMC Isilon
2017-05-09 20:21:58 +00:00
Bryan Drewery
6d75a7a852 Support skipping 'make obj' tree-walk.
This is part of a larger effort for WITH_AUTO_OBJ and a WORLDFAST
option.

Sponsored by:	Dell EMC Isilon
2017-05-09 20:21:38 +00:00
Bryan Drewery
f59d3d55b6 PROGS+META_MODE: Avoid rebuilding common sources when recursing.
This could be seen in lib/libkvm/tests where kvm_test_common.o was
a common dependency, but one of the recursed progs had a special
CFLAGS+= -I that changed the build command.  This would cause
all recursed builds to rebuild while fighting over the meta file
and object file.

Reported by:	Mark Millard
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-05-09 18:45:34 +00:00
Edward Tomasz Napierala
fa196dea22 Fix device paths for USB serial adapters: the formatting strings
contain "%u", differently from eg uart(4) which uses "%r".

Suggested by:	bde@
MFC after:	2 weeks
2017-05-09 08:36:09 +00:00
Edward Tomasz Napierala
5cbccc1ef6 Fix mistake introduced to uart(4) man page in r317463.
MFC after:	2 weeks
2017-05-09 08:31:34 +00:00
Bryan Drewery
6106a50ee6 DIRDEPS_BUILD: Connect new directories.
Sponsored by:	Dell EMC Isilon
2017-05-09 01:48:14 +00:00
Bryan Drewery
fbbb9824a3 Fix syntax error in parse_path after r316952.
Also fix bad whitespace in sort_unique after r314809.

The parse_path syntax error came up in DIRDEPS_BUILD as the following
and emptied out all Makefile.depend files due to it:

	# python share/mk/meta2deps.py
	  File "share/mk/meta2deps.py", line 538
	    rdir = os.path.realpath(dir)
	    ^
	IndentationError: unexpected indent

Sponsored by:	Dell EMC Isilon
2017-05-08 20:44:21 +00:00
Danilo G. Baio
f83d9358c2 Add myself (dbaio) as a new ports committer
Approved by:	garga (mentor)
Differential Revision:	https://reviews.freebsd.org/D10633
2017-05-08 14:33:38 +00:00
Ed Maste
7fb14275b5 arch(7): correct initial versions for alpha and pc98
Submitted by:	imp
2017-05-08 14:17:10 +00:00
Benjamin Kaduk
853e9ff25c Bring VOP_GETPAGES.9 more up-to-date
Attempt to catch up to the KPI changes from r292373, and perform
some other tidying while in the area.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D10579
2017-05-07 19:01:08 +00:00
Baptiste Daroussin
1fc317e374 Build zstandard with threading enabled 2017-05-06 10:59:10 +00:00
Adrian Chadd
52d3eee999 [etherswitch] add manpages for etherswitch supported devices.
Submitted by:	Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by:	mizhka
Differential Revision:	https://reviews.freebsd.org/D10278
2017-05-06 06:01:17 +00:00
Bryan Drewery
1f265bbd8e Fix some "don't build" optimizations from r308599 not working due to a typo.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-05-06 05:37:36 +00:00
Kenneth D. Merry
64409eeee7 Add basic programmable early warning error injection to the sa(4) driver.
This will help application developers simulate end of tape conditions.

To inject an error in sa0:

sysctl kern.cam.sa.0.inject_eom=1

This will return the next read or write request queued with 0 bytes
written.  Any subsequent writes or reads will go along as usual.

This will also cause the early warning position flag to get set
for the next position query.  So, 'mt status' will show the BPEW
(Beyond Programmable Early Warning) flag on the first query after
an error injection.  After that, the position flags will be as they
are in the underlying tape drive.

Also, update the sa(4) man page to describe tape parameters,
which can be set via 'mt param'.

sys/cam/scsi/scsi_sa.c:
	In saregister(), create the inject_eom sysctl variable.

	In sastart(), check to see whether inject_eom is set.  If
	so, return the read or write with 0 bytes written to
	indicate EOM.  Set the set_pews_status flag so that we
	fake PEWS status in the next position call for reads, and the
	next 3 calls for writes.  This allows the user to see the BPEW
	flag one time via 'mt status'.

	In sagetpos(), check the set_pews_status flag and fake
	PEWS status and decrement the counter if it is set.

share/man/man4/sa.4:
	Document the inject_eom sysctl variable.

	Document all of the parameters currently supported via
	'mt param'.

usr.bin/mt/mt.1:
	Point the user to the sa(4) man page for more details on
	supported parameters.

MFC after:	3 days
Sponsored by:	Spectra Logic
2017-05-05 20:00:53 +00:00
Konstantin Belousov
7748ab43a3 Grammar fixes.
Noted by:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2017-05-05 18:36:41 +00:00
Konstantin Belousov
25b526e626 Define the scope and purpose of the page.
Submitted by:	emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2017-05-05 18:21:33 +00:00
Konstantin Belousov
e6c0d5c360 Fix some grammar, fix some markup, bump copyright year, provide more
exact claims in some cases.

Discussed with:	bde (most parts)
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2017-05-05 17:23:57 +00:00
Ed Maste
45801499b2 arch(7): add a table of per-arch initial/final FreeBSD version
Reviewed by:	kib, wblock
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D10573
2017-05-05 16:40:45 +00:00
Konstantin Belousov
de6fc2729e Provide introduction for the arch(7) manpage.
Start with some words about linear address space and its layout, then
explain pointers models and ABIs, providing explanation to the
structure of the tables.

Reviewed by:	emaste, imp
'Future-proof' cheri wording by:	brooks
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D10596
2017-05-04 21:31:50 +00:00
Konstantin Belousov
dddb157699 Avoid wrapping of the machine-dependent type sizes table, by removing
non-informational sizeof() expressions.  Add some explanatory and
summary sentences.

Noted by:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2017-05-04 11:57:52 +00:00
Kenneth D. Merry
6953d22b15 Fix error recovery behavior in the pass(4) driver.
After FreeBSD SVN revision 236814, the pass(4) driver changed from
only doing error recovery when the CAM_PASS_ERR_RECOVER flag was
set on a CCB to sometimes doing error recovery if the passed in
retry count was non-zero.

Error recovery would happen if two conditions were met:

1.  The error recovery action was simply a retry.  (Which is most
    cases.)
2.  The retry_count is non-zero. (Which happened a lot because of
    cut-and-pasted code.)

This explains a bug I noticed in with camcontrol:

# camcontrol tur da34 -v
Unit is ready
# camcontrol reset da34
Reset of 1:172:0 was successful

At this point, there should be a Unit Attention:

# camcontrol tur da34 -v
Unit is ready

No Unit Attention.

Try it again:

# camcontrol reset da34
Reset of 1:172:0 was successful

Now set the retry_count to 0 for the TUR:

# camcontrol tur da34 -v -C 0
Unit is not ready
(pass42:mps1:0:172:0): TEST UNIT READY. CDB: 00 00 00 00 00 00
(pass42:mps1:0:172:0): CAM status: SCSI Status Error
(pass42:mps1:0:172:0): SCSI status: Check Condition
(pass42:mps1:0:172:0): SCSI sense: UNIT ATTENTION asc:29,2 (SCSI bus reset occurred)
(pass42:mps1:0:172:0): Field Replaceable Unit: 2

There is the unit attention. camcontrol(8) has a default
retry_count of 1, in case someone sets the -E flag without
setting -C.

The CAM_PASS_ERR_RECOVER behavior was only broken with the
CAMIOCOMMAND ioctl, which is the synchronous pass(4) API.  It has
worked as intended (error recovery is only done when the flag
is set) in the asynchronous API (CAMIOQUEUE ioctl).

sys/cam/scsi/scsi_pass.c:
	In passsendccb(), when calling cam_periph_runccb(), only
	specify the error routine when CAM_PASS_ERR_RECOVER is set.

share/man/man4/pass.4:
	Document that CAM_PASS_ERR_RECOVER is needed to enable
	error recovery.

Reported by:	Terry Kennedy <TERRY@glaver.org>
PR:		kern/218572
MFC after:	1 week
Sponsored by:	Spectra Logic
2017-05-03 20:59:47 +00:00
Vladimir Kondratyev
aa556702bc Add myself (wulf) as a src committer with gonzo and bapt as my mentors.
Approved by:	gonzo (mentor)
2017-05-03 20:56:34 +00:00
John Baldwin
4dd67957a8 Replace 'riscv' with the RISC-V targets 'riscv64' and 'riscv64sf'. 2017-05-03 16:55:02 +00:00
Justin Hibbits
002cc1f914 Add powerpcspe to arch(7)
Reviewed by:	emaste
2017-05-02 21:33:27 +00:00
Konstantin Belousov
6554316cdc Document time_t size.
Reviewed by:	emaste, imp, vangyzen
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D10568
2017-05-02 14:52:35 +00:00
Ed Maste
c602f5f3f5 revert r313473 (Disable LLD_IS_LD option combinations that fail)
r316647 corrected the build of tblgen and libllvm as dependencies for
LLD so undo the temporary seat-belt.

We still want to extend the build infrastructure to automatically detect
the case where the host LLD can be used instead of building a bootstrap
LLD, and likely extend libllvmminimal to meet LLD's needs for cases
where the build includes LLD but not Clang.

Sponsored by:	The FreeBSD Foundation
2017-04-30 16:12:23 +00:00
Enji Cooper
9c3595112f usb(4): manpage cleanup
1. Wrap at <80 columns for readability when editing. Rewrap some lines
   prematurely wrapped to better fit in <80 columns and not waste
   vertical space.
2. Fix SEE ALSO sorting (sort by section first, then manpage name).
3. Tweak the compound device description slightly by adding soft stops
   via commas.

MFC after:	1 week
Reported by:	igor [3], manlint [2]
Sponsored by Dell EMC Isilon
2017-04-29 16:44:36 +00:00
Hans Petter Selasky
90c4a1e4c0 Correct manual page link to usbdi(9).
MFC after:		1 week
2017-04-29 07:59:09 +00:00
John Baldwin
32455e8912 Revert r317446 and bring back cy(4).
Requested by:	bde
2017-04-27 16:14:32 +00:00
Brooks Davis
0607c830b3 More ATM and NATM removal
Submitted by:	ak
Reviewed by:	ngie
Differential Revision:	https://reviews.freebsd.org/D10511
2017-04-27 16:05:12 +00:00
Edward Tomasz Napierala
4f4acb65e8 Add information about device nodes to man pages for USB serial drivers.
MFC after:	2 weeks
2017-04-26 19:51:10 +00:00
Edward Tomasz Napierala
b96fc19739 Add some .Xrs to USB serial driver man pages.
MFC after:	2 weeks
2017-04-26 19:41:53 +00:00
John Baldwin
a63222db3a Remove the cy(4) driver for Cyclades serial adapters.
This driver has been disconnected from the build since the new tty
layer was introduced in 8.0 and was never updated for new tty.
2017-04-26 18:23:09 +00:00
Gleb Smirnoff
9dc2c43254 UMA_ZONE_REFCNT was removed.
PR:		209715
Submitted by:	Fabian Keil <fk fabiankeil.de>
MFC after:	3 days
2017-04-26 17:55:43 +00:00
Brooks Davis
b4e2ab78df Remove NATM configuration bits and assorted NATM and ATM remnants.
Reported by:	ak
Reviewed by:	ngie (first version)
Differential Revision:	https://reviews.freebsd.org/D10497
2017-04-25 21:59:34 +00:00
John Baldwin
73ad3fb536 Add a new GDB_LIBEXEC option to install gdb and kgdb to /usr/libexec.
When this option is enabled, only gdb and kgdb are installed to
/usr/libexec for use by crashinfo(8). Other bits of GDB such as
gdbserver and gdbtui are not installed. For this option to be
effective, GDB must be enabled.

Rework r317094 to re-enable GDB on all platforms but enable
GDB_LIBEXEC on platforms for which the GDB in ports is a superset of
functionality.

Reviewed by:	emaste, kib
Suggested by:	kib
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D10449
2017-04-25 18:08:56 +00:00
Brooks Davis
a7dc31283a Remove the NATM framework including the en(4), fatm(4), hatm(4), and
patm(4) devices.

Maintaining an address family and framework has real costs when we make
infrastructure improvements.  In the case of NATM we support no devices
manufactured in the last 20 years and some will not even work in modern
motherboards (some newer devices that patm(4) could be updated to
support apparently exist, but we do not currently have support).

With this change, support remains for some netgraph modules that don't
require NATM support code. It is unclear if all these should remain,
though ng_atmllc certainly stands alone.

Note well: FreeBSD 11 supports NATM and will continue to do so until at
least September 30, 2021.  Improvements to the code in FreeBSD 11 are
certainly welcome.

Reviewed by:	philip
Approved by:	harti
2017-04-24 21:21:49 +00:00
Ed Maste
e9e768f7e3 bsdgrep: disable GNU_GREP_COMPAT by default
The GNU extension bits in the base system are old, no longer faithful
to upstream, and surprising in some regards. Switch to documenting
WITH_GNU_GREP_COMPAT and default GNU_GREP_COMPAT to OFF in the name of
good behavior.

According to http://www.regular-expressions.info, GNU extensions:

-  Add missing quantifiers to BREs: \?, \+

-  Add branching to BREs: \|

-  Add backreferences (\1 through \9) to EREs

-  Add \w, \W, \s, and \S corresponding to :alnum:, [^[:alnum:]],
   :space:, and [^[:space:]] respectively

-  Add word boundaries and anchors:
   \b: word boundary
   \B: not word boundary
   \<: Strt of word
   \>: End of word
   \`: Start of subject string
    \': End of subject string

These extensions are still available in /usr/bin/grep by default today,
as it is still GNU grep.  As part of the bsdgrep migration plan these
extensions may be added to bsdgrep's regex support if necessary.

Submitted by:	Kyle Evans <kevans91 at ksu.edu>
Reviewed by:	cem
Differential Revision:	https://reviews.freebsd.org/D10114
2017-04-21 14:50:29 +00:00
Ed Maste
3f39ffc893 bsdgrep: add BSD_GREP_FASTMATCH knob for built-in fastmatch
Bugs have been found in the fastmatch implementation as used in bsdgrep.
Some have been fixed (r316495) while fixes for others are in review
(D10098).

In comparison with the fastmatch implementation, Kyle Evans found that:

- regex(3)'s performance with literal expressions offers a speed
  improvement over fastmatch

- regex(3)'s performance, both with simple BREs and EREs, seems to be
  comparable

The regex implementation was imported in r226035, and the commit message
reports:

    This is a temporary solution until the whole regex library is
    not replaced so that BSD grep development can continue and the
    backported code gets some review and testing. This change only
    improves scalability slightly, there is no big performance boost
    yet but several minor bugs have been found and fixed.

Introduce a WITH_/WITHOUT_BSD_GREP_FASTMATCH knob to support testing
of both approaches.

PR:		175314, 194823
Submitted by:	Kyle Evans <kevans91 at ksu.edu>
Reviewed by:	bdrewery (in part)
Differential Revision:	https://reviews.freebsd.org/D10282
2017-04-21 14:36:09 +00:00
Edward Tomasz Napierala
28ffa76673 Mention GEOM_MOUNTVER.
MFC after:	2 weeks
2017-04-20 20:06:51 +00:00
Baptiste Daroussin
50502545ce Readd Big5: some large databases setup are still requiring it.
Reported by:	"張君天(Chun-Tien Chang)" <tcs@kitty.2y.idv.tw>
2017-04-20 18:21:50 +00:00
Enji Cooper
4c033a734e Regenerate src.conf(5) after recent additions/clarifications
Sponsored by:	Dell EMC Isilon
2017-04-20 03:43:37 +00:00
Enji Cooper
609b7b269d Add a knob, WITH*_RPCBIND_WARMSTART_SUPPORT, to allow the end-user to build
rpcbind(8) with/without warmstart support.

The knob defaults to off to preserve POLA for the feature.

See rpcbind(8) for more details about the warmstart feature.

MFC after:	7 weeks
Relnotes:	yes
Sponsored by:	Dell EMC Isilon
2017-04-19 20:45:46 +00:00
Ed Maste
722a4cb445 Remove WITHOUT_GNU and WITHOUT_GNU_SUPPORT src.conf.knobs
These have no effect (and WITHOUT_GNU is documented as having no
effect). I intend to later introduce a WITHOUT_GPL knob to serve a
similar purpose as WITHOUT_GNU's previously documented intent, but with
a more accurate name. To avoid confusion over the transition though just
remove the existing, nonfunctional ones.
2017-04-19 18:59:38 +00:00
Simon J. Gerraty
d86e8e9c57 If MAKEOBJDIRPREFIX is a prefix match for .CURDIR, then __objdir is .CURDIR
Reviewed by:	bdrewery
2017-04-18 23:59:15 +00:00
John Baldwin
0780f5c3fb Regenerate to note that GDB is now off by default on most platforms.
Note that this commit also adds the default riscv settings for all
options since riscv was added to 'make targets' since the last time
this was generated.

Reminded by:	emaste
2017-04-18 19:54:04 +00:00