Commit Graph

7058 Commits

Author SHA1 Message Date
Dimitry Andric
21cf1fd41c Update llvm, clang and lldb to release_38 branch r258968. 2016-01-27 22:48:52 +00:00
Alan Somers
eaae77f810 Fix grep_test:recurse with ZFS and TMPFS tmpdirs
contrib/netbsd-tests/usr.bin/grep/t_grep.sh
	Fix grep_test:recurse when /tmp is either zfs or tmpfs. The test was
	relying on an implicit ordering of directory recursion which happens
	to be true when using UFS. grep's specification requires no such
	ordering. The solution is to ignore the order of grep's results.

Reviewed by:	ngie
MFC after:	32 days
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D4925
2016-01-27 16:13:10 +00:00
Glen Barber
0e186c0aab MFH
Sponsored by:	The FreeBSD Foundation
2016-01-27 14:16:13 +00:00
Enji Cooper
6144b07f9b Add debug output via ATF_REQUIRE_MSG when the first call to
mlock(2) fails

This helps identify the problem with running this test on my VM
hosts (ENOMEM)

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2016-01-27 07:06:49 +00:00
Enji Cooper
8e62f8414e Adjust vm.max_wired in order to avoid hitting EAGAIN artificially
Set vm.max_wired to INT_MAX in :mlock_err, :mlock_mmap, and :mlock_nested to
avoid hitting EAGAIN artificially on the system when running the tests

Require root privileges in order to set the sysctl

Add allow_sysctl_side_effects to require.config as this test is now adjusting
sysctls that can affect the global system state

Unlike the version submitted by cem in OneFS, this version uses a scratch file
to save/restore the previous value of the sysctl. I _really_, _really_ wish
there were better hooks in atf/kyua for per test suite setup/teardown -- using
a file is kludgy, but it's the best I can do to avoid situations where (for
instance), sysctl(3) may fail and drop a core outside the kyua sandbox.

Based on a patch submitted by cem, but modified to take business logic out of
ATF_TP_ADD_TCS(3).

Differential Revision: https://reviews.freebsd.org/D4779
MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division
2016-01-27 06:24:19 +00:00
Gleb Smirnoff
a781766836 Grab value for LEAF_tcpCurrEstab from net.inet.tcp.stats instead of
net.inet.tcp.pcblist, which is much cheaper.
2016-01-27 00:50:27 +00:00
Dimitry Andric
14d5c08ba8 Merge ^/head r294599 through r294776. 2016-01-26 07:49:11 +00:00
Navdeep Parhar
361e428888 Use LIBADD instead of LDADD in rping's Makefile and add libcxgb4 (the
userspace iWARP library for cxgbe) to the list of libraries.

rping using the libcxgb4 + iw_cxgbe combo was tested with T5 hardware.

Obtained from:	Chelsio Communications
2016-01-26 01:02:19 +00:00
Glen Barber
f9421853ad MFH
Sponsored by:	The FreeBSD Foundation
2016-01-25 14:13:28 +00:00
Ruslan Bukin
4f0a4502a1 Add config for RISC-V ISA.
Reviewed by:	emaste
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D5046
2016-01-24 15:12:49 +00:00
Ruslan Bukin
a3e762571c Add a minimal gcc config for RISC-V.
This is required to build csu.

Reviewed by:	andrew
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D5039
2016-01-23 15:33:11 +00:00
Dimitry Andric
8c24ff90c4 Update llvm and clang to release_38 branch r258549. 2016-01-22 21:50:08 +00:00
Dimitry Andric
d9b9dae1a9 Merge ^/head r294169 through r294598. 2016-01-22 20:41:56 +00:00
Ruslan Bukin
e79b31967d Add support for RISC-V ISA.
Reviewed by:	emaste
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D5021
2016-01-22 16:59:06 +00:00
Ruslan Bukin
bdffadedf5 Add stubs for RISC-V ISA so libunwind can be compiled.
Reviewed by:	emaste
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D5035
2016-01-22 16:42:06 +00:00
Ruslan Bukin
47f9f6eb3a Add configuration for RISC-V ISA.
Reviewed by:	emaste
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D5020
2016-01-22 16:37:26 +00:00
Bjoern A. Zeeb
54902c0a6a Change the variable to a #define in order to make gcc happy which
otherwise will complain about "variably modified 'alias' at file scope".
Unbreaks the build on gcc platforms.
2016-01-22 15:03:22 +00:00
Xin LI
68ba7e87e7 MFV r294491: ntp 4.2.8p6.
Security:	CVE-2015-7973, CVE-2015-7974, CVE-2015-7975
Security:	CVE-2015-7976, CVE-2015-7977, CVE-2015-7978
Security:	CVE-2015-7979, CVE-2015-8138, CVE-2015-8139
Security:	CVE-2015-8140, CVE-2015-8158
With hat:	so
2016-01-22 07:32:39 +00:00
Hartmut Brandt
5edd0d3a4d Fill the ifAlias leaf of the ifXTable with the interface description
if there is one available and it fits into the maximum size (64 characters).
2016-01-21 16:11:20 +00:00
Glen Barber
59d43d11fe MFH
Sponsored by:	The FreeBSD Foundation
2016-01-20 09:50:54 +00:00
Dimitry Andric
5e23bfeb2d Pull in r258110 from upstream clang trunk, by Faisal Vali:
Fix PR26134: When substituting into default template arguments, keep
  CurContext unchanged.

  Or, do not set Sema's CurContext to the template declaration's when
  substituting into default template arguments of said template
  declaration.
  If we do push the template declaration context on to Sema, and the
  template declaration is at namespace scope, Sema can get confused and
  try and do odr analysis when substituting into default template
  arguments, even though the substitution could be occurring within a
  dependent context.
  I'm not sure why this was being done, perhaps there was concern that
  if a default template argument referred to a previous template
  parameter, it might not be found during substitution - but all
  regression tests pass, and I can't craft a test that would cause it
  to fails (if some one does, please inform me, and i'll craft a
  different fix for the PR).

  This patch removes a single line of code, but unfortunately adds more
  than it removes, because of the tests.  Some day I still hope to
  commit a patch that removes far more lines than it adds, while
  leaving clang better for it ;)

  Sorry that r253590 ("Change the expression evaluation context from
  Unevaluated to ConstantEvaluated while substituting into non-type
  template argument defaults") caused the PR!

This fix will be merged to the upstream release_38 branch soon, but we
need it now, to fix a failure in the databases/sfcgal port.
2016-01-19 18:57:37 +00:00
Xin LI
9123584634 MFV r294260:
Fix a wrong assertion in mandoc by applying OpenBSD
main.c,v 1.170 (florian):

Unbreak reading from stdin after recent parse() restructuring.
OK schwarze@
2016-01-18 08:52:09 +00:00
Dimitry Andric
47d45e347a Pull in r257977 from upstream llvm trunk, by Keno Fischer:
[DwarfDebug] Move MergeValues to .cpp, NFC

Pull in r257979 from upstream llvm trunk, by Keno Fischer:

  [DwarfDebug] Don't merge DebugLocEntries if their pieces overlap

  Summary:
  Later in DWARF emission we check that DebugLocEntries have
  non-overlapping pieces, so we should create any such entries
  by merging here.

  Fixes PR26163.

  Reviewers: aprantl
  Differential Revision: http://reviews.llvm.org/D16249

Again, these will be merged to the official release_38 branch soon, but
we need them ASAP.
2016-01-16 18:04:22 +00:00
Dimitry Andric
cdd9644c82 Pull in r257902 from upstream llvm trunk, by James Y Knight (this will
be merged to the official release_38 branch soon, but we need it ASAP):

  Stop increasing alignment of externally-visible globals on ELF
  platforms.

  With ELF, the alignment of a global variable in a shared library will
  get copied into an executables linked against it, if the executable even
  accesss the variable. So, it's not possible to implicitly increase
  alignment based on access patterns, or you'll break existing binaries.

  This happened to affect libc++'s std::cout symbol, for example. See
  thread: http://thread.gmane.org/gmane.comp.compilers.clang.devel/45311

  (This is a re-commit of r257719, without the bug reported in
  PR26144. I've tweaked the code to not assert-fail in
  enforceKnownAlignment when computeKnownBits doesn't recurse far enough
  to find the underlying Alloca/GlobalObject value.)

  Differential Revision: http://reviews.llvm.org/D16145
2016-01-16 18:00:58 +00:00
Dimitry Andric
5673a0f918 Undo r289072, which reverted upstream llvm trunk r240144. This is going
to be fixed for real by importing upstream llvm trunk r257902.
2016-01-16 17:57:54 +00:00
Dimitry Andric
98665a5875 Update llvm, clang and lldb to release_38 branch r257836. 2016-01-16 17:48:57 +00:00
Dimitry Andric
7aa11cde7e Merge ^head r294090 through r294168. 2016-01-16 17:33:09 +00:00
Baptiste Daroussin
2b774394cc Update mandoc to 20160116 2016-01-15 23:28:12 +00:00
Dimitry Andric
444ed5c5eb Update llvm, clang and lldb to trunk r257626, and update build glue. 2016-01-14 17:42:46 +00:00
Glen Barber
e60680024a MFH
Sponsored by:	The FreeBSD Foundation
2016-01-12 01:23:45 +00:00
Dimitry Andric
89d3f0ea4e Merge ^/head r293430 through r293685. 2016-01-11 19:36:44 +00:00
Dimitry Andric
c5f07d2cb6 After upstream llvm trunk r252903 and clang trunk r252904, -mcpu=xscale
was not recognized anymore for arm targets.  Fix this by adding the
correct sub-arch to the xscale definition in ARMTargetParser.def.  This
fix (from Andrew Turner) has also been submitted upstream.
2016-01-11 19:29:12 +00:00
Sepherosa Ziehau
868a59a7e2 hyperv/kvp_daemon: Make poll(2) block indefinitely
Submitted by:	Jun Su <junsu microsoft com>
Reviewed by:	Dexuan Cui <decui microsoft com>, me, adrain
Approved by:	adrian
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D4762
2016-01-11 03:30:16 +00:00
Dimitry Andric
8d93ab88a9 Reduce diffs between upstream lldb and ours. 2016-01-09 17:33:13 +00:00
Dimitry Andric
58df0addff Remove a few files missed in the last lldb import. 2016-01-09 17:31:16 +00:00
Dimitry Andric
b229c1a0b0 Merge ^/head r293280 through r293429. 2016-01-08 17:42:14 +00:00
Dimitry Andric
fdd1590a42 As submitted upstream in a review, avoid using undefined behavior in
llvm's LinkAllPasses.h.  This caused some of the calls not to be
emitted, if the optimization level was -O2 or higher.

Conversely, if you used -O1 or lower, calls to e.g.  RunningOnValgrind()
would be emitted, leading to link failures, because we did not include
Valgrind.cpp into libllvmsupport.  Therefore, add it unconditionally.

Noticed by:	ian
2016-01-08 17:32:42 +00:00
Xin LI
3311ff84ea MFV r293415:
ntp 4.2.8p5

Reviewed by:	cy, roberto
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D4828
2016-01-08 15:53:48 +00:00
Dimitry Andric
7d04351452 As a quick fix, import r257103 from upstream llvm trunk, and r257104
from upstream clang trunk, which sets the default debug tuning back to
gdb.  The lldb debug tuning is not yet grokked completely by our ELF
manipulation tools.
2016-01-07 22:47:27 +00:00
Glen Barber
0c9da521fa MFH
Sponsored by:	The FreeBSD Foundation
2016-01-07 17:23:43 +00:00
Dimitry Andric
a1bd240c5d Update lldb to trunk r256945. 2016-01-06 22:02:08 +00:00
Dimitry Andric
5dc6cc42f4 Merge ^/head r293175 through r293279. 2016-01-06 21:31:07 +00:00
Dimitry Andric
ea942507b1 Update clang to trunk r256945. 2016-01-06 20:20:48 +00:00
Dimitry Andric
4d0b32cd7f Update llvm to trunk r256945. 2016-01-06 20:19:13 +00:00
Ed Maste
0d7911c03b libunwind: Include header for dl_unwind_find_exidx for ARM EHABI 2016-01-06 19:41:06 +00:00
Glen Barber
e2e86de153 Fix another mis-merge.
Sponsored by:	The FreeBSD Foundation
2016-01-05 16:23:43 +00:00
Glen Barber
582727cc63 MFH
Sponsored by:	The FreeBSD Foundation
2016-01-05 14:21:02 +00:00
Xin LI
a15691bf11 MFV r293125: less v481.
MFC after:	1 month
Relnotes:	yes
2016-01-05 05:25:16 +00:00
Ed Maste
b8c23099c6 Merge LLVM libunwind revision 256779 2016-01-04 21:41:02 +00:00
Glen Barber
b626f5a73a MFH r289384-r293170
Sponsored by:	The FreeBSD Foundation
2016-01-04 19:19:48 +00:00
Ed Maste
9f2f44ceeb Merge LLDB 3.8
As with previous imports a number of plugins not immediately relevant
to FreeBSD have been excluded:

ABIMacOSX_i386
ABIMacOSX_arm
ABIMacOSX_arm64
ABISysV_hexagon
AppleObjCRuntimeV2
AppleObjCRuntimeV1
SystemRuntimeMacOSX
RenderScriptRuntime
GoLanguageRuntime
GoLanguage
ObjCLanguage
ObjCPlusPlusLanguage
ObjectFilePECOFF
DynamicLoaderWindowsDYLD
platform_linux
platform_netbsd
PlatformWindows
PlatformKalimba
platform_android
DynamicLoaderMacOSXDYLD
ObjectContainerUniversalMachO
PlatformRemoteiOS
PlatformMacOSX
OperatingSystemGo
2016-01-04 01:16:32 +00:00
Dimitry Andric
8c49098554 Merge ^/head r292951 through r293015. 2015-12-31 22:55:02 +00:00
Dimitry Andric
89d224ab48 Merge r293013 from clang380-import branch:
Fix a clang 3.8.0 warning in pflogd.c:

contrib/pf/pflogd/pflogd.c:769:8: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
			if (!if_exists(interface) == -1) {
			    ^                     ~~

The if_exists() function does not return -1, and even if it did, it
would not be the correct way to check.  Just ditch the == -1 instead.

Obtained from:	OpenBSD's pflogd.c 1.49
MFC after:	3 days
2015-12-31 22:52:11 +00:00
Dimitry Andric
f7862a87d0 Fix a clang 3.8.0 warning in pflogd.c:
contrib/pf/pflogd/pflogd.c:769:8: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
                        if (!if_exists(interface) == -1) {
                            ^                     ~~

The if_exists() function does not return -1, and even if it did, it
would not be the correct way to check.  Just ditch the == -1 instead.

Obtained from:	OpenBSD's pflogd.c 1.49
MFC after:	3 days
2015-12-31 22:45:00 +00:00
Ian Lepore
dfd3a89ff0 Add the MOVT/MOVW types to the list of relocs which do not generate .plt
entries.  This fixes the segfaults in arm userland code compiled with
-march= or -mcpu= values that allow the compiler to generate movw/movt
sequences to load 32-bit constants.
2015-12-30 23:04:08 +00:00
Dimitry Andric
a27deaebb2 Drop the clang patch which added a custom vendor suffix to the version
printed with -v.  We have historically put a date stamp there (roughly
corresponding to the date of import), but this has never been used for
anything, and the patch has also never been upstreamed, so let's get rid
of it now.
2015-12-30 16:42:09 +00:00
Dimitry Andric
6a0fcfa92a Merge ^/head r292936 through r292950. 2015-12-30 16:20:24 +00:00
Dimitry Andric
28db8b1226 Drop the clang patch which adds recognition of 'CC' suffixes as aliases
for --driver-mode=g++, since this was never upstreamed.  For backwards
compatibility, add a wrapper shell script.

MFC after:	1 week
2015-12-30 16:14:30 +00:00
Dimitry Andric
9e2dc66723 Using trunk for now, instead of 3.7.1. 2015-12-30 14:06:01 +00:00
Dimitry Andric
b9695a57f6 Drop patches which are certain to be obsolete now. 2015-12-30 14:05:33 +00:00
Dimitry Andric
0623d7483d Update clang to trunk r256633. 2015-12-30 13:34:49 +00:00
Dimitry Andric
7d523365ff Update llvm to trunk r256633. 2015-12-30 13:13:10 +00:00
Ian Lepore
5dbfbb1512 Correct the code for sign-extending a 16 bit value. As near as I can tell
this is effectively a no-op -- the addend term in MOVT/MOVW relocations
always seems to be zero.  But this is correct and the old code wasn't.
2015-12-29 15:23:03 +00:00
Enji Cooper
8cd5a258fb Staticize several variables that are used exclusively in bsnmpd/main.c and
bsnmpd/trap.c

This fixes several -Wmissing-variable-declaration warnings noted by clang

Differential Revision: https://reviews.freebsd.org/D4718
MFC after: 1 week
Reported by: Jenkins
Reviewed by: araujo
Sponsored by: EMC / Isilon Storage Division
2015-12-28 01:51:20 +00:00
Dimitry Andric
9a4b31181f Upgrade our copies of clang and llvm to 3.7.1 release. This is a
bugfix-only release, with no new features.

Please note that from 3.5.0 onwards, clang and llvm require C++11
support to build; see UPDATING for more information.
2015-12-25 21:39:45 +00:00
Simon J. Gerraty
6e05054094 Merge bmake-20151220
Fixed clearing suffixes impact on null suffix
2015-12-25 16:19:21 +00:00
Enji Cooper
30dfa264d0 Remove unused function act_getkernstring
This fixes a clang -Wunused warning

Differential Revision: https://reviews.freebsd.org/D4697
MFC after: 1 week
Reported by: Jenkins
Reviewed by: araujo, bapt
Sponsored by: EMC / Isilon Storage Division
2015-12-24 22:22:02 +00:00
Baptiste Daroussin
d8eb75b418 backtrace.3: Fix prototype of backtrace_symbols_fd_fmt().
While here, fix a typo

Submitted by:	Sascha Wildner <saw@online.de>
Obtained from:	DragonflyBSD
2015-12-22 22:40:42 +00:00
Andreas Tobler
77a561088f Silence a boring warning. 2015-12-22 21:26:50 +00:00
Andrew Turner
b1eb23b26b Don't adjust the program counter to an invalid address after reaching a
breakpoint. The value doesn't need to be adjusted as it is already
correctly returned from the kernel.

This allows lldb to set breakpoints, and stop on them, however more work
is needed, for example single stepping fails to stop.

Discussed with:	emaste
2015-12-22 17:18:40 +00:00
Enji Cooper
1115e598dd Use stable output to a test file instead of depending on the OS name being
grep'able in /bin/sh

This fixes the situation where the OS has been rebranded to something other
than `FreeBSD`

MFC after: 1 week
Obtained from: Isilon OneFS (^/onefs/head@r511419)
Reviewed by: cem, Daniel O'Connor <darius@dons.net.au>
Sponsored by: EMC / Isilon Storage Division
2015-12-22 01:21:27 +00:00
Enji Cooper
8eb42fb2a8 Don't dump core files with lib/libc/ssp/ssp_test and lib/libc/gen/assert_test
The default `sysctl kern.corefile` value is compatible with `kyua test` (FreeBSD
will dump to the current directory). If it's set to an absolute path however,
`kyua test` will not be able to clean up the corefiles after the fact

The corefiles have little value when testing the behavior of feature behavior,
so just disable corefile generation

MFC after: 1 week
Obtained from: Isilon OneFS (^/onefs/head@r511419)
Sponsored by: EMC / Isilon Storage Division
2015-12-22 00:43:22 +00:00
Ian Lepore
69ba629255 Avoid unaligned memory accesses when encoding netbios names in libsmb.
The current code for encoding a netbios name converts each byte to a 16-bit
value and stores the result by casting a char* to u_short*, resulting in
alignment faults on strict-alignment platforms.

This change reimplements the encoding routine using only byte accesses to
memory. There is no particular reason to work with 16-bit values just
because the encoding process creates two bytes of output for every byte of
input. Working a byte at at time also avoids endian problems for big-endian
platforms.

PR:		180438
PR:		189415
Differential Revision:	https://reviews.freebsd.org/D4622
2015-12-21 17:17:00 +00:00
Christian Brueffer
2d95d1393a Regenerate config.h for OpenBSM 1.2 alpha 4.
MFC after:	2 weeks
2015-12-18 09:49:11 +00:00
Christian Brueffer
b6a05070fa Merge OpenBSM 1.2 alpha 4.
MFC after:	2 weeks
Relnotes:	yes
2015-12-18 09:48:01 +00:00
Ed Maste
ef3c018198 lldb(1): Document core file option -c / -core 2015-12-16 03:59:54 +00:00
Christian Brueffer
290bb03c0c Assorted grammar, spelling and punctuation fixes.
PR:		203336, 203339
Submitted by:	espeyb@rpi.edu, themesta@gmail.com
MFC after:	1 week
2015-12-15 13:04:44 +00:00
Christian Brueffer
46b9aa2766 Add entry for lib80211; fix a typo in libsysdecode. 2015-12-15 10:26:47 +00:00
John Baldwin
d6fb489498 Start on a new library (libsysdecode) that provides routines for decoding
system call information such as system call arguments.  Initially this
will consist of pulling duplicated code out of truss and kdump though it
may prove useful for other utilities in the future.

This commit moves the shared utrace(2) record parser out of kdump into
the library and updates kdump and truss to use it.  One difference from
the previous version is that the library version treats unknown events
that start with the "RTLD" signature as unknown events.  This simplifies
the interface and allows the consumer to decide how to handle all
non-recognized events.  Instead, this function only generates a string
description for known malloc() and RTLD records.

Reviewed by:	bdrewery
Differential Revision:	https://reviews.freebsd.org/D4537
2015-12-15 00:05:07 +00:00
Dag-Erling Smørgrav
05ab290102 Upgrade to Unbound 1.5.7. 2015-12-14 13:01:51 +00:00
Kai Wang
8f32e46db7 Fixed uninitialized variable warnings. 2015-12-13 08:27:14 +00:00
Dag-Erling Smørgrav
c0096f20d0 Ask make(1) which compiler to use rather than rely on whatever is in $PATH. 2015-12-12 22:54:12 +00:00
Dag-Erling Smørgrav
a7af7146c9 import unbound 1.5.7 2015-12-12 22:18:57 +00:00
Ed Maste
95fd7f2615 Update to ELF Tool Chain r3272
Highlights (not already in the FreeBSD tree):
 - addr2line: Speed up and support searching inlined functions
 - addr2line: Support -i, -a, -p options
 - readelf: Add some ARM relocation types
 - readelf, libelf: Avoid reading beyond end of buffer/file

Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2015-12-11 20:28:27 +00:00
Ed Maste
1ce1c68952 elfcopy: include extension but replace . when converting from binary
The change in r291958 was not consistent with GNU objcopy. The start,
end and size symbols created for ELF objects converted from binary need
to include the full filename including the extension, but with the
periods replaced with underscores.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D4474
2015-12-11 18:47:41 +00:00
Kurt Lidl
db792209dd Fixup include protections for building on mips64 with clang
Reviewed by:	sbruno, imp
Approved by:	rpaulo (mentor)
Differential Revision:	https://reviews.freebsd.org/D4457
2015-12-11 15:12:01 +00:00
Bryan Drewery
de1f9ee234 Convert contrib/ofed libraries to LIBADD.
Sponsored by:	EMC / Isilon Storage Division
2015-12-10 00:07:11 +00:00
Simon J. Gerraty
ac3446e962 Merge bmake-20151201 2015-12-08 01:29:07 +00:00
Ed Maste
fc7284da06 elfcopy: exclude extension when converting from binary
When converting from binary to ELF, elfcopy creates symbols
_binary_<filename>_start_, _binary_<filename>_end, and
_binary_<filename>_size. For compatibility with GNU objcopy (and to
produce sensible symbol names) the extension must be stripped off.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D4238
2015-12-07 20:21:12 +00:00
Dimitry Andric
df5b54dee1 Add clang patch corresponding to r291701. 2015-12-04 17:23:19 +00:00
Bryan Drewery
eacae6dc66 Fix LDADD/DPADD that should be LIBADD.
Sponsored by:	EMC / Isilon Storage Division
2015-12-04 03:17:47 +00:00
Dimitry Andric
bde2a921d4 In assembler mode, clang defaulted to DWARF3, if only -g was specified.
Change this to DWARF2, in the simplest way possible.  (Upstream, this
was fixed in clang trunk r250173, but this was done along with a lot of
shuffling around of debug option handling, so it cannot be applied
as-is.)

Noticed by:	des
MFC after:	3 days
2015-12-03 15:41:10 +00:00
Ed Maste
895f86f15f readelf: add Xen ELF notes
Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D4356
2015-12-03 12:21:18 +00:00
Craig Rodrigues
26144b6164 Hack test so that it works on FreeBSD. 2015-12-01 21:22:29 +00:00
Adrian Chadd
ce276fe26d [wpa] use IFM_IEEE80211_ADHOC for now on FreeBSD for IBSS operation.
PR:		bin/203086
Submitted by:	avos
2015-11-26 17:28:40 +00:00
Adrian Chadd
7424f50fa8 [wpa] bring up interface in ap_mode=2
This is required for WPA-NONE operation.

PR:		bin/203086
Submitted by:	avos@
2015-11-26 17:26:28 +00:00
Adrian Chadd
e1f2d1f39f [wpa] handle IBSS mediatype.
same as the previous commit to ifconfig - handle a mediatype of IBSS
without failing/complaining.

Internally inside wpa_s things treat IBSS/ADHOC as equivalent.
2015-11-26 02:00:37 +00:00
Simon J. Gerraty
fe90c77aae ParseTrackInput: do not access beyond end of buffer.
Reviewed by:	dim
2015-11-26 00:26:23 +00:00
Bryan Drewery
6a270e17f3 Remove unneeded libutil dependency for sendmail.
It included libutil.h for setproctitle(3), which was moved from libutil to libc
in r65353 in 2000.

Reviewed by:	gshapiro [sendmail change]
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D4261
2015-11-24 04:19:55 +00:00
Xin LI
fe50a38eb0 MFV r291123:
xz 5.2.2.

MFC after:	1 month
Relnotes:	yes
2015-11-21 09:09:25 +00:00
Enji Cooper
392acbdc05 Port contrib/netbsd-tests/kernel/t_mqueue.c to FreeBSD
- Add missing headers
- Ensure mqueuefs is loaded
- Make sure the mqueuefs path is absolute and relative to /
- Cast the result of mq_open returning -1 to (mqd_t) to mute a compiler
  warning

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-16 05:28:14 +00:00
Enji Cooper
b14427e250 Ignore EINTR from usleep(3) in try_locks(..)
NetBSD's usleep(3) only returns -1/sets errno=EINVAL when `microseconds`
is one million or more

MFC after: 3 days
Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
2015-11-16 04:53:13 +00:00
Enji Cooper
38cad2971d Expect all testcases dealing with invalid salts to fail on FreeBSD
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-16 04:04:05 +00:00
Enji Cooper
c519c0a10c Redo r290847: use #ifdef __NetBSD__ on all the non-public APIs to
mute -Wunused-but-set-variable warnings with gcc dealing with the
function calls

X-MFC with: r290847
MFC after: 1 week
Reported by: gcc
Sponsored by: EMC / Isilon Storage Division
2015-11-15 18:49:31 +00:00
Baptiste Daroussin
bb1f0779b0 also skip the definition of ':fopen_regular' to avoid the build to fail due to
unused variables defined by ATF macros
2015-11-15 11:18:37 +00:00
Enji Cooper
2830819497 Cast xdr_void to xdrproc_t to mute -Wincompatible-pointer-types warnings from
clang

This pattern is used in other areas of lib/libc/rpc

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-15 05:19:41 +00:00
Enji Cooper
c2546a2196 Fix -Wunused warnings with variables used unlit code by adding appropriate #ifdef
guards around the variables

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2015-11-15 05:00:32 +00:00
Edwin Groothuis
2d9bf4ce5c MFV of 290695,tzdata2015g
Update to tzdata2015g:

Turkey's 2015 fall-back transition is scheduled for Nov. 8, not Oct. 25.

Norfolk moves from +1130 to +1100 on 2015-10-04 at 02:00 local time.

Fiji's 2016 fall-back transition is scheduled for January 17, not 24.

Fort Nelson, British Columbia will not fall back on 2015-11-01.  It has
effectively been on MST (-0700) since it advanced its clocks on 2015-03-08.
New zone America/Fort_Nelson.
2015-11-12 03:25:04 +00:00
Baptiste Daroussin
3e4f384ed2 Merge from head r290483 2015-11-07 11:02:33 +00:00
Hajimu UMEMOTO
3960a27659 The field modifier for trimming whitespace
is not `q' but `t'.
2015-11-06 14:29:25 +00:00
Baptiste Daroussin
458b591fb0 Fix typo in the function name
Submitted by:	Sascha Wildner <saw@online.de>
Obtained from:	DragonflyBSD
2015-11-05 07:43:15 +00:00
Baptiste Daroussin
eb5cdd012d Push the FreeBSD changes under a specific #ifdef to easier tracking what needs
to be upstreamed.
2015-11-02 23:09:21 +00:00
Baptiste Daroussin
9ff4faf083 Fix regression test on multibytes
0x07FF and 0x0800 are valid multibyte characters:
'DOUBLE QUESTION MARK' and 'QUESTION EXCLAMATION MARK'
2015-11-02 07:59:17 +00:00
Zbigniew Bodek
f62dbbae61 Workaround KGDB issues on ARM by ignoring ARM EABI version higher than 5
To make KGDB working, it needs to understand kernel ELF image.
By default it is compiled using EABI_5, which is not supported
on the gdb-6. As a workaround, treat these images as EABI_2 because
they share a lot of things in common.

This workaround does not guarantee ALL funtionalities
to work.

Submitted by:  Wojciech Macek <wma@semihalf.com>
Reviewed by:   jhb
Obtained from: Semihalf
Sponsored by:  Juniper Networks Inc.
Differential Revision: https://reviews.freebsd.org/D4012
2015-10-30 12:21:37 +00:00
Enji Cooper
59c83c1cde Fix a set but not used variable warning flagged by gcc 4.9 with
lib/libc/ssp/h_readlink

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2015-10-30 08:01:53 +00:00
Baptiste Daroussin
39ee7a7a6b Update libucl to latest git snapshot (20151027) 2015-10-27 21:24:09 +00:00
Jason Evans
ba4f5cc0a6 Update jemalloc to version 4.0.4. 2015-10-24 23:18:05 +00:00
Simon J. Gerraty
4c620fe5c4 Merge bmake 20151020 2015-10-23 17:38:01 +00:00
Ed Maste
1638c73018 lldb: Add arm64 FreeBSD ProcessMonitor register context
This is an adaptation of upstream LLDB commit r251088.

Sponsored by:	The FreeBSD Foundation
2015-10-23 17:30:41 +00:00
Gleb Smirnoff
9034852c84 MFV ntp-4.2.8p4 (r289715)
Security:       VuXML: c4a18a12-77fc-11e5-a687-206a8a720317
Security:	CVE-2015-7871
Security:	CVE-2015-7855
Security:	CVE-2015-7854
Security:	CVE-2015-7853
Security:	CVE-2015-7852
Security:	CVE-2015-7851
Security:	CVE-2015-7850
Security:	CVE-2015-7849
Security:	CVE-2015-7848
Security:	CVE-2015-7701
Security:	CVE-2015-7703
Security:	CVE-2015-7704, CVE-2015-7705
Security:	CVE-2015-7691, CVE-2015-7692, CVE-2015-7702
Security:	http://support.ntp.org/bin/view/Main/SecurityNotice#October_2015_NTP_Security_Vulner
Sponsored by:	Nginx, Inc.
2015-10-22 19:42:57 +00:00
Bryan Drewery
cf07362e21 Remove more disconnected libgpib items missed in r276214.
Sponsored by:	EMC / Isilon Storage Division
2015-10-22 03:51:25 +00:00
Rui Paulo
325151a32e Update hostapd/wpa_supplicant to version 2.5.
Tested by several people on current@/wireless@.

Relnotes:	yes
2015-10-18 21:38:25 +00:00
Dimitry Andric
f80158072d Add clang patch corresponding to r289523. 2015-10-18 17:14:45 +00:00
Dimitry Andric
67291bbdf6 Pull in r248379 from upstream clang trunk (by Jörg Sonnenberger):
Refactor library decision for -fopenmp support from Darwin into a
  function for sharing with other platforms.

Pull in r248424 from upstream clang trunk (by Jörg Sonnenberger):

  Push OpenMP linker flags after linker input on Darwin. Don't add any
  libraries if -nostdlib is specified. Test.

Pull in r248426 from upstream clang trunk (by Jörg Sonnenberger):

  Support linking against OpenMP runtime on NetBSD.

Pull in r250657 from upstream clang trunk (by Dimitry Andric):

  Support linking against OpenMP runtime on FreeBSD.
2015-10-18 17:13:41 +00:00
Enji Cooper
36ace8a0d3 Integrate contrib/netbsd-tests/bin/dd into the FreeBSD test suite as
bin/dd/tests

Ensure fdescfs is mounted on /dev/fd/ for the length testcase as it's used
in validating the characters read from /dev/zero

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-10-18 05:49:58 +00:00
Glen Barber
324fd1ce05 MFH to r289370
Sponsored by:	The FreeBSD Foundation
2015-10-15 17:36:56 +00:00
Dag-Erling Smørgrav
8fd566ab3e Apply r3505 (s/SIGQUIT/SIGTERM/ in man page)
PR:		203580
2015-10-14 18:08:38 +00:00
Dimitry Andric
4409569894 Add llvm patch corresponding to r289221. 2015-10-13 16:25:02 +00:00
Dimitry Andric
645bd50341 Pull in r250085 from upstream llvm trunk (by Andrea Di Biagio):
[x86] Fix wrong lowering of vsetcc nodes (PR25080).

  Function LowerVSETCC (in X86ISelLowering.cpp) worked under the wrong
  assumption that for non-AVX512 targets, the source type and destination type
  of a type-legalized setcc node were always the same type.

  This assumption was unfortunately incorrect; the type legalizer is not always
  able to promote the return type of a setcc to the same type as the first
  operand of a setcc.

  In the case of a vsetcc node, the legalizer firstly checks if the first input
  operand has a legal type. If so, then it promotes the return type of the vsetcc
  to that same type. Otherwise, the return type is promoted to the 'next legal
  type', which, for vectors of MVT::i1 is always a 128-bit integer vector type.

  Example (-mattr=+avx):

    %0 = trunc <8 x i32> %a to <8 x i23>
    %1 = icmp eq <8 x i23> %0, zeroinitializer

  The initial selection dag for the code above is:

  v8i1 = setcc t5, t7, seteq:ch
    t5: v8i23 = truncate t2
      t2: v8i32,ch = CopyFromReg t0, Register:v8i32 %vreg1
      t7: v8i32 = build_vector of all zeroes.

  The type legalizer would firstly check if 't5' has a legal type. If so, then it
  would reuse that same type to promote the return type of the setcc node.
  Unfortunately 't5' is of illegal type v8i23, and therefore it cannot be used to
  promote the return type of the setcc node. Consequently, the setcc return type
  is promoted to v8i16. Later on, 't5' is promoted to v8i32 thus leading to the
  following dag node:
    v8i16 = setcc t32, t25, seteq:ch

    where t32 and t25 are now values of type v8i32.

  Before this patch, function LowerVSETCC would have wrongly expanded the setcc
  to a single X86ISD::PCMPEQ. Surprisingly, ISel was still able to match an
  instruction. In our case, ISel would have matched a VPCMPEQWrr:
    t37: v8i16 = X86ISD::VPCMPEQWrr t36, t25

  However, t36 and t25 are both VR256, while the result type is instead of class
  VR128. This inconsistency ended up causing the insertion of COPY instructions
  like this:
    %vreg7<def> = COPY %vreg3; VR128:%vreg7 VR256:%vreg3

  Which is an invalid full copy (not a sub register copy).
  Eventually, the backend would have hit an UNREACHABLE "Cannot emit physreg copy
  instruction" in the attempt to expand the malformed pseudo COPY instructions.

  This patch fixes the problem adding the missing logic in LowerVSETCC to handle
  the corner case of a setcc with 128-bit return type and 256-bit operand type.

  This problem was originally reported by Dimitry as PR25080. It has been latent
  for a very long time. I have added the minimal reproducible from that bugzilla
  as test setcc-lowering.ll.

  Differential Revision: http://reviews.llvm.org/D13660

This should fix the "Cannot emit physreg copy instruction" errors when
compiling contrib/wpa/src/common/ieee802_11_common.c, and CPUTYPE is set
to a CPU supporting AVX (e.g. sandybridge, ivybridge).
2015-10-13 16:24:22 +00:00
Ed Maste
b54cfe0ae9 Add missing commas
Pointy hat to:	kan
Obtained from:	ELF Tool Chain r3253
2015-10-12 15:35:34 +00:00
Peter Wemm
af80ed6add Update from svn-1.8.14 to 1.9.2.
Formal release notes are available:
  https://subversion.apache.org/docs/release-notes/1.9.html

Of particular note, the client checkout format has *not* changed so
upgrades should *not* be required.

When reading a repository (file:// or running as a local server), an
improved fsfs version 7 is available with significant performance
improvements.  An optional upgrade is possible to use the new features.
Without the upgrade, this is fully read/write compatible with the
version 6 fsfs as in svn-1.8.

Relnotes:	yes
2015-10-12 09:53:55 +00:00
Pedro F. Giffuni
5668d203ed Revert r289150:
Correct handling of enum attributes with g++

It is causing issues on some platforms.

Reported by:	sbruno (through adrian)
2015-10-12 02:05:25 +00:00
Pedro F. Giffuni
e277c15f54 Correct handling of enum attributes with g++
From OpenBSD's commit log:

This was responsible for memory corruption with recent versions
of Mesa where c and c++ code share a header with a packed enum type.

Reference:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39219

Obtained from:	OpenBSD (CVS rev. 1.2)
MFC after:	1 week
2015-10-11 19:58:57 +00:00
Baptiste Daroussin
eaccd9b323 Fix build with gcc 4.2 2015-10-11 17:45:20 +00:00
Baptiste Daroussin
e56bad4a94 Update Dragonfly Mail Agent to v0.10 2015-10-10 23:31:47 +00:00
Baptiste Daroussin
9be27fdc00 Merge from head 2015-10-09 22:45:54 +00:00
Dimitry Andric
fe9390e7a1 Pull in r242623 from upstream libc++ trunk (by Eric Fiselier):
Enable and fix warnings during the build.

  Although CMake adds warning flags, they are ignored in the libc++ headers
  because the headers '#pragma system header' themselves.

  This patch disables the system header pragma when building libc++ and fixes
  the warnings that arose.

  The warnings fixed were:
  1. <memory> - anonymous structs are a GNU extension
  2. <functional> - anonymous structs are a GNU extension.
  3. <__hash_table> - Embedded preprocessor directives have undefined behavior.
  4. <string> - Definition is missing noexcept from declaration.
  5. <__std_stream> - Unused variable.

This should fix building world (in particular libatf-c++) with -std=c++11.

Reported by:	Oliver Hartmann <ohartman@zedat.fu-berlin.de>
2015-10-09 21:04:28 +00:00
Dimitry Andric
1286cb8390 Add llvm patch corresponding to r289072. 2015-10-09 21:00:04 +00:00
Alexander Kabaev
da1cc412c2 Add definitions for MIPS TLS relocations to elftoolchain.
This makes our readelf more useful when looking for TLS-related
issues.
2015-10-09 18:39:55 +00:00
Ed Maste
7a2e729ba2 addr2line: initialize die to NULL
GCC on MIPS produced a 'may be used uninitialized' warning after
r289071.

Reported by:	sbruno
Pointy hat to:	emaste
2015-10-09 18:26:24 +00:00
Dimitry Andric
76ebbd8fae Remove empty line again from libc++'s iostream.cpp. This was used to
force updates to this file, so it will be rebuilt by the fixed clang
from r289072.
2015-10-09 18:23:10 +00:00
Dimitry Andric
d361766d4b Temporarily revert upstream llvm trunk r240144 (by Michael Zolotukhin):
[SLP] Vectorize for all-constant entries.

This should fix libc++'s iostream initialization SIGBUSing on amd64,
whenever the global cout symbol is not aligned to 16 bytes.

Some further explanation: libc++'s iostream.cpp contains the definitions
of std::cout, std::cerr and so on.  These global objects are effectively
declared with an alignment of 8 bytes.  When an executable is linked
against libc++.so, it can sometimes get a copy of the global object,
which is then at the same alignment.

However, with clang 3.7.0, the initialization of these global objects
will incorrectly use SSE instructions (e.g. movdqa), whenever the
optimization level is high enough, and SSE is enabled, such as on amd64.
When any of these objects is not aligned to 16 bytes, this will result
in a SIGBUS during iostream initialization.  In contrast, clang 3.6.x
and earlier took the 8 byte alignment into consideration, and avoided
SSE for those particular operations.

After bisecting of upstream changes, I found that the above revision
caused the change of this behavior, so I am reverting it now as a
workaround, while a discussion and test case is being prepared for
upstream.
2015-10-09 18:21:45 +00:00
Ed Maste
656f49f8e2 Update to ELF Tool Chain r3250
Highlights (not already in the FreeBSD tree):
  - addr2line: Fixed multiple memory leaks related to DIE allocation
  - readelf: improve sh_link validation
  - various man page improvements

Sponsored by:	The FreeBSD Foundation
2015-10-09 17:46:05 +00:00
Dag-Erling Smørgrav
b75612f8e7 Upgrade to Unbound 1.5.5. 2015-10-09 11:46:27 +00:00
Craig Rodrigues
49ebf9da54 Merge:
commit 400ecf36bb0b73f6390f9641e6cb8bbfb91a5cfd
   Author: Paul Eggert <eggert@cs.ucla.edu>
   Date:   Fri Oct 12 07:53:12 2012 -0700

   Assume C89.

400ecf36bb
2015-10-08 11:42:15 +00:00
Dimitry Andric
bb52ed3249 Add std::uncaught_exceptions() to libcxxrt (C++17, see N4152 and N4259).
This has also been submitted upstream.
2015-10-05 17:47:23 +00:00
Baptiste Daroussin
6875f8e707 Remerge as previous one was broken 2015-10-03 07:22:07 +00:00
Dimitry Andric
65dcb5bcb1 Merge ^/head r288197 through r288456. 2015-10-01 19:02:45 +00:00
Andrew Turner
b5c035f21c Pass 8 arguments to makecontext on arm64 as this is all we support.
Obtained from:	EuroBSDCon Devsummit
Sponsored by:	ABT Systems Ltd
2015-10-01 09:53:12 +00:00
Baptiste Daroussin
5a2b666ce5 Merge from head 2015-10-01 09:36:43 +00:00
Konstantin Belousov
96cdb0ab9d Annotate arm userspace assembler sources stating their tolerance to
the non-executable stack.

Reviewed by:	andrew
Sponsored by:	The FreeBSD Foundation
2015-09-29 16:09:58 +00:00
Xin LI
100e2a06e2 MFV r288243: nc from OpenBSD 5.8. 2015-09-27 07:04:16 +00:00
Conrad Meyer
76ad56672b MFV c3ccd112: Correct off-by-ones in free_exception of emergency buffer
Note, this has been broken since import in r227825.

PR:		https://github.com/pathscale/libcxxrt/issues/29
Reviewed by:	emaste (earlier version), kan (informally)
Obtained from:	Anton Rang
Relnotes:	yes
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D3733
2015-09-25 22:29:21 +00:00
Dimitry Andric
ba96f361ba Add llvm patch corresponding to r288195. 2015-09-25 18:21:48 +00:00
Dimitry Andric
98e67009c0 Merge ^/head r288126 through r288196. 2015-09-24 21:48:04 +00:00
Dimitry Andric
a502cd2f72 Pull in r248439 from upstream llvm trunk (by Sanjay Patel):
set div/rem default values to 'expensive' in TargetTransformInfo's
  cost model

  ...because that's what the cost model was intended to do.

  As discussed in D12882, this fix has a temporary unintended
  consequence for SimplifyCFG: it causes us to not speculate an fdiv.
  However, two wrongs make PR24818 right, and two wrongs make PR24343
  act right even though it's really still wrong.

  I intend to correct SimplifyCFG and add to CodeGenPrepare to account
  for this cost model change and preserve the righteousness for the bug
  report cases.

  https://llvm.org/bugs/show_bug.cgi?id=24818
  https://llvm.org/bugs/show_bug.cgi?id=24343

  Differential Revision: http://reviews.llvm.org/D12882

This fixes the too-eager fdiv hoisting in pow(), which could lead to
unexpected floating point exceptions.
2015-09-24 21:20:00 +00:00
Ed Maste
453b09caf5 Rename ELFOSABI_SYSV to ELFOSABI_NONE to match current spec
Source: http://www.sco.com/developers/gabi/latest/ch4.eheader.html

Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3731
2015-09-24 21:04:48 +00:00
Ed Maste
473c31f158 readelf: Correct typo HPUS -> HPUX
Submitted by:	kib
2015-09-24 18:53:20 +00:00
Ed Maste
8c034f6af7 Bring LLVM libunwind snapshot into contrib/llvm/projects 2015-09-23 19:30:46 +00:00
Xin LI
9ce06829f2 MFV r288140: update file to 5.25.
MFC after:	1 month
2015-09-23 05:39:20 +00:00
Dimitry Andric
8c4d4936be Partially revert r288121, removing the workaround for arm < v6. Since
r288125, the required atomic library calls are available in compiler-rt.

The added stub for __libcpp_relaxed_store() can stay as a fallback; I
have also committed it upstream.
2015-09-22 20:48:12 +00:00
Dimitry Andric
977b468e25 Add clang patch corresponding to r288127. 2015-09-22 20:42:14 +00:00
Dimitry Andric
f3d77c91e9 Pull in r244063 from upstream clang trunk (by James Y Knight):
Add missing atomic libcall support.

  Support for emitting libcalls for __atomic_fetch_nand and
  __atomic_{add,sub,and,or,xor,nand}_fetch was missing; add it, and some
  test cases.

  Differential Revision: http://reviews.llvm.org/D10847

This fixes "cannot compile this atomic library call yet" errors when
compiling code which calls the above builtins, on arm < v6.
2015-09-22 20:39:59 +00:00
Dimitry Andric
727dbcacec Merge ^/head r288100 through r288125. 2015-09-22 20:32:49 +00:00
Dimitry Andric
bedee6b9f0 Work around clang emitting libcalls to __atomic_add_fetch() and friends
in libc++, on __ARM_ARCH < 6.  Additionally, supply the missing stub
__libcpp_relaxed_store(), as proposed in http://reviews.llvm.org/D13051

NOTE: this needs to be fixed properly later on, by supplying library
functions implementing atomic operations for arm < v6.  We should
probably take those from sys/arm/arm/stdatomic.c, and stuff them into
either libgcc or compiler-rt.
2015-09-22 17:34:51 +00:00
Ed Maste
c9dbb1cc52 addr2line: skip CUs lacking debug info instead of bailing out
Some binaries (such as the FreeBSD kernel) contain a mixture of CUs
with and without debug information. Previously translate() exited upon
encountering a CU without debug information. Instead, just move on to
the next CU.

Reported by:	royger
Reviewed by:	royger
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3712
2015-09-22 16:51:40 +00:00
Dimitry Andric
883df6251d Revert merge of clang trunk r244063, which I did not intend to commit
yet.  Reminder to self: never merge to an unclean tree.
2015-09-22 10:00:32 +00:00
Dimitry Andric
26e065d02e Merge ^/head r288035 through r288099. 2015-09-22 09:50:11 +00:00
Dimitry Andric
54e1e8cb67 In binutils' arm-dis.c, avoid left-shifting a negative number.
Submitted by:	dan.mcgregor_usask.ca (Dan McGregor)
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D3376
2015-09-22 09:35:35 +00:00
Jason Evans
536b3538e0 Update jemalloc to 4.0.2. 2015-09-22 03:02:18 +00:00
Dimitry Andric
c394288fa5 The R600 target got renamed to AMDGPU, but I missed deleting the old
directory during the vendor import.  Delete it now.
2015-09-21 22:34:16 +00:00
Dimitry Andric
2dd978e891 Drop a patch which is already included in 3.7.0. 2015-09-21 22:29:43 +00:00
Dag-Erling Smørgrav
be70578239 Restore the upstream (and documented) behavior of searching for modules
both in /usr/lib and /usr/local/lib, thus simplifying the use of modules
from ports, without breaking the compat32 case again.

PR:		191151
MFC after:	3 weeks
2015-09-21 17:26:35 +00:00
Dimitry Andric
ae2d96ab3a Merge ^/head r287878 through r288034. 2015-09-20 20:34:17 +00:00
Dag-Erling Smørgrav
e4c53d3bf0 When chrooted, we need to strip the chroot directory from the front of
included paths.  Don't forget to do it for globs as well.
2015-09-17 16:19:36 +00:00
Dag-Erling Smørgrav
09a3aaf3e0 Upgrade to Unbound 1.5.4. 2015-09-17 16:10:11 +00:00
Dag-Erling Smørgrav
af3dabbf15 import unbound 1.5.4 2015-09-17 15:21:27 +00:00
Dimitry Andric
854fa44b6f Update libc++ to 3.7.0 release. 2015-09-16 22:26:52 +00:00
Baptiste Daroussin
f94594b37a Finish merging from head, messed up in previous attempt 2015-09-12 12:03:02 +00:00
Baptiste Daroussin
b5ff185e19 Merge from head 2015-09-12 11:41:31 +00:00
Dimitry Andric
8527908747 Update compiler-rt to 3.7.0 release. This also includes the sanitizer
and profile libraries.
2015-09-10 20:35:47 +00:00
Dimitry Andric
b6c25e0ef3 Update llvm, clang and lldb to 3.7.0 release. 2015-09-06 19:58:48 +00:00
Dimitry Andric
b91a7dfcc6 Update lldb to upstream trunk r242221. 2015-09-06 15:21:47 +00:00
Dimitry Andric
1757ba14bf Merge ^/head r287490 through r287501. 2015-09-06 12:02:28 +00:00
Dimitry Andric
7ff2ee1244 Update lldb's FREEBSD-Xlist to match reality. 2015-09-06 11:48:50 +00:00
Dimitry Andric
d9442b10a2 Merge ^/head r286858 through r287489. 2015-09-05 18:36:23 +00:00
Xin LI
072d210fa1 Fix build. 2015-09-04 08:04:12 +00:00
Xin LI
9fc5c47fa5 MFV r287451 + 287452: file 5.24 + fix for bin/181436.
PR:		181436
MFC after:	2 weeks
2015-09-04 05:56:14 +00:00
Konstantin Belousov
3cc31a047e Fix t_spawnattr test for attributes handling by posix_spawn(3).
Connect it to the build.

The code assumed that SCHED_* constants form a contiguous set of
numbers, remove the assumption by using schedulers[] array in
get_different_scheduler().  This is no-op on FreeBSD, but improves
code portability.

The selection of different priority used the min/max priority range of
the current scheduler class, instead of the priority to be changed to.
The bug caused the test failure.

Remove duplication of POSIX_SPAWN_SETSIGDEF flag and now unused
duplications of MIN/MAX definitions.

Reviewed by:	jilles, pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D3533
2015-09-01 12:47:11 +00:00
Alexander Kabaev
c247c492af Make ncurses build with GCC 5.0 and up
Merge the end result of two upstream changes:

Original fix from 20141206:
  + modify MKlib_gen.sh to work around change in development version of
    gcc introduced here:
            https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
            https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00236.html
    (reports by Marcus Shawcroft, Maohui Lei).

Later fixed in different manner in 20150725:
  + use alternate workaround for gcc 5.x feature (adapted from patch by
    Mikhail Peselnik).
2015-08-27 14:00:20 +00:00
Marcel Moolenaar
6743350af7 Fix build for architectures that define wchar_t as an unsigned int.
Reported by: bz@
2015-08-24 17:58:11 +00:00
Marcel Moolenaar
d1a0d267b7 Upgrade libxo to 0.4.5.
Local changes incorporated by 0.4.5: r284340
Local changes retained: r276260, r282117

Obtained from:	https://github.com/Juniper/libxo
2015-08-24 16:26:20 +00:00
Edward Tomasz Napierala
786e3c1bac Update svnlite(1) commit template. This makes it possible to set the
"freebsd-sponsored-by" and "freebsd-mfc-after" in ~/.subversion/config,
in the "[miscellany]" section - just like you already can with
devel/subversion port/package.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-08-23 15:20:49 +00:00
Xin LI
dd53226c13 MFV r287019: leapseconds from tzdata2015f.
MFC after:	2 weeks
2015-08-22 07:40:51 +00:00
Pedro F. Giffuni
6460ee789a Appease gcc-4.2
It needs to die, but it resists mipsteriously.

Submitted by:	Oliver Pinter
2015-08-20 21:49:59 +00:00
Ed Maste
57eba68124 compiler-rt: update __multc3 to upstream style and variable names
I introduced a local copy of __multc3 in r281221, which has now been
committed upstream to compiler-rt in revision 245296. Update our version
to match the changes made there.

Sponsored by:	The FreeBSD Foundation
2015-08-19 21:23:17 +00:00
Jason Evans
c13244b92e Fix minor malloc regressions.
- Use _Bool rather than bool to resolve missing type errors in malloc_np.h.
- Fix malloc manual page #include documentation.
- Add *allocm manual pages to obsolete files.

Submitted by:	jbeich
2015-08-19 00:06:46 +00:00
Jason Evans
337776f858 Define CPU_SPINWAIT as cpu_spinwait().
Submitted by:	cem
2015-08-18 20:42:08 +00:00
Xin LI
79b0153316 Fix multiple integer overflows in expat.
Security:	CVE-2015-1283
Security:	FreeBSD-SA-15:20.expat
2015-08-18 19:30:04 +00:00
Dimitry Andric
b10d76f080 Import r243925 from the upstream clang release_37 branch:
Reverting r239883 and r240720:
------------------------------------------------------------------------
r239883 | echristo | 2015-06-17 00:09:32 -0700 (Wed, 17 Jun 2015) | 16 lines

Update the intel intrinsic headers to use the target attribute support.

This involved removing the conditional inclusion and replacing them
with target attributes matching the original conditional inclusion
and checks. The testcase update removes the macro checks for each
file and replaces them with usage of the __target__ attribute, e.g.:

int __attribute__((__target__(("sse3")))) foo(int a) {
  _mm_mwait(0, 0);
  return 4;
}

This usage does require the enclosing function have the requisite
__target__ attribute for inlining and code generation - also for
any macro intrinsic uses in the enclosing function. There's no change
for existing uses of the intrinsic headers.
------------------------------------------------------------------------

------------------------------------------------------------------------
r240720 | silvas | 2015-06-25 16:22:11 -0700 (Thu, 25 Jun 2015) | 6 lines

Remove `requires` for x86 CPU features.

Ever since the target attributes change, we don't need to guard these
headers with `requires`. Actually it's a bit worse, because if we do
then they are included textually under the covers, causing declarations
to appear in submodules they aren't supposed to be in.
------------------------------------------------------------------------

This reverts the changes to the intrinsics headers in trunk, which could
result in some ports' configure scripts misdetecting SSE (and higher)
support.
2015-08-18 19:03:59 +00:00
Jason Evans
d8e39d2d4f Re-add LG_SIZEOF_PTR definition for __aarch64__.
This definition was erroneously removed during the 4.0.0 import.
2015-08-18 09:09:27 +00:00
Jason Evans
a4cee496bc Fix build failure due to missing CPU_SPINWAIT definition. 2015-08-18 08:10:46 +00:00
Jason Evans
8d13fecf5f Add jemalloc support for 8 KiB, 16 KiB, and 64 KiB pages. 2015-08-18 06:28:37 +00:00
Jason Evans
d0e79aa362 Update jemalloc to version 4.0.0. 2015-08-18 00:21:25 +00:00
Dimitry Andric
6fdf637e23 Merge ^/head r286697 through r286857. 2015-08-17 19:02:23 +00:00
Andrew Turner
6d16fc0687 Use __builtin_clzll to count the leading zero bits, the data is based on
long long so __builtin_clz will return an incorrect value.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D3375
2015-08-14 14:17:04 +00:00
Edwin Groothuis
6790a2583c MFV of 286748,tzdata2015f
Update to tzdata2015f:

Changes affecting future time stamps

    North Korea switches to +0830 on 2015-08-15.  (Thanks to Steffen Thorsen.)
    The abbreviation remains "KST".  (Thanks to Robert Elz.)
    Uruguay no longer observes DST.  (Thanks to Steffen Thorsen and Pablo Camargo.)
    Changes affecting past and future time stamps
    Moldova starts and ends DST at 00:00 UTC, not at 01:00 UTC. (Thanks to Roman Tudos.)
2015-08-13 23:57:44 +00:00
Dimitry Andric
9a2b4b3599 In gcc's libcpp, stop using the INTTYPE_MAXIMUM() macro, which relies on
undefined behavior.  The code used this macro to avoid problems on some
broken systems which define SSIZE_MAX incorrectly, but this is not
needed on FreeBSD, obviously.

MFC after: 3 days
2015-08-12 20:16:13 +00:00
Dimitry Andric
f98ee84465 Merge ^/head r286422 through r286684. 2015-08-12 18:39:49 +00:00
Dimitry Andric
875ed54817 Update llvm/clang to r242221. 2015-08-12 18:31:11 +00:00
Jilles Tjoelker
5e0069c64c Fix and re-enable UTF-8 tests. 2015-08-11 21:59:36 +00:00
Baptiste Daroussin
e4799c2c7a Reenable the test.
Sorry I was testing on the wrong branch.
2015-08-11 16:07:24 +00:00
Baptiste Daroussin
5ec9cb893b Disable broken test until we have time ti actually fix the test 2015-08-11 08:57:04 +00:00
Dimitry Andric
a0c1575d2f In GNU as, avoid left-shifting negative integers, which is undefined.
MFC after:	3 days
2015-08-09 11:06:40 +00:00
Peter Wemm
041541bdeb Update the private sqlite3 from 3.8.9 to 3.8.11.1 (used by svnlite and
kerberos)
2015-08-09 05:44:57 +00:00
Peter Wemm
19f868bc90 Update svnlite from 1.8.10 to 1.8.14. This is mostly for client-side bug
fixes and quality of life improvements.
While there are security issues in this time frame that affect usage as a
server (eg: linked into apache), this isn't possible here.
2015-08-09 05:22:53 +00:00
Peter Wemm
5efd787565 Update serf from 1.3.7 to 1.3.8. Mostly disables sslv2 and sslv3. 2015-08-09 05:16:14 +00:00
Peter Wemm
84a48fac94 Update apr-1.5.1 to 1.5.2 2015-08-09 05:14:25 +00:00
Dimitry Andric
1347814ced Merge ^/head r285924 through r286421. 2015-08-07 20:18:55 +00:00
Marcelo Araujo
fa77157916 Fix variable 'old' is used uninitialized whenever '&&' condition is false.
Spotted by clang.

Differential Revision:	D2721
Reviewed by:		rodrigc, bapt
2015-08-07 06:15:01 +00:00
Gregory Neil Shapiro
1caaaaf09e Reminder to check tools/build/mk/OptionalObsoleteFiles.inc on new
version imports.

Obtained from:	garga@
2015-08-07 04:58:35 +00:00
Ed Maste
d8000daa92 Add ELF Tool Chain's brandelf(1) to contrib
Noticed by pfg after r286070 (ar and elfdump)
2015-07-31 12:37:40 +00:00
Pedro F. Giffuni
bc38441579 GCC: Add a new option "-fstack-protector-strong"
This includes additional functions to be protected: those that
have local array definitions, or have references to local frame
addresses. This is a new option in GCC-4.9 that was relicensed
by Han Shen from Google under GPLv2 for OpenBSD.

Obtained from:	OpenBSD (2014-01-14)
MFC after:	2 weeks
2015-07-30 14:31:09 +00:00
Ed Maste
3fe401a500 Add ELF Tool Chain's ar(1) and elfdump(1) to contrib
ELF Tool Chain built on FreeBSD's ar and elfdump, but has a number of
improvements and enhancements. Bring them into contrib in order to start
integrating into our build.
2015-07-30 12:41:54 +00:00
Bryan Drewery
75f66cde5c MFV r285970:
Apply upstream changeset bf4f6ec64e:

  Fix issue 356: properly skip a sparse file entry in a tar file.

PR:		201506
MFC after:	3 days
Relnotes:	yes
2015-07-28 18:41:28 +00:00
Ed Maste
93d8f98ac7 Remove claim that the OS is Darwin from lldb(1)
Reported by:	bapt
2015-07-28 13:09:16 +00:00
Dimitry Andric
5f78ec1c9f Merge ^/head r285793 through r285923. 2015-07-27 22:20:28 +00:00
Ed Maste
71edbbfd5d readelf: avoid division by zero on section entry size
ELF Tool Chain tickets #439, #444, #445, #467
Reported by:	Alexander Cherepanov <cherepan@mccme.ru> (#467)
Reported by:	antiAgainst (others)

Reviewed by:	brooks
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2338
2015-07-24 18:00:53 +00:00
Ed Maste
119b75925c Add RISC-V ELF machine type definition
EM_RISCV is now officially registered as e_machine 243.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-07-24 16:52:21 +00:00
Dimitry Andric
8d0f10857a Merge ^/head r285341 through r285792. 2015-07-22 19:55:32 +00:00
Pedro F. Giffuni
99ec3637e9 sqlite: clean a couple of invocations of memcpy(3)
Found almost accidentally by our native gcc when enhanced with
FORTIFY_SOURCE.

Submitted by:	Oliver Pinter
Sponosored by:	Google Inc. GSoC 2015
2015-07-16 22:07:13 +00:00
Dimitry Andric
17b2cafee7 Merge ^/head r285284 through r285340. 2015-07-09 22:46:28 +00:00
Patrick Kelsey
358fd7dabb MFV r285292:
Merge upstream fix to eliminate build-breaking gcc warnings of no
importance.

commit: cab33b7a0acba7d2268a23c4383be6167106e549

Update ND_TTEST2 to fix issue 443

Add IS_NOT_NEGATIVE macro.
Avoid these warnings:
- comparison of unsigned expression >= 0 is always true [-Wtype-limits],
- comparison is always true due to limited range of data type [-Wtype-limits].

Reviewed by: adrian
Approved by: jmallett (mentor)
MFC after: 1 month
2015-07-08 23:57:58 +00:00
Dimitry Andric
635b2e1e5a Merge ^/head r285153 through r285283. 2015-07-08 18:43:55 +00:00
Patrick Kelsey
8bdc5a6251 MFV r285191: tcpdump 4.7.4.
Also, the changes made in r272451 and r272653 that were lost in the
merge of 4.6.2 (r276788) have been restored.

PR: 199568
Differential Revision: https://reviews.freebsd.org/D3007
Reviewed by: brooks, hiren
Approved by: jmallett (mentor)
MFC after: 1 month
2015-07-08 16:19:32 +00:00
Gregory Neil Shapiro
382cb225f1 Update for sendmail 8.15.2 import
MFC after:	3 days
2015-07-07 03:02:07 +00:00
Gregory Neil Shapiro
da7d7b9c86 Merge sendmail 8.15.2 to HEAD
MFC after:	3 days
2015-07-07 02:59:02 +00:00
Dimitry Andric
3dac3a9bad Update llvm/clang to r241361. 2015-07-05 22:34:42 +00:00
Cy Schubert
276da39af9 MFV ntp-4.2.8p3 (r284990).
Approved by:	roberto, delphij
Security:	VuXML: 0d0f3050-1f69-11e5-9ba9-d050996490d0
Security:	http://bugs.ntp.org/show_bug.cgi?id=2853
Security:	https://www.kb.cert.org/vuls/id/668167
Security:	http://support.ntp.org/bin/view/Main/SecurityNotice#June_2015_NTP_Security_Vulnerabi
2015-07-05 15:42:16 +00:00
Dimitry Andric
4cd9b24e47 Merge ^/head r284737 through r285152. 2015-07-04 21:50:39 +00:00
Dimitry Andric
b41932d54e Add llvm patch corresponding to r285149. 2015-07-04 20:09:24 +00:00
Dimitry Andric
5f4899dbfe Pull in r241142 from upstream llvm trunk (by David Majnemer):
[SCCP] Turn loads of null into undef instead of zero initialized values

  Surprisingly, this is a correctness issue: the mmx type exists for
  calling convention purposes, LLVM doesn't have a zero representation for
  them.

  This partially fixes PR23999.

Pull in r241143 from upstream llvm trunk (by David Majnemer):

  [LoopUnroll] Use undef for phis with no value live

  We would create a phi node with a zero initialized operand instead of
  undef in the case where no value was originally available.  This was
  problematic for x86_mmx which has no null value.

These fix a "Cannot create a null constant of that type!" error when
compiling the graphics/sdl2_gfx port with MMX enabled.

Reported by:	amdmi3
2015-07-04 20:07:37 +00:00
Ed Maste
1c3bbb013d Update LLDB snapshot to upstream r241361
Notable upstream commits (upstream revision in parens):

- Add a JSON producer to LLDB (228636)
- Don't crash on bad DWARF expression (228729)
- Add support of DWARFv3 DW_OP_form_tls_address (231342)
- Assembly profiler for MIPS64 (232619)
- Handle FreeBSD/arm64 core files (233273)
- Read/Write register for MIPS64 (233685)
- Rework LLDB system initialization (233758)
- SysV ABI for aarch64 (236098)
- MIPS software single stepping (236696)
- FreeBSD/arm live debugging support (237303)
- Assembly profiler for mips32 (237420)
- Parse function name from DWARF DW_AT_abstract_origin (238307)
- Improve LLDB prompt handling (238313)
- Add real time signals support to FreeBSDSignals (238316)
- Fix race in IOHandlerProcessSTDIO (238423)
- MIPS64 Branch instruction emulation for SW single stepping (238820)
- Improve OSType initialization in elf object file's arch_spec (239148)
- Emulation of MIPS64 floating-point branch instructions (239996)
- ABI Plugin for MIPS32 (239997)
- ABI Plugin for MIPS64 (240123)
- MIPS32 branch emulation and single stepping (240373)
- Improve instruction emulation based stack unwinding on ARM (240533)
- Add branch emulation to aarch64 instruction emulator (240769)
2015-07-04 01:02:43 +00:00
Mariusz Zaborski
c36e54bb32 Let the nv.h and dnv.h includes be only in sys directory.
Change consumers to include those files from sys.
Add duplicated files to ObsoleteFiles.

Approved by:	pjd (mentor)
2015-07-02 21:58:10 +00:00
Ed Maste
4ed220cdd7 Update meta2deps example after i386-elf to i386 rename 2015-07-02 14:44:30 +00:00
Warren Block
62c332ce9c Fix a couple of missing lines that obscured the -p description.
Submitted by:	Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.com>
MFC after:	1 week
2015-06-28 20:53:36 +00:00
Dimitry Andric
94f6f93ac8 Merge ^/head r284644 through r284736. 2015-06-23 18:55:08 +00:00
Dimitry Andric
8f0fd8f6b8 Update llvm/clang to r240225. 2015-06-23 18:44:19 +00:00
Dimitry Andric
298022457a Fix endless recursion in dwarf_get_section_max_offsets(), found by clang
3.7.0.

Reviewed by:	emaste
2015-06-23 06:42:30 +00:00
Gregory Neil Shapiro
3df48792f2 An additional fix for the openssl Weak DH remediation:
The import of openssl to address the FreeBSD-SA-15:10.openssl security
advisory includes a change which rejects handshakes with DH parameters
below 768 bits.  sendmail releases prior to 8.15.2 (not yet released),
defaulted to a 512 bit DH parameter setting for client connections.

The first fix committed last week changed the default to 1024 bits.

This commit fixes the case where the DHParameters option is set to a
file which doesn't exist, which is the case on newer versions of
FreeBSD which enable STARTTLS by default by auto-creating TLS
certificates.

MFC after:	2 days
2015-06-23 04:33:54 +00:00
Dimitry Andric
76aeda8ad4 Merge ^/head r284188 through r284643. 2015-06-20 19:34:50 +00:00
Baptiste Daroussin
2fbd60ec47 Merge from head @274131 2015-06-20 00:58:46 +00:00
Ed Maste
f66e4b93b7 Update libcxxrt upgrade instructions
The typeinfo file no longer exists upstream.
2015-06-18 14:29:46 +00:00
Ed Maste
fa7477cef3 Import libcxxrt master e64e93fe5bba67a6d52cbe5a97f8770c054bfa65.
This includes a number of demangler fixes obtained from upstream
ELF Tool Chain.

PR:		200913
Sponsored by:	The FreeBSD Foundation
2015-06-18 14:12:08 +00:00
Adrian Chadd
872b4ed5ea Fix compilation of this macro under gcc-4.9 for MIPS32.
Some point after gcc-4.2 the MIPS inline assembly restrictions changed -
=h (hi register) disappeared from the list of restrictions and can no
longer be used.

So, until someone requires an assembly version of this function,
just use a non-assembly version and let the compiler sort it out.

Suggested by:	kan
2015-06-18 13:40:08 +00:00
Baptiste Daroussin
baec3daef1 Merge from head@274131 2015-06-16 20:01:01 +00:00
Gregory Neil Shapiro
d815a37dda The import of openssl to address the FreeBSD-SA-15:10.openssl security
advisory includes a change which rejects handshakes with DH parameters
below 768 bits.  sendmail releases prior to 8.15.2 (not yet released),
defaulted to a 512 bit DH parameter setting for client connections.
This commit chages that default to 1024 bits.  sendmail 8.15.2, when
released well use a default of 2048 bits.

MFC after:	1 day
2015-06-16 02:58:50 +00:00
Baptiste Daroussin
dad2fb7ece Merge from head 2015-06-15 10:56:01 +00:00
Edwin Groothuis
3e58ee7cf3 MFV of 284395,tzdata2015e
Update to tzdata2015e:

  Changes affecting future time stamps

    Morocco will suspend DST from 2015-06-14 03:00 through 2015-07-19 02:00,
    not 06-13 and 07-18 as we had guessed.  (Thanks to Milamber.)

    Assume Cayman Islands will observe DST starting next year, using US rules.
    Although it isn't guaranteed, it is the most likely.
2015-06-15 00:59:47 +00:00
Alexander Kabaev
dbf26257f1 Unbreak libxo's handling of characters not representable in current locale
The xo_format_string_direct function loops forever never advancing the
processed string pointer when it encounters a character that makes
mbrtowc fail. Make it emit '?' character instead, as it seems this is
what the code intent was, sans bugs.

Differential Revision: https://reviews.freebsd.org/D2802
Reviewed by: marcel
2015-06-13 15:14:39 +00:00
Ed Maste
619ba3b416 elfcopy: Handle objects without a ".shstrtab" section string table
As of LLVM revision 238073, LLVM stores symbols and section names in
the same string table.  From the upstream commit mesage:

  With the scheme of naming sections like ".text.foo" where foo is a
  symbol, there is a big potential saving in using a single one.

This is a cherry-pick of ELF Tool Chain revision 3225.

Sponsored by:	The FreeBSD Foundation
2015-06-13 14:24:31 +00:00
Xin LI
3fd03fdbfe MFV r284276: Fix long options.
Reported by:	jkim
MFC after:	13 days
2015-06-11 17:32:36 +00:00
Simon J. Gerraty
128a410505 Merge bmake-20150606
Only change to bmake is man page - document .OBJDIR target.
We also get latest dirdeps.mk and friends.
2015-06-11 04:00:22 +00:00
Xin LI
5f0216bd88 MFV r284234:
Update file to 5.23.

MFC after:	2 weeks
2015-06-10 19:22:41 +00:00
Dimitry Andric
97bc6c731e Update Makefiles and other build glue for llvm/clang 3.7.0, as of trunk
r239412.
2015-06-10 19:12:52 +00:00
Dimitry Andric
3adc74c768 Merged ^/head r283871 through r284187. 2015-06-09 19:14:27 +00:00
Marcel Moolenaar
529b5c137e Move contrib/top/top.X to contrib/top/top.xs and move
contrib/top/top.local.H to contrib/top/top.local.hs.
This fixes a build breakage when src is on a case-
insensitive file system -- we never properly create
top.x nor top.local.h. Change the makefile accordingly.

MFC after:	3 days
2015-06-08 19:45:24 +00:00
Sean Bruno
a6eace857e Silence clang warning about extraneous parenthesis
Verified that this exists upstream already:
https://git.kernel.org/cgit/utils/dtc/dtc.git/tree/checks.c#n628

Differential Revision:	https://reviews.freebsd.org/D913
Reviewed by:	imp
2015-06-05 17:18:10 +00:00
Baptiste Daroussin
09faefdd44 Replace the gunzip(1) system by a minimalistic zlib based implementation.
This allows to not depend on gunzip(1) at bootstrap time, and is good enough to
wait for upstream real implementation using zlib.
2015-06-03 13:32:28 +00:00
Dimitry Andric
16e7cc26b9 Merge ^/head r283771 through r283870. 2015-06-01 06:54:21 +00:00
Marcelo Araujo
9310c7d568 Fix the wrong format, format specifies type 'int' but the argument has type
'long', it was spotted by clang.

Differential Revision:	D2663
Reviewed by:		imp, rodrigc
2015-06-01 06:14:17 +00:00
Michael Tuexen
27edc3a655 The code starts with base + 1 as the first port. Fix to documentation
to match that.

MFC after: 3 days
2015-05-31 12:18:30 +00:00
Michael Tuexen
0239602b83 A TCP checksum of 0 is completely valid. Mapping 0 to 0xffff only
applies to UDP and UDP-Lite.

MFC after: 3 days
2015-05-31 12:11:05 +00:00
Michael Tuexen
3628ed585b Don't send illegal packets when using UDP-Lite.
MFC after: 3 days
2015-05-31 12:03:38 +00:00
Michael Tuexen
4b5a89f438 Use an empty string for field descriptions of unknown protocols.
MFC after: 3 days
2015-05-31 10:51:36 +00:00
Michael Tuexen
027cfc25a9 Don't send malformed SCTP probe packets.
MFC after: 3 days
2015-05-31 09:12:46 +00:00
Michael Tuexen
f826bfc33f When the packet verification fails in verbose mode, print the correct
number of words in host byte order. Also remove a stray 'x'.

MFC after: 3 days
2015-05-31 08:10:35 +00:00
Andrew Turner
b35f8350c2 Use a spelling of .thumb clang understands. 2015-05-31 07:28:34 +00:00
Marcelo Araujo
3287272dab Fix warning of implicit declaration of function 'mkdir'.
Differential Revision:	D2662
Reviewed by:		rodrigc, ngie
2015-05-31 02:21:35 +00:00
Michael Tuexen
a6167a2523 There is no payload anymore. So compute the minimum packet length
correctly and use 40 as the default (if the minumum allows it), as
specified in the man page.

MFC after: 3 days
2015-05-30 20:39:19 +00:00
Michael Tuexen
3105514edd Require the embedded packet to contain 8 bytes after the IP header instead
of only 4. This is guaranteed by RFC 792 and the verification of GRE, ICMP
and TCP packets use 8 bytes.

MFC after: 3 days
2015-05-30 19:52:28 +00:00
Michael Tuexen
8dcbd3fed4 Remove trailing whitespaces. 2015-05-30 19:48:40 +00:00
Dimitry Andric
8472c029fa Merge ^/head r283596 through r283770. 2015-05-30 15:45:39 +00:00
Dimitry Andric
021049273c Drop llvm/clang patches which are no longer necessary. 2015-05-30 15:36:23 +00:00
Glen Barber
37a48d408f MFH: r282615-r283655
Sponsored by:	The FreeBSD Foundation
2015-05-28 17:06:50 +00:00
Dimitry Andric
b736063065 Update FREEBSD-Xlist files for llvm and clang. 2015-05-27 20:58:54 +00:00
Dimitry Andric
33956c4300 Merge clang trunk r238337 from ^/vendor/clang/dist, resolve conflicts,
and preserve our customizations, where necessary.
2015-05-27 20:44:45 +00:00
Dimitry Andric
ff0cc061ec Merge llvm trunk r238337 from ^/vendor/llvm/dist, resolve conflicts, and
preserve our customizations, where necessary.
2015-05-27 20:26:41 +00:00
Ed Maste
3ef90571c1 Update to ELF Tool Chain r3223
Highlights (upstream revisions):
 - Fix SHT_GROUP handling in elfcopy/strip (3206 3220 3221)
 - Misc elfcopy / strip bug fixes (3215 3216 3217)
 - Many C++ demangler improvements (3199 3200 3201 3202 3203 3204 3205
   3208 3210 3211 3212)
 - Improve GNU binutils compatibility in elfcopy / strip (3213 3214)
 - Add -g option to readelf(1): dump contents of section groups (3219)
 - Add EM_IAMCU 32-bit Intel MCU (3198)

Also add a compat #define for building with older FreeBSD ELF headers.
The GRP_COMDAT flag was added to elf_common.h in r283110, but it's not
available during the bootstrap build.  It is also convenient to be able
to build on older hosts.

Thanks to antoine@ for tracking down issues through multiple exp-runs
and to kaiw@ for fixing.

PR:		198611 (exp-run), 200350
Sponsored by:	The FreeBSD Foundation
2015-05-27 14:28:19 +00:00
Ed Maste
16150352f5 memmem(3): empty little string matches the beginning of the big string
This function originated in glibc, and this matches their behaviour
(and NetBSD, OpenBSD, and musl).

An empty big string (arg "l") is handled by the existing
l_len < s_len test.

Reviewed by:	bapt, ngie
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2657
2015-05-26 21:16:07 +00:00
Dimitry Andric
ef6fa9e26d Upgrade our copy of clang and llvm to 3.6.1 release.
This release contains the following cherry-picked revisions from
upstream trunk:

  226124 226151 226164 226165 226166 226407 226408 226409 226652
  226905 226983 227084 227087 227089 227208 227209 227210 227211
  227212 227213 227214 227269 227430 227482 227503 227519 227574
  227822 227986 227987 227988 227989 227990 228037 228038 228039
  228040 228188 228189 228190 228273 228372 228373 228374 228403
  228765 228848 228918 229223 229225 229226 229227 229228 229230
  229234 229235 229236 229238 229239 229413 229507 229680 229750
  229751 229752 229911 230146 230147 230235 230253 230255 230469
  230500 230564 230603 230657 230742 230748 230956 231219 231237
  231245 231259 231280 231451 231563 231601 231658 231659 231662
  231984 231986 232046 232085 232142 232176 232179 232189 232382
  232386 232389 232425 232438 232443 232675 232786 232797 232943
  232957 233075 233080 233351 233353 233409 233410 233508 233584
  233819 233904 234629 234636 234891 234975 234977 235524 235641
  235662 235931 236099 236306 236307

Please note that from 3.5.0 onwards, clang and llvm require C++11
support to build; see UPDATING for more information.
2015-05-25 13:43:03 +00:00
Ed Maste
8d121298ba ipf(1): Use strchr(3) instead of deprecated index(3)
Reviewed by:	cy
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2607
2015-05-22 18:31:26 +00:00
Enji Cooper
da3067c138 Import proposed fix from upstream for
atf-sh/atf_check_test:flush_stdout_on_timeout

Many thanks for jmmv for the fix!

MFC after: 1 week
PR: 197060

Original commit message:

From 0e546407567ea858e261e72f75c5ed61e07d0ddf Mon Sep 17 00:00:00 2001
From: Julio Merino <jmmv@google.com>
Date: Tue, 17 Feb 2015 18:10:11 -0500
Subject: [PATCH] Fix atf-sh/atf_check_test:flush_stdout_on_death

The test atf-sh/atf_check_test:flush_stdout_on_timeout was flaky as it
was playing solely with time.  Fix this by making the test more robust
and rename it while we are at it: there is nothing left about "timeouts"
in this test, considering that ATF itself does not enforce deadlines
any longer.

Fixes FreeBSD PR 197060.
2015-05-21 05:06:08 +00:00
Edwin Groothuis
abdc8d91e7 MFV of 283077,tzdata2015d
Update to tzdata2015d:

Release 2015d - 2015-04-24 08:09:46 -0700

  Changes affecting future time stamps

    Egypt will not observe DST in 2015 and will consider canceling it
    permanently.  For now, assume no DST indefinitely.
    (Thanks to Ahmed Nazmy and Tim Parenti.)

  Change affecting past and future time zone abbreviations

    The abbreviations for Hawaii-Aleutian standard and daylight times
    have been changed from HAST/HADT to HST/HDT, as per US Government
    Printing Office style.  This affects only America/Adak since 1983,
    as America/Honolulu was already using the new style.
2015-05-18 21:05:11 +00:00
Edwin Groothuis
9f23d940e1 MFV of 283040,tzdata{2015c}
Update to tzdata2015c:

    Release 2015c - 2015-04-11 08:55:55 -0700

    Changes affecting future time stamps

    Egypt's spring-forward transition is at 24:00 on April's last Thursday,
    not 00:00 on April's last Friday.  2015's transition will therefore be on
    Thursday, April 30 at 24:00, not Friday, April 24 at 00:00.  Similar fixes
    apply to 2026, 2037, 2043, etc.  (Thanks to Steffen Thorsen.)
2015-05-18 01:59:02 +00:00
Sean Bruno
76da95eba4 Update intree gdb/kgdb to handle 2 dwarf types:
DW_OP_GNU_uninit
DW_OP_piece

This squashes the warnings about type 0x93 not known in kgdb when opening a kernel crash dump.

Upstream refs:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=87808bd699575a850139a1f916512ab7a47fd496
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=42be36b328ae784ae6981da7c7cab95b67ed7737
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=23572ecadc89af384c1804ad7692f32c55fbfc80

Differential Revision:	https://reviews.freebsd.org/D2534
Reviewed by:	emaste, jhb, davide
2015-05-17 15:49:38 +00:00
Xin LI
a85f1b1ac5 MFV r282927,r282928,r282930 (kientzle):
Don't segfault when reading malformed cpio archives.

MFC after:	3 days
2015-05-14 22:35:26 +00:00
Ed Maste
b00fe64f4a Update to ELF Tool Chain r3197
Highlights:
 - Fix man page markup, whitespace, and typos
 - Fix sh_info of SHT_GROUP section to point to the correct string
 - Improve validation in readelf and elfcopy/strip
 - Handle DWARF 4's DW_AT_high_pc in addr2line

Sponsored by:	The FreeBSD Foundation
2015-05-14 19:48:15 +00:00
Simon J. Gerraty
28a6bc8146 Merge bmake-20150505 improve detection of malformed conditionals. 2015-05-10 22:03:59 +00:00
Baptiste Daroussin
3deada4168 Merge from HEAD 2015-05-07 23:18:23 +00:00
Xin LI
8c54dbfb9b MFV r282611: netcat from OpenBSD 5.7.
MFC after:	2 weeks
2015-05-07 22:54:31 +00:00
Andrew Turner
53ee135632 Copy new attribute types when linking. bfd will copy attributes as needed,
however it will fail to output them if the type is not set correctly. This
can happen when it finds an attribute it hasn't seen before, for example
when building shared objects it will use the attributes from crti.o, hwever
this file has no attributes set.

Differential Revision:	https://reviews.freebsd.org/D2413
Reviewed by:	imp
2015-05-05 10:35:29 +00:00
Brooks Davis
5743dcb3c2 Remove "capability mode sandbox enabled" messages.
These messages serve little purpose and break some consumers.

PR:		199855
Differential Revision:	https://reviews.freebsd.org/D2440
Reviewed by:	rwatson
Approved by:	pjd
MFC after:	1 week
Sponsored by:	DARPA, AFRL
2015-05-04 21:44:51 +00:00
Glen Barber
d7149f4e51 MFV r225523, r282431:
r225523 (hrs):
  Import openresolv-3.4.4.

 r282431:
  Import openresolv-3.7.0.

PR:		199854
Submitted by:	yuri@rawbw.com
MFC after:	1 week
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2015-05-04 21:07:20 +00:00
Cy Schubert
a25439b686 MFV ntp 4.2.8p2 (r281348)
Reviewed by:    delphij (suggested MFC)
Approved by:	roberto
Security:       CVE-2015-1798, CVE-2015-1799
Security:       VuXML ebd84c96-dd7e-11e4-854e-3c970e169bc2
MFC after:	1 month
2015-05-04 04:45:59 +00:00
Warner Losh
729a1e1dec For eabi 5 (what FreeBSD uses), be sure to tag all executables and
shared libraries as either SOFT or HARD float to comply with the EABI
standard.

Differential Revision: https://reviews.freebsd.org/D2401
2015-05-03 22:51:42 +00:00
Warner Losh
f321ea7845 When merging the floating point type attribute, and reporting an error
when things don't match, report which file has them and which one
doesn't correctly.

Differential Revision: https://reviews.freebsd.org/D2400
2015-05-03 22:51:29 +00:00
Baptiste Daroussin
7757a1b4dc Merge from head 2015-05-03 19:30:11 +00:00
Baptiste Daroussin
dde01df167 Import sqlite3 3.8.9 2015-05-01 21:59:32 +00:00
Baptiste Daroussin
5fa137c326 libc now has reallocarray 2015-05-01 18:34:29 +00:00
Pedro F. Giffuni
33ef4de95f libgomp: bring initial BSD support from upstream.
Initial support for FreeBSD specific routines related to counting
online processors and dynamic load balancing.

Fix "detection" of the <sys/sysctl> header which upstream seems to have
done wrong.

Obtained from:	GCC pre-4.4 branch (rev. 140497; LGPLv2.1+)
2015-04-28 21:32:27 +00:00
Pedro F. Giffuni
5fabece0f9 MFV r282150
libgomp: Update to version 4.3.5.

This is a partial revert of r282115, to bring the fromal upstream
libgomp from GCC 4.3.5 Release under LGPLv2.1+.

This is only brought to ease the ongoing development of the CPU
affinity support.

This shall not be MFC'd.
2015-04-28 16:47:56 +00:00
Marcel Moolenaar
3865ad3fcf Fix build breakage with GCC.
Pointed out by: bz@
2015-04-27 21:58:41 +00:00
Pedro F. Giffuni
70364ab4ff libgomp: bring early CPU affinity support from FSF GCC-4_3 branch.
This is not likely to make it into a release and is basically disabled
but should still be useful for testing.

Obtained from: GCC pre-4.3 (rev. 123494, 125542; LGPLv2.1+)
2015-04-27 21:27:51 +00:00
Marcel Moolenaar
788ca347b8 Upgrade libxo to 0.3.2.
Obtained from:  https://github.com/Juniper/libxo/tree/0.3.2
Requested by: Phil Shafer <phil@juniper.net>

This import incorporates local change 279966.
Local change 276260 has been merged-in.
2015-04-27 17:23:19 +00:00
Dag-Erling Smørgrav
6480faa8a2 Upgrade Unbound to 1.5.3. 2015-04-27 12:06:13 +00:00
Dag-Erling Smørgrav
22889169f8 Add a script that runs configure for both ldns and drill.
Run configure for drill (I forgot to do it when I imported 1.6.17, but the
omission was harmless).  Note that running configure --with-drill at the
top level doesn't quite work for us since it is geared toward the slightly
weird upstream Makefiles, which we don't use.
2015-04-27 12:02:16 +00:00
Dag-Erling Smørgrav
d98cb77670 Restore packaging subdir to enable running unmodified configure script. 2015-04-27 11:45:48 +00:00
Enji Cooper
66eb8885a0 The fmodl compat shims on arm/mips/powerpc aren't complete
Disable the test code for now on those architectures

MFC after: 1 week
PR: 199422
2015-04-27 06:46:33 +00:00
Dag-Erling Smørgrav
d3348d437f import unbound 1.5.2 2015-04-26 11:23:26 +00:00
Enji Cooper
49a26c1f93 Add #include sys/types.h for register_t for mips
MFC after: 3 days
2015-04-25 04:30:01 +00:00
Brooks Davis
04c5335197 Merge from CheriBSD: 1065cf515a7c2062598009c1318055aacbb39e80
Convert the pfsync dissector to use the netdissect framework.

Differential Revision:	https://reviews.freebsd.org/D2359
Reviewed by:	glebius
Sponsored by:	DARPA, AFRL
2015-04-24 16:11:22 +00:00
Simon J. Gerraty
db29cad815 Merge bmake-20150418
PR: 199486
2015-04-21 04:40:38 +00:00
Rui Paulo
5b9c547c07 Merge wpa_supplicant/hostapd 2.4.
Major changes are: SAE, Suite B, RFC 7268, EAP-PKE, ACS, and tons of
bug fixes.

Relnotes:	yes
2015-04-21 01:45:11 +00:00
Dimitry Andric
867073d7fb Add llvm patch corresponding to r281775. 2015-04-20 17:37:37 +00:00
Dimitry Andric
98095a5dd2 Pull in r229911 from upstream llvm trunk (by Benjamin Kramer):
MC: Allow multiple comma-separated expressions on the .uleb128 directive.

  For compatiblity with GNU as. Binutils documents this as
  '.uleb128 expressions'. Subtle, isn't it?

Reported by:	sbruno
PR:		199554
MFC after:	3 days
2015-04-20 17:36:35 +00:00
Enji Cooper
f95c930e67 Fix race when testing for ETXTBSY writing to ${n0} (process image) by making
sure the process has been started beforehand with pgrep

pkill the process afterwards to make sure it's dead when the unlink is run
(not strictly required, but I was being conservative)

MFC after: 1 week
Reviewed by: Darius O'Conner, mjohnston
Sponsored by: EMC / Isilon Storage Division
2015-04-16 03:35:47 +00:00
Tijl Coosemans
1243a98e38 Remove the const qualifier from iconv(3) to comply with POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iconv.html

Adjust all code that calls iconv.

PR:		199099
Exp-run by:	antoine
MFC after:	2 weeks
2015-04-15 09:09:20 +00:00
Baptiste Daroussin
c271fa9295 Update nvi to 2.1.3 which fixes the data corruption when locale conversion
failed
2015-04-10 17:50:28 +00:00
Xin LI
342bcb1232 MFV r281278:
- Update xz to 5.2.1, where the most visible change is that it
   fixed a compression-ratio regression in fast mode LZMA1 and
   LZMA2 and used cpuset_getaffinity() for CPU cores detection.
 - Make liblzma use the base system SHA256 implementation instead of
   the bundled one.
 - Additional annotation in config.h for FreeBSD specific tweaks.
 - Refresh symbols in XZprivate_1.0 to reflect reality.

Relnotes:	yes
MFC after:	1 month (TBD)
2015-04-09 18:03:27 +00:00
Ed Maste
6853d12d4f compiler-rt: add floatditf and floatunditf
These are long integer (di_int/du_int) to quad precision floating point
conversions. They may be reworked based on upstream discussion. These
versions are here to support arm64 world builds.

Reviewed by:	ed
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2174
2015-04-07 19:31:29 +00:00
Ed Maste
13553dc6bd compiler-rt: Implement multc3 - quad-precision complex multiplication
This may be reworked based on upstream discussion. This version is here
to support arm64 world builds.

Reviewed by:	ed
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2173
2015-04-07 19:28:53 +00:00
Gleb Smirnoff
56d5e0967c Stop including if_var.h from userland.
Sponsored by:	Nginx, Inc.
2015-04-06 09:42:23 +00:00
Baptiste Daroussin
4bf53d0b46 Merge from HEAD 2015-04-03 23:23:09 +00:00
Dimitry Andric
ebfc641e4e Update FREEBSD-Xlist for llvm. 2015-04-03 19:49:39 +00:00
Dimitry Andric
fe2efc8c43 Add the llvm-cov and llvm-profdata tools, when WITH_CLANG_EXTRAS is
defined.  These help with processing coverage and profile data.
2015-04-03 19:43:39 +00:00
Andrew Turner
ef25e82143 More ARM EABI object attributes in binutils. This adds support to binutils
to include the Unaligned Access and Floating-point Half-precision
attributes. the former marks ELF objects that may access ARMv6 style
unaligned data, the latter that the binary uses the VFPv3/Advanced SIMD
half-precision extension.

These may be emmitted by clang so it's best to print a warning when the
linker hits one of them.

Differential Revision:	http://reviews.freebsd.org/D2194
Submitted by:	Michal Meloun <meloun@miracle.cz>
MFC after:	1 week
2015-04-03 19:33:26 +00:00
Dimitry Andric
1f26983742 Add clang patch corresponding to r281046. 2015-04-03 18:42:38 +00:00
Dimitry Andric
de460a4881 Pull in r227115 from upstream clang trunk (by Ben Langmuir):
Fix assert instantiating string init of static variable

  ... when the variable's type is a typedef of a ConstantArrayType. Just
  look through the typedef (and any other sugar).  We only use the
  constant array type here to get the element count.

This fixes an assertion failure when building the games/redeclipse port.

Reported by:	amdmi3
2015-04-03 18:38:37 +00:00
Cy Schubert
21c09643ff Fix merge error.
Submitted by:	jkim
2015-04-03 10:20:59 +00:00
Cy Schubert
00cbf6c295 Remove rednandt file.
Submitted by:	jkim
2015-04-03 10:17:36 +00:00
Gleb Smirnoff
6d947416cc o Use new function ip_fillid() in all places throughout the kernel,
where we want to create a new IP datagram.
o Add support for RFC6864, which allows to set IP ID for atomic IP
  datagrams to any value, to improve performance. The behaviour is
  controlled by net.inet.ip.rfc6864 sysctl knob, which is enabled by
  default.
o In case if we generate IP ID, use counter(9) to improve performance.
o Gather all code related to IP ID into ip_id.c.

Differential Revision:		https://reviews.freebsd.org/D2177
Reviewed by:			adrian, cy, rpaulo
Tested by:			Emeric POUPON <emeric.poupon stormshield.eu>
Sponsored by:			Netflix
Sponsored by:			Nginx, Inc.
Relnotes:			yes
2015-04-01 22:26:39 +00:00
Ed Maste
67d97fe724 Update elftoolchain to upstream revision 3179
Some notable changes:
- libdwarf: Fixed DWARF4 line section
- elfcopy: Implement --localize-hidden
- nm: handle object name referenced by DW_AT_specification
- elfcopy: Add --strip-dwo and --extract-dwo options for split DWARF
- readelf: add remaining arm64 dynamic relocation names
- nm: Avoid integer overflow in value comparison

Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2015-04-01 01:08:01 +00:00
Cy Schubert
8e4f77ede8 Fix build. 2015-03-31 19:35:32 +00:00
Ed Maste
640cba97d8 unwind-d2 build workaround for arm64
The __builtin_init_dwarf_reg_size_table function is unimplemented in
clang 3.6 for AArch64. Comment it out for now and replace it with
a message and abort.

Tracked in upstream LLVM PR 22997
https://llvm.org/bugs/show_bug.cgi?id=22997

Submitted by:	andrew
2015-03-31 13:37:32 +00:00
Bryan Drewery
eb828e1bb5 Fix --one-file-system to include the directory encountered rather than
excluding it.  This was broken in 3.0.4 (r238856).

Obtained from:	https://github.com/libarchive/libarchive/commit/fa9e61
MFC after:	3 days
Sponsored by:	EMC / Isilon Storage Division
2015-03-31 00:00:47 +00:00
Dimitry Andric
830e9b84d8 Add llvm patch corresponding to r280865. 2015-03-30 20:23:06 +00:00
Ed Maste
e93a7dab19 llvm: Backport upstream r229195 to fix arm64 TLS relocations
As is described at http://llvm.org/bugs/show_bug.cgi?id=22408, the GNU
  linkers ld.bfd and ld.gold currently only support a subset of the
  whole range of AArch64 ELF TLS relocations. Furthermore, they assume
  that some of the code sequences to access thread-local variables are
  produced in a very specific sequence.  When the sequence is not as the
  linker expects, it can silently mis-relaxe/mis-optimize the
  instructions.
  Even if that wouldn't be the case, it's good to produce the exact
  sequence, as that ensures that linkers can perform optimizing
  relaxations.

  This patch:

  * implements support for 16MiB TLS area size instead of 4GiB TLS area
    size. Ideally clang would grow an -mtls-size option to allow support
    for both, but that's not part of this patch.
  * by default doesn't produce local dynamic access patterns, as even
    modern ld.bfd and ld.gold linkers do not support the associated
    relocations. An option (-aarch64-elf-ldtls-generation) is added to
    enable generation of local dynamic code sequence, but is off by
    default.
  * makes sure that the exact expected code sequence for local dynamic
    and general dynamic accesses is produced, by making use of a new
    pseudo instruction. The patch also removes two
    (AArch64ISD::TLSDESC_BLR, AArch64ISD::TLSDESC_CALL) pre-existing
    AArch64-specific pseudo SDNode instructions that are superseded by
    the new one (TLSDESC_CALLSEQ).

Submitted by:	Kristof Beyls
Differential Revision:	https://reviews.freebsd.org/D2175
2015-03-30 20:01:41 +00:00
Dimitry Andric
b770021fdb Pull in r233552 from upstream libc++ trunk (by Eric Fiselier):
[libcxx] Fix PR22771 - Support access control SFINAE in the library
  version of is_convertible.

  Summary:
  Currently the conversion check does not take place in a context where
  access control SFINAE is applied. This patch changes the context of
  the test expression so that SFINAE occurs if access control does not
  permit the conversion.

  Related bug: https://llvm.org/bugs/show_bug.cgi?id=22771

  Reviewers: mclow.lists, rsmith, dim

  Reviewed By: dim

  Subscribers: dim, rodrigc, emaste, cfe-commits

  Differential Revision: http://reviews.llvm.org/D8461

This fixes building clang, and other programs using libc++, with newer
versions of gcc (specifically, gcc 4.8 and higher).

Reported by:	rodrigc
MFC after:	1 week
2015-03-30 19:36:33 +00:00
Cy Schubert
2b15cb3d09 MFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284)
Thanks to roberto for providing pointers to wedge this into HEAD.

Approved by:	roberto
2015-03-30 13:30:15 +00:00
Ed Maste
e3327e3942 Import lldb r233478: Fix build failure on Freebsd with gcc 4.9.
llvm.org/pr23051

Submitted by:	rodrigc
2015-03-28 18:29:13 +00:00
Ed Maste
acf33b5c74 lldb: Move debug register output into __amd64__
This debug register diagnostic is really only applicable to amd64 at
present.

Sponsored by:	The FreeBSD Foundation
2015-03-27 19:42:38 +00:00
Andrew Turner
305d71de6e Also define DWARF_FRAME_REGISTERS. This is used to size arrays, without
this exceptions could write over the stack.

Sponsored by:	The FreeBSD Foundation
2015-03-26 18:25:53 +00:00
Andrew Turner
6dd9f5b375 Adda minimal gcc config. This is just enough to build the bits of csu we
get from gcc, and libgcc_eh.

Sponsored by:	The FreeBSD Foundation
2015-03-24 14:22:58 +00:00
Edwin Groothuis
74d26aa76b MFV of 280411,tzdata{2015b}
Release 2015b - 2015-03-19 23:28:11 -0700

  Changes affecting future time stamps

    Mongolia will start observing DST again this year, from the last
    Saturday in March at 02:00 to the last Saturday in September at 00:00.
    (Thanks to Ganbold Tsagaankhuu.)

    Palestine will start DST on March 28, not March 27.  Also,
    correct the fall 2014 transition from September 26 to October 24.
    Adjust future predictions accordingly.  (Thanks to Steffen Thorsen.)

  Changes affecting past time stamps

    The 1982 zone shift in Pacific/Easter has been corrected, fixing a 2015a
    regression.  (Thanks to Stuart Bishop for reporting the problem.)

    Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
    The affected zones are: America/Antigua, America/Cayman,
    Pacific/Midway, and Pacific/Saipan.

  Changes affecting time zone abbreviations

    Correct the 1992-2010 DST abbreviation in Volgograd from "MSK" to "MSD".
    (Thanks to Hank W.)
2015-03-24 05:52:28 +00:00
Dimitry Andric
24db767d81 Add llvm patch corresponding to r280400. 2015-03-23 21:15:07 +00:00
Dimitry Andric
c738625756 Pull in r230348 from upstream llvm trunk (by Tim Northover):
ARM: treat [N x i32] and [N x i64] as AAPCS composite types

  The logic is almost there already, with our special homogeneous
  aggregate handling. Tweaking it like this allows front-ends to emit
  AAPCS compliant code without ever having to count registers or add
  discarded padding arguments.

  Only arrays of i32 and i64 are needed to model AAPCS rules, but I
  decided to apply the logic to all integer arrays for more consistency.

This fixes a possible "Unexpected member type for HA" error when
compiling lib/msun/bsdsrc/b_tgamma.c for armv6.

Reported by:	Jakub Palider <jpa@semihalf.com>
2015-03-23 21:13:29 +00:00
Dimitry Andric
be01698709 Add FREEBSD-Xlist files for llvm, clang and lldb.
These are generated, and not "optimized" in any way, since I am not
entirely sure of the syntax or format of this type of file.  Feel free
to suggest ways of shortening these lists.

The general idea is the same for all three files, though:
* Get rid of upstream build infrastructure (CMakeLists, Makefiles, etc)
* Delete tests, tools and utilities we don't want or use (including
  samples)
* Remove various bits of upstream metadata files that we don't want or
  use (.arcconfig, .gitignore, etc)
2015-03-22 17:56:49 +00:00
Dimitry Andric
7d0fba4fd9 Pull in r231972 from upstream compiler-rt trunk (by Jörg Sonnenberger):
Always include stddef.h to make sure size_t exists.

  From Alexander Esilevich.

Requested by:	andrew
2015-03-21 21:49:25 +00:00
Hans Petter Selasky
ec0e626baf Define BINDIR for some test utilities.
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2015-03-19 15:55:02 +00:00
Ed Maste
d470ab05ff Import compiler-rt r232125 by Joerg Sonnenberger
We want single precision here.
2015-03-17 15:48:19 +00:00
Gregory Neil Shapiro
0232255f90 Default to turning off OpenSSL SSL_OP_TLSEXT_PADDING as it breaks
compatibility with some sites

This change comes from 8.15 but is being backported to FreeBSD releases
not yet using 8.15.

MFC after:	3 days
Noted by:	julian@
2015-03-16 20:24:37 +00:00
Dimitry Andric
df6508c726 Merge ^/head r279995 through r280029. 2015-03-15 11:58:52 +00:00
Baptiste Daroussin
e509c88862 Import mdocml 1.13.3 2015-03-15 11:35:39 +00:00
Dimitry Andric
fa77b333f3 For now, disable the __clear_cache implementation for mips in
compiler-rt, since we do not yet have the required syscall.
2015-03-14 18:38:07 +00:00
Dimitry Andric
e0125cfdd1 Merge ^/head r279893 through r279984. 2015-03-14 13:08:00 +00:00
Dimitry Andric
25e141edd2 Pull in r231965 from upstream compiler-rt trunk (by Jörg Sonnenberger):
Refactor float to integer conversion to share the same code.
  80bit Intel/PPC long double is excluded due to lacking support
  for the abstraction. Consistently provide saturation logic.
  Extend to long double on 128bit IEEE extended platforms.

  Initial patch with test cases from GuanHong Liu.
  Reviewed by Steve Canon.

  Differential Revision: http://reviews.llvm.org/D2804

Pull in r232107 from upstream compiler-rt trunk (by Ed Maste):

  Use signed int implementation for __fixint

Requested by:	emaste
2015-03-14 12:40:19 +00:00
Edward Tomasz Napierala
a52c3ec43c Mark xo_err(3), xo_errx(3), and xo_errc(3) as __dead2.
Differential Revision:	https://reviews.freebsd.org/D2059
Reviewed by:	marcel@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-13 20:14:55 +00:00
Simon J. Gerraty
bedf67ae99 Make sure that -- filemon is at start of a line, so that
it is found as expected.
2015-03-13 02:54:46 +00:00
Ed Maste
552f44af8b Add aarch64 (arm64) #define for jemalloc
Sponsored by:	The FreeBSD Foundation
2015-03-12 08:52:00 +00:00
Dimitry Andric
08122893fe Update README for the 3.6.0 release. 2015-03-09 21:31:37 +00:00
Dimitry Andric
6404f697a0 Merging ^/head r279596 through r279758. 2015-03-07 23:01:27 +00:00
Dimitry Andric
6add1c59bf Fix another -Wunused-local-typedef warning in libc++, in include/__tree.
MFC after:	3 days
2015-03-07 22:55:31 +00:00
Dimitry Andric
90ea30d3f0 Pull in r228344 from upstream libc++ trunk (by Eric Fiselier):
Get tests running with warnings. Fix warnings in headers and tests

This fixes a number of -Wunused-local-typedef warnings in libc++ headers.

MFC after:	3 days
2015-03-07 22:53:15 +00:00
Edwin Groothuis
2627f31ff0 MFV of 279704,tzdata{2015a}
Release 2015a - 2015-01-29

Changes affecting future time stamps

    The Mexican state of Quintana Roo, represented by America/Cancun,
    will shift from Central Time with DST to Eastern Time without DST
    on 2015-02-01 at 02:00.  (Thanks to Steffen Thorsen and Gwillim Law.)

    Chile will not change clocks in April or thereafter; its new standard time
    will be its old daylight saving time.  This affects America/Santiago,
    Pacific/Easter, and Antarctica/Palmer.  (Thanks to Juan Correa.)

    New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
    (Thanks to Tim Parenti.)

  Changes affecting past time stamps

    Iceland observed DST in 1919 and 1921, and its 1939 fallback
    transition was Oct. 29, not Nov. 29.  Remove incorrect data from
    Shanks about time in Iceland between 1837 and 1908.

    Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
    The affected zones are: Asia/Aden, Asia/Bahrain, Asia/Kuwait,
    and Asia/Muscat.
2015-03-06 21:45:35 +00:00
Dimitry Andric
ca65be80fd Merge ^/head r279313 through r279595. 2015-03-04 19:47:33 +00:00
Baptiste Daroussin
8e3b1ab2b5 Update libucl to git version 8d3b186 2015-03-02 21:41:09 +00:00
Baptiste Daroussin
1d0f6813ac Remove pregenerated text version of the texinfo documentation 2015-03-02 17:25:03 +00:00
Baptiste Daroussin
7bb36fb551 Generate manpage out of the texinfo files using texi2mdoc 2015-03-02 17:20:34 +00:00
Baptiste Daroussin
849684b013 Update mandoc to cvs snaphot from 20150302
Use the new unsupp warning level to detect the unsupported manpages in man(1)
2015-03-02 16:58:57 +00:00
Baptiste Daroussin
2fd5d19071 Convert texinfo to mdoc(7) using texi2mdoc 2015-03-02 11:48:00 +00:00
Jilles Tjoelker
c317cb51b2 nice(): Put back old return value, keeping [EPERM] error.
Commit r279154 changed the API and ABI significantly, and {NZERO} is still
wrong.

Also, preserve errno on success instead of setting it to 0.

PR:		189821
Reported by:	bde
Relnotes:	yes
2015-02-28 18:22:10 +00:00
Dimitry Andric
d0f6710d5a Merge ^/head r279309 through r279312. 2015-02-26 07:51:43 +00:00
Dimitry Andric
fb48e1d39c Since newer versions of compiler-rt require unwind.h, and we want to use
the copy in libcxxrt for it, fix the arm-specific header to define the
_Unwind_Action type.

Submitted by:	andrew
MFC after:	3 days
2015-02-26 07:42:16 +00:00
Dimitry Andric
0d56a8cba1 Merge ^/head r279163 through r279308. 2015-02-26 07:26:56 +00:00
Dimitry Andric
a0f4b91bed Make libcxxrt's parsing of DWARF exception handling tables work on
architectures with strict alignment, by using memcpy() instead of
directly reading fields.

Reported by:	Daisuke Aoyama <aoyama@peach.ne.jp>
Reviewed by:	imp, bapt
Tested by:	bapt
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D1967
2015-02-26 07:20:05 +00:00
Ed Maste
4b8807a4d3 GNU nm: Avoid NULL dereference
bfd_dwarf2_find_line() calls find_line() with NULL functionname_ptr,
which resulted in a crash on certain ELF objects.

This change was implemented independently from upstream binutils, but
I have checked that the crash does not happen there.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2015-02-25 22:12:37 +00:00
Ed Maste
0b93a0b462 nm: avoid crash in print_lineno if func->name is NULL
This can occur when DW_AT_specification is used to refer to another DIE
that provides the actual DW_AT_name string. For example:

< 3><0x00000086> DW_TAG_subprogram
                   DW_AT_name              PrettyStackTraceEntry
...
< 1><0x00002cf4> DW_TAG_subprogram
                   DW_AT_specification     <0x00000086>

We will need to add support for DW_AT_specification, but in the interim
we should not segfault.

Obtained from:	Elftoolchain (r3170)
Sponsored by:	The FreeBSD Foundation
2015-02-25 21:43:09 +00:00
Dimitry Andric
cef93a3d52 Merge llvm 3.6.0 final from ^/vendor/llvm/dist, merge clang 3.6.0 final
from ^/vendor/clang/dist, and resolve conflicts.
2015-02-25 18:50:24 +00:00
Kenneth D. Merry
43518607b2 Significant upgrades to sa(4) and mt(1).
The primary focus of these changes is to modernize FreeBSD's
tape infrastructure so that we can take advantage of some of the
features of modern tape drives and allow support for LTFS.

Significant changes and new features include:

 o sa(4) driver status and parameter information is now exported via an
   XML structure.  This will allow for changes and improvements later
   on that will not break userland applications.  The old MTIOCGET
   status ioctl remains, so applications using the existing interface
   will not break.

 o 'mt status' now reports drive-reported tape position information
   as well as the previously available calculated tape position
   information.  These numbers will be different at times, because
   the drive-reported block numbers are relative to BOP (Beginning
   of Partition), but the block numbers calculated previously via
   sa(4) (and still provided) are relative to the last filemark.
   Both numbers are now provided.  'mt status' now also shows the
   drive INQUIRY information, serial number and any position flags
   (BOP, EOT, etc.) provided with the tape position information.
   'mt status -v' adds information on the maximum possible I/O size,
   and the underlying values used to calculate it.

 o The extra sa(4) /dev entries (/dev/saN.[0-3]) have been removed.

   The extra devices were originally added as place holders for
   density-specific device nodes.  Some OSes (NetBSD, NetApp's OnTap
   and Solaris) have had device nodes that, when you write to them,
   will automatically select a given density for particular tape drives.

   This is a convenient way of switching densities, but it was never
   implemented in FreeBSD.  Only the device nodes were there, and that
   sometimes confused users.

   For modern tape devices, the density is generally not selectable
   (e.g. with LTO) or defaults to the highest availble density when
   the tape is rewritten from BOT (e.g. TS11X0).  So, for most users,
   density selection won't be necessary.  If they do need to select
   the density, it is easy enough to use 'mt density' to change it.

 o Protection information is now supported.  This is either a
   Reed-Solomon CRC or CRC32 that is included at the end of each block
   read and written.  On write, the tape drive verifies the CRC, and
   on read, the tape drive provides a CRC for the userland application
   to verify.

 o New, extensible tape driver parameter get/set interface.

 o Density reporting information.  For drives that support it,
   'mt getdensity' will show detailed information on what formats the
   tape drive supports, and what formats the tape drive supports.

 o Some mt(1) functionality moved into a new mt(3) library so that
   external applications can reuse the code.

 o The new mt(3) library includes helper routines to aid in parsing
   the XML output of the sa(4) driver, and build a tree of driver
   metadata.

 o Support for the MTLOAD (load a tape in the drive) and MTWEOFI
   (write filemark immediate) ioctls needed by IBM's LTFS
   implementation.

 o Improve device departure behavior for the sa(4) driver.  The previous
   implementation led to hangs when the device was open.

 o This has been tested on the following types of drives:
	IBM TS1150
	IBM TS1140
	IBM LTO-6
	IBM LTO-5
	HP LTO-2
	Seagate DDS-4
	Quantum DLT-4000
	Exabyte 8505
	Sony DDS-2

contrib/groff/tmac/doc-syms,
share/mk/bsd.libnames.mk,
lib/Makefile,
	Add libmt.

lib/libmt/Makefile,
lib/libmt/mt.3,
lib/libmt/mtlib.c,
lib/libmt/mtlib.h,
	New mt(3) library that contains functions moved from mt(1) and
	new functions needed to interact with the updated sa(4) driver.

	This includes XML parser helper functions that application writers
	can use when writing code to query tape parameters.

rescue/rescue/Makefile:
	Add -lmt to CRUNCH_LIBS.

src/share/man/man4/mtio.4
	Clarify this man page a bit, and since it contains what is
	essentially the mtio.h header file, add new ioctls and structure
	definitions from mtio.h.

src/share/man/man4/sa.4
	Update BUGS and maintainer section.

sys/cam/scsi/scsi_all.c,
sys/cam/scsi/scsi_all.h:
	Add SCSI SECURITY PROTOCOL IN/OUT CDB definitions and CDB building
	functions.

sys/cam/scsi/scsi_sa.c
sys/cam/scsi/scsi_sa.h
	Many tape driver changes, largely outlined above.

	Increase the sa(4) driver read/write timeout from 4 to 32
	minutes.  This is based on the recommended values for IBM LTO
	5/6 drives.  This may also avoid timeouts for other tape
	hardware that can take a long time to do retries and error
	recovery.  Longer term, a better way to handle this is to ask
	the drive for recommended timeout values using the REPORT
	SUPPORTED OPCODES command.  Modern IBM and Oracle tape drives
	at least support that command, and it would allow for more
	accurate timeout values.

	Add XML status generation.  This is done with a series of
	macros to eliminate as much duplicate code as possible.  The
	new XML-based status values are reported through the new
	MTIOCEXTGET ioctl.

	Add XML driver parameter reporting, using the new MTIOCPARAMGET
	ioctl.

	Add a new driver parameter setting interface, using the new
	MTIOCPARAMSET and MTIOCSETLIST ioctls.

	Add a new MTIOCRBLIM ioctl to get block limits information.

	Add CCB/CDB building routines scsi_locate_16, scsi_locate_10,
	and scsi_read_position_10().

	scsi_locate_10 implements the LOCATE command, as does the
	existing scsi_set_position() command.  It just supports
	additional arguments and features.  If/when we figure out a
	good way to provide backward compatibility for older
	applications using the old function API, we can just revamp
	scsi_set_position().  The same goes for
	scsi_read_position_10() and the existing scsi_read_position()
	function.

	Revamp sasetpos() to take the new mtlocate structure as an
	argument.  It now will use either scsi_locate_10() or
	scsi_locate_16(), depending upon the arguments the user
	supplies.  As before, once we change position we don't have a
	clear idea of what the current logical position of the tape
	drive is.

	For tape drives that support long form position data, we
	read the current position and store that for later reporting
	after changing the position.  This should help applications
	like Bacula speed tape access under FreeBSD once they are
	modified to support the new ioctls.

	Add a new quirk, SA_QUIRK_NO_LONG_POS, that is set for all
	drives that report SCSI-2 or older, as well as drives that
	report an Illegal Request type error for READ POSITION with
	the long format.  So we should automatically detect drives
	that don't support the long form and stop asking for it after
	an initial try.

	Add a partition number to the sa(4) softc.

	Improve device departure handling. The previous implementation
	led to hangs when the device was open.

	If an application had the sa(4) driver open, and attempted to
	close it after it went away, the cam_periph_release() call in
	saclose() would cause the periph to get destroyed because that
	was the last reference to it.  Because destroy_dev() was
	called from the sa(4) driver's cleanup routine (sacleanup()),
	and would block waiting for the close to happen, a deadlock
	would result.

	So instead of calling destroy_dev() from the cleanup routine,
	call destroy_dev_sched_cb() from saoninvalidate() and wait for
	the callback.

	Acquire a reference for devfs in saregister(), and release it
	in the new sadevgonecb() routine when all devfs devices for
	the particular sa(4) driver instance are gone.

	Add a new function, sasetupdev(), to centralize setting
	per-instance devfs device parameters instead of repeating the
	code in saregister().

	Add an open count to the softc, so we know how many
	peripheral driver references are a result of open
       	sessions.

	Add the D_TRACKCLOSE flag to the cdevsw flags so
	that we get a 1:1 mapping of open to close calls
	instead of a N:1 mapping.

	This should be a no-op for everything except the
	control device, since we don't allow more than one
	open on non-control devices.

	However, since we do allow multiple opens on the
	control device, the combination of the open count
	and the D_TRACKCLOSE flag should result in an
	accurate peripheral driver reference count, and an
	accurate open count.

	The accurate open count allows us to release all
	peripheral driver references that are the result
	of open contexts once we get the callback from devfs.

sys/sys/mtio.h:
	Add a number of new mt(4) ioctls and the requisite data
	structures.  None of the existing interfaces been removed
	or changed.

	This includes definitions for the following new ioctls:

	MTIOCRBLIM      /* get block limits */
	MTIOCEXTLOCATE	/* seek to position */
	MTIOCEXTGET     /* get tape status */
	MTIOCPARAMGET	/* get tape params */
	MTIOCPARAMSET	/* set tape params */
	MTIOCSETLIST	/* set N params */

usr.bin/mt/Makefile:
	mt(1) now depends on libmt, libsbuf and libbsdxml.

usr.bin/mt/mt.1:
	Document new mt(1) features and subcommands.

usr.bin/mt/mt.c:
	Implement support for mt(1) subcommands that need to
	use getopt(3) for their arguments.

	Implement a new 'mt status' command to replace the old
	'mt status' command.  The old status command has been
	renamed 'ostatus'.

	The new status function uses the MTIOCEXTGET ioctl, and
	therefore parses the XML data to determine drive status.
	The -x argument to 'mt status' allows the user to dump out
	the raw XML reported by the kernel.

	The new status display is mostly the same as the old status
	display, except that it doesn't print the redundant density
	mode information, and it does print the current partition
	number and position flags.

	Add a new command, 'mt locate', that will supersede the
	old 'mt setspos' and 'mt sethpos' commands.  'mt locate'
	implements all of the functionality of the MTIOCEXTLOCATE
	ioctl, and allows the user to change the logical position
	of the tape drive in a number of ways.  (Partition,
	block number, file number, set mark number, end of data.)
	The immediate bit and the explicit address bits are
	implemented, but not documented in the man page.

	Add a new 'mt weofi' command to use the new MTWEOFI ioctl.
	This allows the user to ask the drive to write a filemark
	without waiting around for the operation to complete.

	Add a new 'mt getdensity' command that gets the XML-based
	tape drive density report from the sa(4) driver and displays
	it.  This uses the SCSI REPORT DENSITY SUPPORT command
	to get comprehensive information from the tape drive about
	what formats it is able to read and write.

	Add a new 'mt protect' command that allows getting and setting
	tape drive protection information.  The protection information
	is a CRC tacked on to the end of every read/write from and to
	the tape drive.

Sponsored by:	Spectra Logic
MFC after:	1 month
2015-02-23 21:59:30 +00:00
Dimitry Andric
abb48e0e14 Update compiler-rt to trunk r230183. This has some of our patches
imported, so we have just a few small diffs against upstream left.
2015-02-22 22:53:51 +00:00
Dimitry Andric
7ff616029d Update compiler-rt to trunk r228651. This enables using Address
Sanitizer and Undefined Behavior Sanitizer with clang 3.6.0.
2015-02-22 22:31:36 +00:00
Nathan Whitehorn
8a5843ad02 Add some opcodes for assembling forthcoming VSX (Vector-Scalar eXtension)
support in the kernel. Userspace programs are expected to rely on LLVM's
integrated assembler or newer binutils.
2015-02-22 20:52:29 +00:00
Dimitry Andric
79a79bd7c1 Belatedly add llvm patch corresponding to r278367. 2015-02-22 16:28:24 +00:00
Dimitry Andric
9b2a0d91b8 Merge ^/head r279023 through r279162. 2015-02-22 16:04:37 +00:00
Dimitry Andric
680ef382a2 Add llvm patch corresponding to r279161. 2015-02-22 15:56:16 +00:00
Dimitry Andric
a6d980a99e Pull in r230058 from upstream llvm trunk (by Benjamin Kramer):
LoopRotate: When reconstructing loop simplify form don't split edges
  from indirectbrs.

  Yet another chapter in the endless story. While this looks like we
  leave the loop in a non-canonical state this replicates the logic in
  LoopSimplify so it doesn't diverge from the canonical form in any way.

  http://llvm.org/PR21968

This fixes a "Cannot split critical edge from IndirectBrInst" assertion
failure when building the devel/radare2 port.

PR:		195480, 196987
MFC after:	3 days
2015-02-22 15:51:49 +00:00
Jilles Tjoelker
e220ce08ef nice(): Correct return value and [EPERM] error.
PR:		189821
Obtained from:	NetBSD
Relnotes:	yes
2015-02-22 13:36:44 +00:00
Gleb Smirnoff
b0af3a5363 The ipftest(1) is a program that emulates ipf(4) operation and tests packets
against rules.  It definitely doesn't need to know about kernel internals,
such as 'struct ifaddr'.  What it does with ifaddr, is that it only takes
ifa_addr member of it, and treats it as sockaddr, while it is only a pointer
to sockaddr.  Fortunately, sizeof(struct ifaddr) > sizeof(struct sockaddr_in6),
so no problems arise.

Fix that declaring a private struct ifaddr in ipftest(1) and stop including
if_var.h.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2015-02-19 23:14:35 +00:00
Dimitry Andric
b09980d164 Merge llvm 3.6.0rc4 from ^/vendor/llvm/dist, merge clang 3.6.0rc4 from
^/vendor/clang/dist, resolve conflicts, and update patches.
2015-02-19 22:20:19 +00:00