Commit Graph

18977 Commits

Author SHA1 Message Date
Pedro F. Giffuni
be53a489c6 libc: minor indent(1) cleanups.
Illumos and Schillix is adopting some of the locale code and our style(9)
sometimes matches the Solaris cstyle, so the changes are also useful as a
way to reduce diffs.

No functional change.

Discussed with: Joerg Schilling
MFC after:	1 week
2017-08-26 16:11:21 +00:00
Enji Cooper
b92e8635f9 Revert r321457
It doesn't fail after ^/head@r322855 (the releng_50 clang merge).

PR:	220989
MFC after:	2 months
MFC with:	r321369, r322855
2017-08-26 06:44:50 +00:00
Conrad Meyer
5a28df2e13 getmntinfo(3): Scale faster, and return sooner
getmntinfo(3) is designed around a relatively static or slow growing set of
current mounts.  It tried to detect a race with somewhat concurrent mount
and re-call getfsstat(2) in that case, looping indefinitely.  It also
allocated space for a single extra mount as slop.

In the case where the user has a large number of mounts and is adding them
at a rapid pace, it fell over.

This patch makes two functional changes:

1. Allocate even more slop.  Double whatever the last getfsstat(2) returned.

2. Abort and return some known results after looping a few times
   (arbitrarily, 3).  If the list is constantly changing, we can't guarantee
   we return a full result to the user at any point anyways.

While here, add very basic functional tests for getmntinfo(3) to the libc
suite.

PR:		221743
Submitted by:	Peter Eriksson <peter AT ifm.liu.se> (earlier version)
Sponsored by:	Dell EMC Isilon
2017-08-25 16:38:21 +00:00
Dimitry Andric
0fa4377182 Upgrade our copies of clang, llvm, lldb and compiler-rt to r311606 from
the upstream release_50 branch.

As of this version, lib/msun's trig test should also work correctly
again (see bug 220989 for more information).

PR:		220989
MFC after:	2 months
X-MFC-with:	r321369
2017-08-24 20:19:27 +00:00
Dimitry Andric
965351a4eb Vendor import of compiler-rt release_50 branch r311606:
https://llvm.org/svn/llvm-project/compiler-rt/branches/release_50@311606
2017-08-24 16:35:23 +00:00
Dimitry Andric
a75fa8aaf2 Vendor import of clang release_50 branch r311606:
https://llvm.org/svn/llvm-project/cfe/branches/release_50@311606
2017-08-24 16:35:14 +00:00
Dimitry Andric
5e529592b1 Vendor import of llvm release_50 branch r311606:
https://llvm.org/svn/llvm-project/llvm/branches/release_50@311606
2017-08-24 16:35:02 +00:00
John Baldwin
de6feefdb7 Improve the coverage of debug symbols for MK_DEBUG_FILES.
- Include debug symbols in static libraries.  This permits binaries
  to include debug symbols for functions obtained from static libraries.
- Permit the C/C++ compiler flags added for MK_DEBUG_FILES to be
  overridden by setting DEBUG_FILES_CFLAGS.  Use this to limit the debug
  information for llvm libraries and binaries.

Reviewed by:	emaste
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D12025
2017-08-23 23:30:25 +00:00
John Baldwin
04a91333db Include {u,}{div,mod}si3() on mips in libcompiler_rt.
These builtins were listed in the mips-specific Symbol.map for libc but
were not implemented.  Compiling mips with recent clang requires these
symbols.

Sponsored by:	DARPA / AFRL
2017-08-21 17:49:01 +00:00
Konstantin Belousov
7fea98ac16 Optimize libc to get and set TLS using the RDFSBASE and RDGSBASE
instructions, if supported both by CPU and kernel.

Reviewed by:	jhb (previous version)
Tested by:	pho (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
Differential revision:	https://reviews.freebsd.org/D12023
2017-08-21 17:39:12 +00:00
Dimitry Andric
0554abf0e0 Upgrade our copies of clang, llvm, lld and libc++ to r311219 from the
upstream release_50 branch.

MFC after:	2 months
X-MFC-with:	r321369
2017-08-21 07:03:02 +00:00
Dimitry Andric
6aa46a19c5 Vendor import of clang release_50 branch r311219:
https://llvm.org/svn/llvm-project/cfe/branches/release_50@311219
2017-08-20 21:03:30 +00:00
Dimitry Andric
15c5c77fa0 Vendor import of llvm release_50 branch r311219:
https://llvm.org/svn/llvm-project/llvm/branches/release_50@311219
2017-08-20 21:02:43 +00:00
Dag-Erling Smørgrav
3954b52f28 In fetch_resolve(), if the port number or service name is included in
the host argument (e.g. "www.freebsd.org:443"), the service pointer,
which is supposed to point to the port or service part, instead points
to the separator, causing getaddrinfo() to fail.

Note that I have not been able to trigger this bug with fetch(1), nor
do I believe it is possible, as libfetch always parses the host:port
specification itself.  I discovered it when I copied fetch_resolve()
into an unrelated project.

MFC after:	3 days
2017-08-18 18:20:36 +00:00
Sevan Janiyan
242afab281 Add caveat to kinfo_getvmmap(3) explaining high CPU utilisation.
Based on kib's reply on https://lists.freebsd.org/pipermail/freebsd-hackers/2016-July/049710.html

PR:		210904
Submitted by:	Yuri Victorovich <yuri AT rawbw DOT com>
Reviewed by:	jilles
Approved by:	bcr (mentor)
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D12004
2017-08-18 16:42:58 +00:00
Ed Maste
f8de17a11f force use of ld.bfd for linking i386 libc, even when using lld
lld can successfully link most of a working i386 userland and kernel,
but produces a broken libc. For now if we're otherwise using lld, and
ld.bfd is available, explicitly use it for libc.

Sponsored by:	The FreeBSD Foundation
2017-08-16 18:55:39 +00:00
Warner Losh
b53a8df3aa There is no MACHINE_CPUARCH == armv6, remove redunant check. 2017-08-14 22:38:54 +00:00
Enji Cooper
188e46ab03 Add supporting changes for Add limited sandbox capability to "make check"
Non-tests/... changes:
- Add HAS_TESTS= to Makefiles with libraries and programs to enable iteration
  and propagate the appropriate environment down to *.test.mk.

tests/... changes:
- Add appropriate support Makefile.inc's to set HAS_TESTS in a minimal manner,
  since tests/... is a special subdirectory tree compared to the others.

MFC after:	2 months
MFC with:	r322511
Reviewed by:	arch (silence), testing (silence)
Differential Revision:	D12014
2017-08-14 19:21:37 +00:00
Michael Tuexen
703e1e3d0f Fix minor formatting issue. 2017-08-13 15:15:40 +00:00
Konstantin Belousov
b1cbddaf5d Fix a regression in r321608.
On i386 with CPUID but without SSE2, set lfence_works to LMB_NONE
instead of looping.

Reported and tested by:	Andre Albsmeier <andre@fbsd.e4m.org>
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2017-08-13 14:42:23 +00:00
Enji Cooper
ac5ff11099 TESTSDIR isn't required; remove it
MFC after:	1 week
MFC with:	r322450
2017-08-13 01:08:37 +00:00
Enji Cooper
38dd175927 Integrate the tests moved in r305626 in to the FreeBSD test suite
The reachover Kyuafiles were never added, and thus the tests were installed
as standalone tests, and not integrated into the full suite.

MFC after:	1 week
MFC with:	r305626, 305629, r307863, r322447, r322448, r322449
2017-08-13 01:04:44 +00:00
Enji Cooper
191d976f61 Use hardcoded IPv4/IPv6 addresses for google-public-dns-a.google.com instead
of freefall.freebsd.org to unbreak the DNS tests

The address allocations for freefall.freebsd.org have changed in the past 4 years.
Use a more stable set of hardcoded addresses for now to make the tests succeed
reliably.

The hostname should be resolved dynamically instead of hardcoding the addresses in
the future. This is just a bandaid.

MFC after:	1 week
2017-08-13 00:56:43 +00:00
Enji Cooper
737fb907a7 Make root-privileges a requirement for the test
Some of the testcases try to manipulate sysctls that require root privileges,
e.g., "kern.sync_on_panic". Make root-privileges a hard requirement so the
tests don't raise false positives due to privilege issues when calling
sysctlbyname(3) on writable sysctls.

MFC after:	1 week
2017-08-13 00:14:08 +00:00
Enji Cooper
ebe3e93cef Fix result printing
- Flushing stdout prevents the buffer from being printed twice, fixing
  issues with stdout printing out the testplan, etc, twice.
- Don't print out raw source/line numbers; hide them behind comments.

MFC after:	1 week
2017-08-13 00:04:50 +00:00
Enji Cooper
22dae9c629 Hide sccsid under #if 0, per example in style(9)
This fixes a -Wunused warning with gcc 6.3.0/7.0.0.

MFC after:	1 week
2017-08-12 22:20:08 +00:00
Ryan Libby
4c889da8b6 Revert r322418, LDBL_MAX_EXP unsuitable for macro pasting on some arches
Either need a different way to spell HALF_LDBL_MAX, or a different way
to spell LDBL_MAX_EXP, or a different approach.

Reported by:	ian
2017-08-12 18:28:02 +00:00
Sevan Janiyan
ef764b4b8e Add missing header.
S_IRUSR is defined in sys/stat.h

PR:		209229
Submitted by:	<mt AT markoturk DOT info>
Approved by:	bcr (mentor)
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D12007
2017-08-12 17:46:50 +00:00
Konstantin Belousov
25b73e6327 Improve standard compliance for memset_s() and abort_handler_s().
abort_handler_s() currently simply calls abort(), though the standard
specifies more: "Writes an implementation-defined message to stderr
which must include the string pointed to by msg and calls abort()."

memset_s() is missing error condition "n > smax", and does not invoke
the constraint handler after filling the buffer: "following errors are
detected at runtime and call the currently installed constraint
handler function after storing ch in every location of the destination
range [dest, dest+destsz) if dest and destsz are themselves valid",
one of the errors is "n > smax" itself.

Submitted by:	Yuri Pankov <yuripv@gmx.com>
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D11991
2017-08-12 15:18:17 +00:00
Konstantin Belousov
6fe9e5b821 Fix indent.
Submitted by:	Yuri Pankov <yuripv@gmx.com>
MFC after:	3 days
2017-08-12 14:58:09 +00:00
Ryan Libby
9afac9fed9 lib/msun: avoid referring to broken LDBL_MAX
LDBL_MAX is broken on i386:
https://lists.freebsd.org/pipermail/freebsd-numerics/2012-September/000288.html

Gcc has produced +Infinity for LDBL_MAX on i386 and amd64 with -m32
for some time, and newer versions of gcc are now warning that the
"floating constant exceeds range of 'long double'".  Avoid this by
referring to half the value of LDBL_MAX instead.

Reviewed by:	bde
Approved by:	markj (mentor)
Sponsored by:	Dell EMC Isilon
2017-08-11 22:41:24 +00:00
Pedro F. Giffuni
9404dae2a1 fnmatch(3): Update testcase for r322368. 2017-08-10 17:03:46 +00:00
Mariusz Zaborski
1a32b20594 Limit descriptors stored in the pidfh structure.
Reviewed by:	markj, cem
Differential Revision:	https://reviews.freebsd.org/D11741
2017-08-10 16:50:13 +00:00
Mariusz Zaborski
4f9612a321 Store directory descriptor in the pidfh structure and use unlinkat(2)
function instead of unlink(2).

Now when pidfile_remove() uses unlinkat(2) to remove the pidfile
it is safe to use this function in capability mode.

Style fix: sort headers.

PR:		220524
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D11692
2017-08-10 16:45:05 +00:00
Pedro F. Giffuni
303cbb93c5 fnmatch(3): improve POSIX conformance.
In a recent interpretation[1], "\\" shall return a non-zero value
(indicating either no match or an error).

The fix involves a change over r254091 and now the behavior matches the
Sun/IBM/HP closed source implementations and also likely musl libc.

Submitted by:	Joerg Schilling <joerg at schily.net>
MFC after:	1 week

[1] http://austingroupbugs.net/view.php?id=806
2017-08-10 15:42:25 +00:00
Ruslan Bukin
af19cc59ca Support for v1.10 (latest) of RISC-V privilege specification.
New version is not compatible on supervisor mode with v1.9.1
(previous version).

Highlights:
    o BBL (Berkeley Boot Loader) provides no initial page tables
      anymore allowing us to choose VM, to build page tables manually
      and enable MMU in S-mode.
    o SBI interface changed.
    o GENERIC kernel.
      FDT is now chosen standard for RISC-V hardware description.
      DTB is now provided by Spike (golden model simulator). This
      allows us to introduce GENERIC kernel. However, description
      for console and timer devices is not provided in DTB, so move
      these devices temporary to nexus bus.
    o Supervisor can't access userspace by default. Solution is to
      set SUM (permit Supervisor User Memory access) bit in sstatus
      register.
    o Compressed extension is now turned on by default.
    o External GCC 7.1 compiler used.
    o _gp renamed to __global_pointer$
    o Compiler -march= string is now in use allowing us to choose
      required extensions (compressed, FPU, atomic, etc).

Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D11800
2017-08-10 14:18:09 +00:00
Ryan Libby
20100e740e Pick 'Remove external linkage for spin_adaptive' from upstream jemalloc
Apply the changes from upstream jemalloc 048c6679.  This is actually not
quite a cherry pick due to makefile difference and because FreeBSD does
not carry the msvc project files which were also modified in that
commit.

Approved by:	jasone (maintainer), markj (mentor)
Sponsored by:	Dell EMC Isilon
2017-08-09 22:58:42 +00:00
Kyle Evans
3e13c1fa27 capsicum_helpers: Add FIODTYPE to default ioctls allowed
FIODTYPE will be needed by hexdump(1) to speed up the -s flag on devices
that should be able to support fseek(3); specifically, in an attempt to
correct for the fact that most tape drives don't support seeking yet don't
indicate as such when fseeko(3) is invoked. Related: D10939

Reviewed by:	cem, emaste, oshogbo
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D10937
2017-08-09 18:15:07 +00:00
Kyle Evans
f75f5a355e libusb(3): Expose device caps as libusb_bos_descriptor::dev_capability
Some libusb consumers in Linux-land (in this case, libusb4java) expect a
dev_capability member that they can use to enumerate the device
capabilities.

No particular layout is expected of this, just that it can be traversed
using the bLength member until bNumDeviceCapabilities are read and that the
consumer may then use one of the libusb_get_*_descriptor methods to extract
specific (usb 2.0 vs. ss) capability information.

In collaboration with:	hselasky
Reviewed by:	hselasky
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D11494
2017-08-09 18:06:27 +00:00
Dimitry Andric
9dc417c32b Upgrade our copies of clang, llvm and libc++ to r310316 from the
upstream release_50 branch.

MFC after:	2 months
X-MFC-with:	r321369
2017-08-09 17:32:39 +00:00
Kyle Evans
a0bf5d8a68 regex(3): Refactor fast/slow stepping bits in the matching engine
Adding features for matching is fairly straightforward, but this requires
some duplication because of this fast/slow setup. They can be fairly
trivially combined into a single walk(), so do it to make future additions
less error prone.

Reviewed by:	cem (earlier version), emaste, pfg
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D11233
2017-08-09 01:04:36 +00:00
Dimitry Andric
ffe56ea4c3 Vendor import of clang release_50 branch r310316:
https://llvm.org/svn/llvm-project/cfe/branches/release_50@310316
2017-08-08 16:53:22 +00:00
Dimitry Andric
4e20bb0468 Vendor import of llvm release_50 branch r310316:
https://llvm.org/svn/llvm-project/llvm/branches/release_50@310316
2017-08-08 16:52:53 +00:00
Kyle Evans
a4a801688c regex(3): Handle invalid {} constructs consistently and adjust tests
Currently, regex(3) exhibits the following wrong behavior as demonstrated
with sed:

 - echo "a{1,2,3}b" | sed -r "s/{/_/"     (1)
 - echo "a{1,2,3}b" | sed "s/\}/_/"       (2)
 - echo "a{1,2,3}b" | sed -r "s/{}/_/"    (3)

Cases (1) and (3) should throw errors but they actually succeed, and (2)
throws an error when it should match the literal '}'. The correct behavior
was decided by comparing to the behavior with the equivalent BRE (1)(3) or
ERE (2) and consulting POSIX, along with some reasonable evaluation.

Tests were also adjusted/added accordingly.

PR:		166861
Reviewed by:	emaste, ngie, pfg
Approved by:	emaste (mentor)
MFC after:	never
Differential Revision:	https://reviews.freebsd.org/D10315
2017-08-08 04:10:46 +00:00
Ruslan Bukin
ca20f8ec29 o Replace __riscv__ with __riscv
o Replace __riscv64 with (__riscv && __riscv_xlen == 64)

This is required to support new GCC 7.1 compiler.
This is compatible with current GCC 6.1 compiler.

RISC-V is extensible ISA and the idea here is to have built-in define
per each extension, so together with __riscv we will have some subset
of these as well (depending on -march string passed to compiler):

__riscv_compressed
__riscv_atomic
__riscv_mul
__riscv_div
__riscv_muldiv
__riscv_fdiv
__riscv_fsqrt
__riscv_float_abi_soft
__riscv_float_abi_single
__riscv_float_abi_double
__riscv_cmodel_medlow
__riscv_cmodel_medany
__riscv_cmodel_pic
__riscv_xlen

Reviewed by:	ngie
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D11901
2017-08-07 14:09:57 +00:00
Enji Cooper
7921075587 MFhead@r322057 2017-08-04 17:41:49 +00:00
Mariusz Zaborski
73979478cc Introduce the flopenat(3) function.
Reviewed by:	des, emaste
Differential Revision:	https://reviews.freebsd.org/D11690
2017-08-04 14:24:24 +00:00
Warner Losh
fac7b28779 Add stpcpy and stpncpy to libstand
This adds the stpcpy and stpncpy functions to libstand.

Differential Revision: https://reviews.freebsd.org/D11844
2017-08-04 03:48:17 +00:00
Enji Cooper
d1ce8bc1b5 MFhead@r322023 2017-08-03 18:07:01 +00:00
Enji Cooper
b382804144 Remove special-case logic for running tests on host machines
I'm not sure what process sjg@ was using, but using CHECKDIR=${.OBJDIR} with
"make check" on ^/head is the correct thing to do. This unbreaks "make check"
for me (unsandboxed, not using CHECKDIR=${.OBJDIR}).

While here, fix a whitespace nit with LIBADD.

MFC after:	1 week
2017-08-03 17:53:14 +00:00
Enji Cooper
f2381beb2c MFhead@r322021 2017-08-03 17:43:26 +00:00
Phil Shafer
fd5e3f3ec6 Update from libxo-0.8.1 to 0.8.4:
0.8.4:
    - void anchor width optimization when we have a custom formatter (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221130)
    - make "{[:/18}" do the right thing (also allows "{[:/%s}", wide ? 40 : 10)
    - Can't skip anchor formatting in non-display styles
    - add test case for {[:/18}
    - add upload-xohtml-files to 'make upload'
  0.8.3:
    - xohtml: Add "-w" option to pull support files from gh_pages
    - Add "upload-xohtml-files" target to publish support files in gh_pages/
    - add HISTORY/AUTHORS section to man pages
  0.8.2:
    - xohtml: Add div.units as standard CSS text
    - Don't treat values as format strings; they are not
    - add "-p" to "mkdir -p build" in setup.sh
    - add test case for {U:%%} (from df.c)
    - detect end-of-string in '%' and '' escaping
    - make xo_simple_field, for common simple cases
    - xohtml: nuke "n" in "echo" commands
    - rename "format" to "fmt" for consistency; same for "str" to "value"

Submitted by:	phil
2017-08-03 15:47:42 +00:00
Enji Cooper
3a8b7649ce MFhead@r321916 2017-08-02 09:00:59 +00:00
Enji Cooper
c119e4a444 Remove bogus bsd.subdir.mk .include
bsd.subdir.mk is included from bsd.obj.mk, which is included via bsd.lib.mk.

MFC after:	3 days
2017-08-02 08:54:18 +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
8c09935728 Add HAS_TESTS to all Makefiles that use the SUBDIR.${MK_TESTS}+= tests idiom 2017-08-02 08:14:06 +00:00
Cy Schubert
01da25af6b Remove redundant include directories which expand to a noop,
"-I/lib/krb5 -I -I".

Reviewed by:	ngie@, markm@
MFC after:	1 month
Differential Revision:	D11769
2017-07-31 19:07:45 +00:00
Dimitry Andric
37cd60a321 Upgrade our copies of clang, llvm, lld and lldb to r309439 from the
upstream release_50 branch.  This is just after upstream's 5.0.0-rc1.

MFC after:	2 months
X-MFC-with:	r321369
2017-07-30 18:01:34 +00:00
Enji Cooper
b9c6d356b2 libprocstat(3): fix arguments list for procstat_getargv(3) and procstat_getenvv(3)
Neither libcall takes a fourth argument (`char *errbuf`).

PR:		217884
Submitted by:	tobik
MFC after:	1 month
2017-07-29 22:25:45 +00:00
Enji Cooper
45805bd715 libprocstat(3): fix reference (typo) to procstat_freeenvv in description for
procstat_getargv(3)

PR:		217884
MFC after:	1 month
Submitted by:	tobik
2017-07-29 22:19:00 +00:00
Enji Cooper
e504201ea7 Add sys/socket.h to SYNOPSIS for libprocstat(3)
sys/socket.h is required for procstat_get_socket_info(3), added in
r221807.

MFC after:	1 month
PR:		217884
Submitted by:	tobik
2017-07-29 22:16:05 +00:00
Dimitry Andric
9e3ca9b3ba Vendor import of lld release_50 branch r309439:
https://llvm.org/svn/llvm-project/lld/branches/release_50@309439
2017-07-29 21:30:27 +00:00
Dimitry Andric
104a02fb6c Vendor import of clang release_50 branch r309439:
https://llvm.org/svn/llvm-project/cfe/branches/release_50@309439
2017-07-29 21:28:13 +00:00
Dimitry Andric
3ad6a4b447 Vendor import of llvm release_50 branch r309439:
https://llvm.org/svn/llvm-project/llvm/branches/release_50@309439
2017-07-29 21:25:18 +00:00
Konstantin Belousov
d00ed7642f Simplify flow control.
Also add explicit comment why libc cannot simply rely on open(2)
failure in capability mode.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-07-28 12:22:32 +00:00
Konstantin Belousov
9a3083660d Use MFENCE to serialize RDTSC on non-Intel CPUs.
Kernel already used the stronger barrier instruction for AMDs, correct
the userspace fast gettimeofday() implementation as well.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D11728
2017-07-27 08:37:07 +00:00
Enji Cooper
9f27375481 Re-add #endif accidentally deleted in r321484
MFC after:	1 month
MFC with:	r321455, r321484
2017-07-25 16:57:25 +00:00
Enji Cooper
db92647731 Only test ld_pi_odd with LDBL_MANT_DIG == 64 to fix the build
The empty (unimplemented) test inputs for sparc64 trigger a -Wtype-limits build
failure because nitems of an empty array is always false, i.e., deadcode.

MFC after:	1 month
MFC with:	r321455
Reported by:	Jenkins (sparc64 job)
2017-07-25 16:21:22 +00:00
Enji Cooper
82482c7c1f Mask issues with duplicate definitions for __fnstcw, __fldenv, and __fldcw on
i386 by ignoring -Wmacro-redefined.

This is a bandaid until the code is fixed and will be reverted before MFC.
2017-07-25 16:11:36 +00:00
Konstantin Belousov
4f969e10d1 Fix indent.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2017-07-25 09:48:33 +00:00
Enji Cooper
bc82a381be Mark :reduction as an expected failure
It fails with clang 5.0+.

PR:	220989
MFC after:	2 months
MFC with:	r321369
Reported by:	Jenkins
2017-07-25 03:56:42 +00:00
Enji Cooper
4580a78efd Convert lib/msun/trig_test from TAP to ATF format
Only expose :accuracy and :reduction if !i386, similar to before,
but more holistically to avoid future -Wunused issue with the unused
functions.

MFC after:	1 month
2017-07-25 03:55:44 +00:00
Enji Cooper
fd5e9c331e Raise WARNS to 1
This will enable warnings with the msun tests.

MFC after:	1 month
2017-07-25 03:54:35 +00:00
Bryan Drewery
cd2831005b Move llvm Options.inc hack from r321433 for NO_CLEAN to lib/clang/libllvm.
The files are only ever generated to .OBJDIR, not to WORLDTMP (as a
sysroot) and are only ever included from a compilation.  So using
a beforebuild target here removes the file before the compilation
tries to include it.

MFC after:	2 months
X-MFC-With:	r321369
2017-07-24 23:32:24 +00:00
Warner Losh
4c69a17ff9 fix typo 2017-07-24 18:10:42 +00:00
Dimitry Andric
0cc9e150fb Add a few more object files to liblldb, which should solve errors when
linking the lldb executable in some cases.  In particular, when the
-ffunction-sections -fdata-sections options are turned off, or
ineffective.

Reported by:	Shawn Webb, Mark Millard
MFC after:	2 months
X-MFC-With:	r308421
2017-07-24 16:33:06 +00:00
Kristof Provost
a342f43571 Handle WITH/WITHOUT_PF in libsysdecode
Only filter out the PF ioctls if we're building without pf support.
Until now those were always filtered out, so truss did not show symbolic
names for pf ioctls.

Differential Revision:	https://reviews.freebsd.org/D11629
2017-07-22 12:51:19 +00:00
Dimitry Andric
90a5403fea Merge ^/head r321307 through r321350. 2017-07-21 18:54:34 +00:00
Bryan Drewery
9f4bf11e12 Properly set userid for truncate_test.
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-07-21 16:14:06 +00:00
Alan Somers
18ddf67c64 Implement SIGEV_THREAD notifications for lio_listio(2)
Our man pages have always indicated that this was supported, but in fact the
feature was never implemented for lio_listio(2).

Reviewed by:	jhb, kib (earlier version)
MFC after:	20 days
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D11680
2017-07-21 15:09:24 +00:00
Dimitry Andric
7a0f27890a Merge ^/head r321239 through r321306. 2017-07-20 20:37:23 +00:00
Alan Somers
1bf9ff7603 Remove some private symbols from librt
Private functions like __aio_read and _aio_read were exposed in
FBSDprivate_1.0 by r169090, even though they've never been used outside of
librt. Also, remove some weak references from r156136 that have never
resolved.

Reviewed by:	kib
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D11649
2017-07-20 16:24:29 +00:00
Dimitry Andric
2fef18f836 Merge ^/head r320994 through r321238. 2017-07-19 19:43:10 +00:00
Dimitry Andric
b40b48b876 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r308421, and update
build glue.
2017-07-19 19:41:41 +00:00
Ed Maste
e6db6692e5 enable pidfile tests on arm64
Pidfile tests were disabled on arm64 (in r286863) because they hung.
They have been fixed (r306098) and so can be enabled now.

PR:		202304
Sponsored by:	The FreeBSD Foundation
2017-07-19 14:07:38 +00:00
Dimitry Andric
97a708bebc Vendor import of libc++ trunk r308421:
https://llvm.org/svn/llvm-project/libcxx/trunk@308421
2017-07-19 07:02:49 +00:00
Dimitry Andric
462d72ec21 Vendor import of compiler-rt trunk r308421:
https://llvm.org/svn/llvm-project/compiler-rt/trunk@308421
2017-07-19 07:02:40 +00:00
Dimitry Andric
de51d67148 Vendor import of clang trunk r308421:
https://llvm.org/svn/llvm-project/cfe/trunk@308421
2017-07-19 07:02:30 +00:00
Dimitry Andric
93c91e39b2 Vendor import of llvm trunk r308421:
https://llvm.org/svn/llvm-project/llvm/trunk@308421
2017-07-19 07:02:10 +00:00
John Baldwin
ad6b4a346f Remove special handling for 'disk*.h'
This was originally added so that only one of diskmbr.h or diskpc98.h
was chosen and is no longer needed after PC98's removal.  However, the
special handling was also broken as it effectively prevented the decoding
of ioctls declared in other headers such as <sys/disk.h> or
<sys/disklabel.h>.
2017-07-18 21:09:29 +00:00
Pedro F. Giffuni
1c9158aabe libthr: check for possible overflow in the pthread_barrier_init() count.
Following up on r320900, where the check for negative count values was
removed, add a check to prevent integer overflow. This is to account that
b_count, b_waiters but most importantly the total number of threads in
the system are signed values.

Discussed with:	kib
MFC after:	2 weeks
2017-07-15 15:00:13 +00:00
Dimitry Andric
03f072d13d Merge ^/head r320971 through r320993. 2017-07-14 17:38:44 +00:00
Brad Davis
a9796f9d2b Follow up to r320992, properly escape the backslash so it renders properly.
MFC after:	1 week
Forgotten by:	brd
X-MFC-With:	r320992
2017-07-14 17:27:15 +00:00
Brad Davis
d29193055b Add a complete example to tsearch(3)
Reviewed by:	wblock, sevan, bruffer
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D11053
2017-07-14 17:07:28 +00:00
Kenneth D. Merry
683b025ade Add IBM TS1155 density codes to libmt and the mt(1) man page.
These are taken directly from the density report from a TS1155
tape drive.  (Using mt getdensity)

lib/libmt/mtlib.c:
	Add 3592B5 encrypted/unencrypted density codes, and bpmm/bpi
	values.  The bpmm/bpi values are the same as TS1150, but
	there are 50% more tracks.

usr.bin/mt/mt.1:
	Add 3592B5 encrypted/unencrypted density codes, bpmm/bpi
	values and number of tracks.  Bump the man page date.

MFC after:	3 days
Sponsored by:	Spectra Logic
2017-07-14 16:45:46 +00:00
Pedro F. Giffuni
97c3a994e4 libthr: 'count' is unsigned so don't check for negative values.
Obtained from:	DragonFlyBSD (git e7db8139)
2017-07-14 16:05:54 +00:00
Dimitry Andric
d2043ca373 Merge ^/head r320573 through r320970. 2017-07-13 22:01:38 +00:00
Dimitry Andric
c439438675 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r307894, and update
build glue.
2017-07-13 21:58:45 +00:00