Commit Graph

7058 Commits

Author SHA1 Message Date
Ed Maste
e5c4075f6b elfcopy: map all !alnum characters to '_' in binary input symbol names
This matches bfd and gold.

Obtained from:	ELF Tool Chain r3445
Sponsored by:	The FreeBSD Foundation
2016-04-20 19:13:00 +00:00
Wojciech Macek
d4015ddc57 Fix KGDB backtrace on ARM
Modify trapframe decoding to properly analyze trapframe.

Provide method for fixup_pc. It happens, that in some kernel
functions, the GDB stack frame decoder cannot determine both
func name and frame size. This is because these functions
either contain invalid instruction, or their format does
not match standard schema. Detect that scenarios and move
PC accordingly to jump into known function schema, which
GDB is able to parse.

Obtained from:         Semihalf
Sponsored by:          Juniper Networks
Reviewed by:           kib, zbb
Differential Revision: https://reviews.freebsd.org/D5976
2016-04-20 17:58:13 +00:00
Xin LI
3e41d09d08 MFV r298178:
Update file to 5.26.

MFC after:	2 weeks
Relnotes:	yes
2016-04-18 07:36:24 +00:00
Baptiste Daroussin
d9f0ce3190 Import libucl 0.8.0 2016-04-17 21:30:40 +00:00
Baptiste Daroussin
d915215ec6 Import sqlite3 3.12.1 2016-04-17 21:23:14 +00:00
Dimitry Andric
0a2e997d7b Until it has been properly fixed upstream, apply a temporary workaround
for LLVM PR 26999 (in some cases, -save-temps can cause an assertion
failure in clang's -cc1as stage).
2016-04-17 15:48:19 +00:00
Glen Barber
8276572f42 Remove the RCSID line from ntp_control.c, and set the fbsd:nokeywords
property.  This should have been done a while back (certainly before
mergeing projects/release-pkg to head), but I fixed the merge conflicts
and forgot to correct the real problem afterward.

Noticed by:	peter
Sponsored by:	The FreeBSD Foundation
2016-04-16 18:10:11 +00:00
Glen Barber
0edd2576c0 MFH
Sponsored by:	The FreeBSD Foundation
2016-04-16 02:32:12 +00:00
Ed Maste
d938d64e55 elfcopy: fix symbol table handling when sections come after symtab/strtab
Fix a symbol table handling bug in elfcopy: elfcopy puts .symtab,
  .strtab and .shstrtab sections in the end of the output object.  If
  the input objects have more sections after any of these 3 sections,
  the section table will be reordered, and in that case the section
  symbols should be regenerated for relocations.

  The bug is triggered since newer clang puts .strtab section in the
  beginning of the object produced.

   Ticket: #525

Reported by:	royger
Obtained from:	ELF Tool Chain r3443
2016-04-15 19:06:36 +00:00
Phil Shafer
42ff34c310 Import to 0.6.1
0.5.0:
    document "trim" modifier
    add xo_emit_field functions
    Add xo_set_file{,_h} functions
    Fix LIBXO_* variables; add -L and -I as needed
    add --disable-silent-rules and an explicit make; s/PACKAGE-NAME/PACKAGE_NAME/; add /download/ to 'url'
    fix silliness where xo_flush_h emitted closing tag (html); make the caller (xo_message) do it
    flush after transitions; fix flush call in xo_do_emit
    mkdir the version-specific packaging dir
    use "XO_" instead of LIBXO_

  0.6.0:
    Add --with-retain-size to set the size (in bits) of the retain hash buckets
    Add The Argument Modifier ({a:})
    Add retain and no-retain to --libxo
    autoconf: Add test for monitor.h
    Document quote heuristic
    go deep with nroff backslashes
    Use "ULL" for 32 bit check
    add xo_retain_clear and xo_retain_clear_all
    docs: combine two 'handles' section; move command line argument section
    handle GETTEXT when msgfmt isn't where it's supposed to be (FreeBSD)
    make 'retain' a flag (XOEF_RETAIN) instead of a role; it's simpler, and doesn't feel as tacky. "{R:}" was painful to document, which means it's painful to use.
    new xo_emit_f functions
    nuke some unused UNUSEDs
    test code: path must be static
    update test cases

  0.6.1:
    fix version number (missed a commit during new-release)

Reviewed by:	sjg
Approved by:	sjg (mentor)
2016-04-15 18:46:15 +00:00
Phil Shafer
a321cc5dc9 import libxo-0.4.7
Fix bug w/ {e:} in html, where no default encoding format was built
    docs: "t" == "trim" (typo) (cf svn commit: r290445 - head/contrib/libxo/libxo)

Reviewed by:	sjg
Approved by:	sjg (mentor)
2016-04-15 15:50:13 +00:00
Cy Schubert
4bb37cd3af Static pointers need not be initialized.
MFC after:	4 weeks
2016-04-15 03:45:09 +00:00
Cy Schubert
ff34412a50 Use NULL instead of 0 for pointer comparison.
MFC after:	4 weeks
2016-04-15 03:43:16 +00:00
Pedro F. Giffuni
ab341f7afd libpcap: fix for simple NULL pointer dereference.
Found with devel/coccinelle.
2016-04-14 18:31:45 +00:00
Glen Barber
9c831bbd69 MFH
Sponsored by:	The FreeBSD Foundation
2016-04-13 02:04:09 +00:00
Phil Shafer
90d30dd1a9 Merge libxo 0.4.6
Reviewed by: sjg
Approved by: sjg (mentor)
2016-04-12 23:30:56 +00:00
Glen Barber
876d357fa7 MFH
Sponsored by:	The FreeBSD Foundation
2016-04-11 15:24:59 +00:00
Enji Cooper
fa2201def5 Disable the NetBSD-specific EFAULT requirements test in gettimeofday_err
FreeBSD doesn't specifically list this as a supported error, and in some
configurations/versions of FreeBSD, this test will segfault as the memory
address might be evaluated in userspace, instead of in kernel space like
in NetBSD.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2016-04-07 06:21:33 +00:00
Glen Barber
d60840138f MFH
Sponsored by:	The FreeBSD Foundation
2016-04-04 23:55:32 +00:00
Dimitry Andric
faaf0c6eaa Pull in r255683 from upstream libc++ trunk (by Eric Fiselier):
[libcxx] Enable noexcept for GCC 4.6 and greater

  Summary:
  This patch allows GCC 4.6 and above to use `noexcept` as opposed to
  `throw()`.

  Is it an ABI safe change to suddenly switch on `noexcept`? I imagine
  it must be because it's disabled in w/ clang in C++03 but not C++11.

  Reviewers: danalbert, jroelofs, mclow.lists

  Subscribers: cfe-commits

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

This should fix errors from gcc 4.6 and higher when compiling llvm-cov
and/or other llvm tools.

Reported by:	bdrewery
2016-03-27 21:20:43 +00:00
Dimitry Andric
35b9ea3d09 Compile libcxxrt as C++11, since it is only really used in combination
with libc++, which is also C++11.  Also change one _Static_assert (which
is really C11) back into static_assert, like upstream.

This should help when compiling libcxxrt with newer versions of gcc,
which refuse to recognize any form of static assertions, if not
compiling for C++11 or higher.

While here, add -nostdinc++ to CFLAGS, to prevent picking up any C++
headers outside the source tree.
2016-03-27 00:37:54 +00:00
Dimitry Andric
c2145983aa Pull in r264465 from upstream llvm trunk (by David Majnemer):
[X86] Emit a proper ADJCALLSTACKDOWN in EmitLoweredTLSAddr

  We forgot to add the second machine operand to our ADJCALLSTACKDOWN,
  resulting in crashes in PEI.

  This fixes PR27071.

This should fix an assertion failure during buildworld, when using -Os,
and targeting either i386 directly, or building the 32-bit libraries on
amd64.

Reported by:	Eric Camachat <eric.camachat@gmail.com>
2016-03-26 17:38:15 +00:00
Jung-uk Kim
20afc491bb Merge byacc 20160324. 2016-03-25 22:32:26 +00:00
Bryan Drewery
e7e6b1ebc8 Make GCC happy by removing empty #elif.
Sponsored by:	EMC / Isilon Storage Division
2016-03-25 04:16:04 +00:00
Bryan Drewery
8bca825d5d Fix off-by-one found by GCC 5.3.2.
This was fixed during refactoring in the upstream infiniband-diags 1.5.3.

Sponsored by:	EMC / Isilon Storage Division
2016-03-24 21:48:16 +00:00
Dimitry Andric
1d640d3b42 Pull in r264335 from upstream llvm trunk:
Add <atomic> to ThreadPool.h, since std::atomic is used

  Summary:
  Apparently, when compiling with gcc 5.3.2 for powerpc64, the order of
  headers is such that it gets an error about std::atomic<> use in
  ThreadPool.h, since this header is not included explicitly.  See also:

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

  Fix this by including <atomic>.  Patch by Bryan Drewery.

  Reviewers: chandlerc, joker.eph

  Subscribers: bdrewery, llvm-commits

  Differential Revision: http://reviews.llvm.org/D18460
2016-03-24 20:55:23 +00:00
Ed Maste
676e25ab0f elfcopy: overhaul of LMA handling
Merge ELF Tool Chain r3434:

    Previously, elfcopy defines:

    VMA:  section virtual address
    LMA:  PHDR(p_vaddr)

    While binutils(libbfd) defines:

    VMA:  section virtual address and PHDR(p_vaddr).
    LMA:  PHDR(p_paddr)

    For elfcopy, p_paddr is considered not meaningful and is always set
    to the same value as p_vaddr.

    elfcopy was implemented that way because I thought p_paddr is not
    used/meaningful according to the ELF ABI. However it turned out
    p_paddr is at least used in some ELF files, e.g. the FreeBSD kernel.

    This change made elfcopy treat p_paddr as LMA, same as libbfd.

    (However, some VMA/LMA related command line option still need tweaking
    to make them compatible with binutils objcopy. This will be improved
    later)

    Ticket: #524

And typo fixes in r3435 and r3436.

This fixes the Xen kernel build.

Submitted by:	kaiw
Tested by:	royger
2016-03-24 20:13:17 +00:00
Navdeep Parhar
8d814a458c iw_cxgbe/libcxgb4: Pull in many applicable fixes from the upstream Linux
iWARP driver and userspace library to the FreeBSD iw_cxgbe and libcxgb4.

This commit includes internal changesets 6785 8111 8149 8478 8617 8648
8650 9110 9143 9440 9511 9894 10164 10261 10450 10980 10981 10982 11730
11792 12218 12220 12222 12223 12225 12226 12227 12228 12229 12654.

Submitted by:	Krishnamraju Eraparaju @ Chelsio
Sponsored by:	Chelsio Communications
2016-03-21 00:29:45 +00:00
Simon J. Gerraty
3bebe7293b Update to bmake-20160315
Archive member handling works again
meta mode, treat missing reads as for writes.

Update dirdeps.mk - much improved startup time.
Update meta.stage.mk - avoid ln when chmod required.
2016-03-18 20:03:09 +00:00
David E. O'Brien
d20ec2e52b Bring down 0.4.5 vendor files and other catchups with the distribution tarball.
Reviewed by:	phil
2016-03-16 23:59:29 +00:00
Phil Shafer
0263a1a1bc Move generated file from contrib to build directory.
Reviewed by:	obrien
Approved by:	sjg
2016-03-16 23:50:41 +00:00
Gleb Smirnoff
bf840a1707 Redo r294869. The array of counters for TCP states doesn't belong to
struct tcpstat, because the structure can be zeroed out by netstat(1) -z,
and of course running connection counts shouldn't be touched.

Place running connection counts into separate array, and provide
separate read-only sysctl oid for it.
2016-03-15 00:15:10 +00:00
Glen Barber
538354481e MFH
Sponsored by:	The FreeBSD Foundation
2016-03-14 18:54:29 +00:00
Enji Cooper
45dc13f1ea Better handle filesystems mounted with -o noexec
ftruncate/11, open/20, and truncate/11 copy sleep(1) to a temporary file on the
target filesystem, execute the binary, then expect a result. This doesn't work
with scenarios where the target binary cannot be executed, e.g. the filesystem
was mounted with -o noexec.

Ensure the filesystem hasn't been mounted with -o noexec for the testcases
before executing them.

Differential Revision: https://reviews.freebsd.org/D5622
MFC after: 1 week
Reviewed by: markj
Sponsored by: EMC / Isilon Storage Division
2016-03-12 19:41:38 +00:00
Dimitry Andric
9132599001 Pull in r250279 from upstream libc++ trunk (by Eric Fiselier):
Fix GCC atomic implementation in C++03

Pull in r250802 from upstream libc++ trunk (by Eric Fiselier):

  Detect relaxed constexpr rules for gcc versions

Pull in r255585 from upstream libc++ trunk (by Eric Fiselier):

  Fix various GCC mis-configurations for newer versions.

  This patch goes through and enables C++11 and C++14 features for newer GCC's.
  The main changes are:

  1. Turn on variable templates. (Uses __cpp_variable_templates)
  2. Assert atomic<Tp> is trivially copyable (Uses _GNUC_VER >= 501).
  3. Turn on trailing return support for GCC. (Uses _GNUC_VER >= 404)
  4. XFAIL void_t test for GCC 5.1 and 5.2. Fixed in GCC 6.

Together, these should fix building clang 3.8.0 as part of building
world with recent versions of gcc (e.g. the devel/*-xtoolchain-gcc
ports).
2016-03-11 22:56:16 +00:00
Ed Maste
a87342e849 libelf: correct byte count in cross-endian note translation
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-03-11 22:37:12 +00:00
Dimitry Andric
163c8ab66f Pull in r246280 from upstream libc++ trunk (by Eric Fiselier):
Fix most GCC warnings during build. Only -Wattribute left.

This helps to fix a number of -Werror warnings when building world with
recent versions of gcc (e.g. the devel/*-xtoolchain-gcc ports).
2016-03-11 20:30:06 +00:00
Ed Maste
1e248b8346 libdwarf: fix SHT_REL relocation processing
Relocation of type SHT_REL must use the current value as addend.

PR:		204084
Obtained from:	NetBSD libdwarf_elf_init.c v1.4
2016-03-11 16:24:39 +00:00
Dag-Erling Smørgrav
a2d0006e29 Apply upstream r3651: the IPv6 address of the L root has changed. 2016-03-11 14:57:40 +00:00
Simon J. Gerraty
be19d90b61 Merge bmake-20160307 2016-03-11 01:35:39 +00:00
Glen Barber
7d536dc855 MFH
Sponsored by:	The FreeBSD Foundation
2016-03-10 21:16:01 +00:00
Bryan Drewery
30924962f4 Fix and connect setjmp test.
Sponsored by:	EMC / Isilon Storage Division
2016-03-09 22:45:04 +00:00
Glen Barber
b655ec9752 MFH
Sponsored by:	The FreeBSD Foundation
2016-03-06 04:13:17 +00:00
Dimitry Andric
1dcfcfee2a Convert two llvm source files to native line ending, which was also done
upstream.  Merging doesn't automatically do this, unfortunately.
2016-03-05 21:10:34 +00:00
Dimitry Andric
e74e149f78 Upgrade our copies of clang, llvm, lldb and compiler-rt to 3.8.0
release.

Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11
support to build; see UPDATING for more information.

Release notes for llvm and clang will soon be available here:
<http://llvm.org/releases/3.8.0/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.8.0/tools/clang/docs/ReleaseNotes.html>

Thanks to Ed Maste, Roman Divacky, Davide Italiano and Antoine Brodin
for their help.

Relnotes:	yes
2016-03-05 20:24:31 +00:00
Dag-Erling Smørgrav
f61ef7f679 Upgrade to Unbound 1.5.8. 2016-03-05 19:29:18 +00:00
Dag-Erling Smørgrav
5bcd892e61 import unbound 1.5.8 2016-03-05 19:18:07 +00:00
Dimitry Andric
a36b180a7f Merge ^/head r296369 through r296409. 2016-03-05 15:34:54 +00:00
Bryan Drewery
be50838f9a DIRDEPS_BUILD: Connect ofed.
Sponsored by:	EMC / Isilon Storage Division
2016-03-04 22:37:44 +00:00
Bryan Drewery
fc064a5e78 Update libsdp to the latest 1.1.108-0.17.ga6958ef.
The only relevant change here is the support for IPv6 in the config
file.  The previous version of this supported IPv6 but not in the
config.  The change for that ended up removing __sdp_sockaddr_to_sdp
which the IPV4 config code required; the IPv6 fix resolved the lack of
that symbol.

Note that the ChangeLog was lacking entries for which we already had the
changes for, which itself was an upstream bug.

Obtained from:	https://www.openfabrics.org/downloads/libsdp/libsdp-1.1.108-0.17.ga6958ef.tar.gz
Sponsored by:	EMC / Isilon Storage Division
2016-03-04 22:37:31 +00:00
Bryan Drewery
1465ae5d7f Fix missing symbol program_invocation_short_name.
This fixes runtime when logging is enabled.

Sponsored by:	EMC / Isilon Storage Division
2016-03-04 22:37:25 +00:00
Bryan Drewery
400b94bbeb Fix over/under-linking in contrib/ofed.
Sponsored by:	EMC / Isilon Storage Division
2016-03-04 22:37:09 +00:00
Ed Maste
f5e9c916af elfcopy: fail if debug link target is empty
An empty debug link target previously returned a confusing and incorrect
error like "objcopy: fread failed: No error: 0". Now, return an explicit
error.

GNU objcopy allows an empty file as the debug link target. However,
that case is nonsensical so diverging from GNU behaviour is fine.

Reviewed by:	bdrewery
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5541
2016-03-04 18:28:19 +00:00
Dimitry Andric
82aa34e6fa Merge ^/head r296007 through r296368. 2016-03-03 23:15:46 +00:00
Dimitry Andric
1b9b7a135c Update llvm and clang to 3.8.0 release. 2016-03-03 22:50:52 +00:00
Pedro F. Giffuni
316e599449 MFV r296350:
Split each domain again after striping any trailing dot.

Reported by:	 dumbbell
Obtained from:	openresolv (53416cf1b4)
2016-03-03 15:36:00 +00:00
Jason Evans
cbc3697dda Restore support for decay time of -1 (no decay). 2016-03-03 01:43:36 +00:00
Jason Evans
cb2ababcfd Add a cast to prevent a compiler warning. 2016-03-03 01:30:28 +00:00
Glen Barber
52259a98ad MFH
Sponsored by:	The FreeBSD Foundation
2016-03-02 16:14:46 +00:00
Ruslan Bukin
ac8f9de31a Restore configuration for RISC-V. 2016-03-01 17:43:06 +00:00
Jung-uk Kim
0f86d14e9e Merge byacc 20150711. 2016-02-29 21:39:00 +00:00
Jason Evans
df0d881d94 Update jemalloc to 4.1.0.
Add missing Symbol.map entry for __aligned_alloc.

Add weak-->strong symbol binding for
{malloc_stats_print,mallctl,mallctlnametomib,mallctlbymib} -->
{__malloc_stats_print,__mallctl,__mallctlnametomib,__mallctlbymib}.  These
bindings complete the set necessary to allow applications to replace all
malloc-related symbols.
2016-02-29 19:10:32 +00:00
Edward Tomasz Napierala
bb487d2b79 Mark amd(8) and all related utilities as obsolete.
Reviewed by:	wblock@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5443
2016-02-29 16:45:10 +00:00
Pedro F. Giffuni
c364f33426 MFV r296164:
Update openresolve to version 3.7.3 including:

 *  Save the initial working directory and change to it just before
     running any scripts.
     This avoids scripts putting files accidently where they shouldn't.
 *  Strip trailing dot from search and domain names.
 *  man page improvements.

Relnotes:	yes
2016-02-29 14:46:39 +00:00
Mariusz Zaborski
c501d73c7e Convert casperd(8) daemon to the libcasper.
After calling the cap_init(3) function Casper will fork from it's original
process, using pdfork(2). Forking from a process has a lot of advantages:
1. We have the same cwd as the original process.
2. The same uid, gid and groups.
3. The same MAC labels.
4. The same descriptor table.
5. The same routing table.
6. The same umask.
7. The same cpuset(1).
From now services are also in form of libraries.
We also removed libcapsicum at all and converts existing program using Casper
to new architecture.

Discussed with:		pjd, jonathan, ed, drysdale@google.com, emaste
Partially reviewed by:	drysdale@google.com, bdrewery
Approved by:		pjd (mentor)
Differential Revision:	https://reviews.freebsd.org/D4277
2016-02-25 18:23:40 +00:00
Dimitry Andric
09a17a1e45 Update llvm and clang to release_38 branch r261684. 2016-02-24 22:07:56 +00:00
Dimitry Andric
ada6aca3cc Undo r295543, since the shrink wrapping bug was fixed upstream by Davide
Italiano and Quentin Colombet.
2016-02-24 21:41:28 +00:00
Dimitry Andric
14e9c9161c Merge ^/head r295902 through r296006. 2016-02-24 21:38:51 +00:00
Glen Barber
86b234d2f5 MFH
Sponsored by:	The FreeBSD Foundation
2016-02-23 16:01:34 +00:00
Xin LI
876964d12a MFV r295913:
Partially apply upstream changeset 6e06b1c8 (kientzle).

Limit filter recursion level to 25 (instead of infinite).  This fixes a
potential crash issue discovered by Alexander Cherepanov.

PR:		207362
Reported by:	Robert Clausecker
Obtained from:	libarchive github project
2016-02-23 07:13:22 +00:00
Dimitry Andric
76f3831738 Merge ^/head r295845 through r295901. 2016-02-22 22:21:53 +00:00
Dimitry Andric
72e8ce06c0 Fix a problem in ld, causing it to sometimes print messages similar to
"invalid string offset 65521 >= 27261 for section `.strtab'". for object
files produced by recent versions of clang.

In BFD's elf_create_symbuf() function, the size of the symbol buffer
('ssymbuf') is not calculated correctly, and the initial value for the
'ssym' variable is off by one, since 'ssymbuf' has shndx_count + 1
members.

MFC after:	1 week
2016-02-22 22:16:32 +00:00
Glen Barber
317cec3c43 MFH
Sponsored by:	The FreeBSD Foundation
2016-02-22 12:28:23 +00:00
Dimitry Andric
ac1ec6334e Update compiler-rt to release_38 branch r261369. 2016-02-21 16:27:55 +00:00
Dimitry Andric
ce479d84f4 Update llvm and clang to release_38 branch r261369. 2016-02-21 16:23:44 +00:00
Ian Lepore
e1ba387e11 Unconditionally set e_ident[OSABI]=ELFOSABI_FREEBSD in arm binary headers.
When the armv6 support was imported from a project branch, this complex
conditional logic and related #define'd values came along, but it's really
not clear what the intent of it all was.  The effect, however, was that
OSABI was always set to zero, which is "UNIX System V ABI".  Having the wrong
value there causes pkg(8) to avoid looking inside arm elf binaries to
determine shared-lib required/provides info for packaging.
2016-02-21 14:59:24 +00:00
Dimitry Andric
9893f787ec Merge ^/head r295601 through r295844. 2016-02-21 13:49:26 +00:00
Glen Barber
72c3aa02dc MFH
Sponsored by:	The FreeBSD Foundation
2016-02-18 00:37:58 +00:00
Ed Maste
3884d6f8bd Allow elfcopy to convert between two non-ELF formats
If the output object is not an ELF file, choose an arbitrary ELF format
for the intermediate file. srec, ihex and binary formats are independent
of class, endianness and machine type so these choices do not affect the
output.

ELF Tool Chain ticket #517

Reviewed by:	kai
Obtained from:	ELF Tool Chain r3411
2016-02-16 14:03:25 +00:00
Glen Barber
0fe0fe112f MFH
Sponsored by:	The FreeBSD Foundation
2016-02-15 21:58:52 +00:00
Dimitry Andric
90a4726375 Merge ^/head r295544 through r295600. 2016-02-13 16:02:12 +00:00
Dimitry Andric
a8bcc4d878 Update llvm, clang and lldb to release_38 branch r260756. 2016-02-13 15:58:51 +00:00
Ed Maste
839529caa9 Update ELF Tool Chain to upstream rev 3400
Some notable improvements include:

readelf:
- Add AArch64 relocation definitions.
- Report value of unknown relocation types.

elfcopy:
- Consider symbols with STB_GNU_UNIQUE binding as global symbols.
- Fixed support for VMA adjustment for loadable sections found
  in relocatable objects.
- Handle nameless global symbols.
- Improve wildcard matching for !-prefixed symbols.
- Add PE/COFF support.

elfdump:
- Improve section type reporting.
- Add MIPS-specific section types.

This update also includes a significant number of bug fixes.

PR:		207091 [exp-run]
Sponsored by:	The FreeBSD Foundation
2016-02-12 20:54:02 +00:00
Dimitry Andric
4156ce4fed Merge ^/head r295351 through r295543. 2016-02-11 20:07:09 +00:00
Dimitry Andric
5529affd65 For now, disable shrink-wrapping (a new optimization pass that computes
the safe point to insert the prologue and epilogue of the function) on
X86.  This prevents problems with some functions using TLS, such as in
jemalloc, and which was the cause for Address Sanitizer crashes.  The
correct fix is still being discussed upstream.
2016-02-11 20:00:22 +00:00
Dag-Erling Smørgrav
0de4f1bf64 Use the new insecure-lan-zones option instead of listing each AS112 zone
separately.

MFC after:	3 days
2016-02-11 17:37:02 +00:00
Glen Barber
bbb51924bb MFH
Sponsored by:	The FreeBSD Foundation
2016-02-08 12:16:01 +00:00
Dimitry Andric
a49d8b6ecc Merge ^/head r294961 through r295350. 2016-02-06 14:07:17 +00:00
Dimitry Andric
f8ca070d3a Merge compiler-rt release_38 branch r258968.
Note that there is still a problem on amd64, causing SIGBUS in the early
startup of Address Sanitizer.  This is being investigated.
2016-02-06 13:39:20 +00:00
Ed Maste
baed4bab22 readelf: decode AArch64 TLS descriptor relocations
From ELF for the ARM(R) 64-bit Architecture, table 4-19.

Obtained from:	ELF Tool Chain r3386
Sponsored by:	The FreeBSD Foundation
2016-02-05 20:57:21 +00:00
Ed Maste
03a5ea47c0 readelf: report value of unknown relocation types
Obtained from:	ELF Tool Chain r3387
Sponsored by:	The FreeBSD Foundation
2016-02-05 20:56:11 +00:00
Ed Maste
23541160bb readelf: avoid accidental fallthrough in RISC-V relocations
This would have printed an unknown RISC-V relocation type as a SPARC
relocation.

CID:		1331398
Obtained from:	ELF Tool Chain r3283
Sponsored by:	The FreeBSD Foundation
2016-02-05 20:54:51 +00:00
Bjoern A. Zeeb
ce42ce038e Try to fix a bug introduced in r228623. We started to copy the ifa_msghdr
as otherwise platforms with strict alignment would break.  It's unclear
to me if there's also a problem with access to the address list following
the structure.  However we never copied the address list after the structure
and thus are pointing at random memory.  For now just use a pointer to the
original memory for accessing the address list making it at least work on
platforms with weak memory access.

PR:			195445
Reported by:		wolfgang lyxys.ka.sub.org
Tested by:		wolfgang lyxys.ka.sub.org (x86)
MFC after:		3 days
2016-02-03 11:03:44 +00:00
Glen Barber
221b349912 MFH
Sponsored by:	The FreeBSD Foundation
2016-02-02 22:27:48 +00:00
Pedro F. Giffuni
2d004dd5bc MFV r295109:
Update openresolve to version 3.7.2

Relnotes:	yes
2016-02-02 21:10:43 +00:00
Maxim Sobolev
1d854f3d3e Root out files that don't really belong here and could in fact screw
you over if you happen to use git for FreeBSD development, as it is
the case with the unbound/.gitignore, which lits files that are
actually required for the buildworld.

MFC after:	1 day
2016-02-02 19:04:40 +00:00
Hans Petter Selasky
b340491939 Use LIBADD instead of LDADD.
Sponsored by:	Mellanox Technologies
2016-02-02 11:36:58 +00:00
Enji Cooper
833525a88a Add #include <string.h> to mute warning from clang/gcc about implicitly
declaring strcmp(3)

MFC after: 1 month
Reported by: Jenkins
Sponsored by: EMC / Isilon Storage Division
2016-02-01 07:09:08 +00:00
Glen Barber
c8296cbb96 MFH
Sponsored by:	The FreeBSD Foundation
2016-01-29 14:52:54 +00:00
Dimitry Andric
752d00608c Merge ^/head r294777 through r294960. 2016-01-27 22:52:20 +00:00
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