Commit Graph

6028 Commits

Author SHA1 Message Date
Ed Maste
b0819f9877 Remove unused readline header
Readline is no longer installed after r268461.  A readline compatibility
header is provided by libedit, but readline definitions do not seem to
be used by LLDB anyhow.

Submitted by:	markj, Jan Beich
2014-07-11 07:31:55 +00:00
Simon J. Gerraty
5bcb74248e Update to bmake-20140620
Main change is detection of malformed variable references.

Reviewed by:	obrien
2014-07-08 22:27:50 +00:00
Cy Schubert
17ff561352 Fix compile-time errors when NO_WERROR and WITHOUT_INET6_SUPPORT
(NO_INET6) are specified.

Approved by:	glebius
MFC after:	1 week
2014-07-05 07:15:19 +00:00
Dimitry Andric
08e09c6e13 Fix breakage after r267981.
Pointy hat to:	dim
MFC after:	3 days
X-MFC-With:	r267981
2014-06-28 09:53:44 +00:00
Dimitry Andric
0506f5060d Add the llvm patch for r267981. 2014-06-27 20:45:17 +00:00
Dimitry Andric
96b9c77676 Pull in r211627 from upstream llvm trunk (by Bill Schmidt):
[PPC64] Fix PR20071 (fctiduz generated for targets lacking that
  instruction)

  PR20071 identifies a problem in PowerPC's fast-isel implementation
  for floating-point conversion to integer.  The fctiduz instruction
  was added in Power ISA 2.06 (i.e., Power7 and later).  However, this
  instruction is being generated regardless of which 64-bit PowerPC
  target is selected.

  The intent is for fast-isel to punt to DAG selection when this
  instruction is not available.  This patch implements that change.
  For testing purposes, the existing fast-isel-conversion.ll test adds
  a RUN line for -mcpu=970 and tests for the expected code generation.
  Additionally, the existing test fast-isel-conversion-p5.ll was found
  to be incorrectly expecting the unavailable instruction to be
  generated.  I've removed these test variants since we have adequate
  coverage in fast-isel-conversion.ll.

This is needed to compile clang with debug+asserts on older powerpc64
and ppc970 targets.

Requested by:	jhibbits
MFC after:	3 days
2014-06-27 20:41:12 +00:00
Xin LI
b6cee71de3 MFV r267843: update file/libmagic to 5.19.
MFC after:	2 weeks
2014-06-26 06:03:39 +00:00
Xin LI
d627d450b3 Fix multiple vulnerabilities in file(1) and libmagic(3).
Security:	FreeBSD-SA-14:16.file
Approved by:	so
2014-06-24 19:04:32 +00:00
John-Mark Gurney
a061720cbb convert to using pidfile... This prevents multiple wpa_supplicants
running at the same time causing problems w/ wifi not working..

the patch will be submitted upstream...  The next step if someone wants
to push it upstream is to break os_unix.c up so that all these other
utilities don't need libutil..

Reviewed by:	rpaulo
2014-06-22 10:00:33 +00:00
Dimitry Andric
c26daf53f5 Add the llvm patch for r267704. 2014-06-21 18:47:30 +00:00
Dimitry Andric
51297500ac Pull in r211435 from upstream llvm trunk (by Benjamin Kramer):
Legalizer: Add support for splitting insert_subvectors.

  We handle this by spilling the whole thing to the stack and doing the
  insertion as a store.

  PR19492. This happens in real code because the vectorizer creates
  v2i128 when AVX is enabled.

This fixes a "fatal error: error in backend: Do not know how to split
the result of this operator!" message encountered during compilation of
the net-p2p/libtorrent-rasterbar port.

Reported by:	Evgeniy <iron@mail.ua>
MFC after:	3 days
2014-06-21 18:22:23 +00:00
Gavin Atkinson
ad3afeea16 With the move away from GNATS, point end users to a better web page
detailing how to report bugs.

Hat:		bugmeister
MFC after:	3 days
2014-06-14 18:45:40 +00:00
Christian Brueffer
9c994dd922 MFp4: change 1191346
In print_header32_tok(), correct printing in the XML case.  This lead to
invalid XML files before.

PR:		176259
Submitted by:	zi
MFC after:	3 days
2014-06-14 12:17:45 +00:00
Edwin Groothuis
ee9da7b840 MFV of 267471, tzdata2014e
Fix historical data for Egypt.
Better prediction for future Egypt / Morocco changes.
Update to Cocos / Cook islands.
Fix historical data for Russia.
2014-06-14 11:34:39 +00:00
Edwin Groothuis
2289da4216 Undo commit r267455, which was done in the wrong directory. 2014-06-14 01:18:02 +00:00
Edwin Groothuis
9794e2874a Vendor import of tzdata2014e changes
Fix historical data for Egypt.
Better prediction for future Egypt / Morocco changes.
Update to Cocos / Cook islands.
Fix historical data for Russia.

Obtained from:	ftp://ftp.iana.org/tz/releases/
2014-06-13 23:56:47 +00:00
Xin LI
1fecd13ed1 Fix incorrect error handling in PAM policy parser. [SA-14:13] 2014-06-03 19:01:38 +00:00
Dag-Erling Smørgrav
d8229aaf73 Move libworker_event_done_cb() from libworker.h to worker.h. 2014-05-27 23:39:28 +00:00
Simon J. Gerraty
4d9f507db9 Portmgr no longer need the UL hack.
Reviewed by: obrien
2014-05-27 18:39:13 +00:00
Peter Wemm
228f8555ff Merge apr-1.4.8 -> apr-1.5.1 and update. 2014-05-27 07:15:14 +00:00
Peter Wemm
437480d4f5 Merge svn-1.8.8 -> 1.8.9 2014-05-27 04:59:53 +00:00
Peter Wemm
e8e5717ab4 Update serf 1.3.4 -> 1.3.5 2014-05-27 04:52:32 +00:00
Dimitry Andric
72c25e24e9 Add the clang patch for r266674. 2014-05-25 19:28:34 +00:00
Dimitry Andric
b742fcdab0 Pull in r209489 from upstream clang trunk (by Akira Hatanaka):
Fix a bug in xmmintrin.h.

  The last step of _mm_cvtps_pi16 should use _mm_packs_pi32, which is a function
  that reads two __m64 values and packs four 32-bit values into four 16-bit
  values.

  <rdar://problem/16873717>

MFC after:	3 days
2014-05-25 19:22:28 +00:00
Julio Merino
17a286a994 Change libatf-c and libatf-c++ to be private libraries.
We should not be leaking these interfaces to the outside world given
that it's much easier for third-party components to use the devel/atf
package from ports.

As a side-effect, we can also drop the ATF pkgconfig and aclocal files
from the base system.  Nothing in the base system needs these, and it
was quite ugly to have to get them installed only so that a few ports
could build.  The offending ports have been fixed to depend on
devel/atf explicitly.

Reviewed by:	bapt
2014-05-25 12:01:13 +00:00
Baptiste Daroussin
497dcf4c36 Update to 20140422 2014-05-25 00:13:29 +00:00
Baptiste Daroussin
2e8ed2b830 merge libucl 20140514
this version brings xpath-like interface for ucl objects
2014-05-24 23:46:41 +00:00
Dimitry Andric
a426b286c8 Add the clang patch for r265477. While here, add a description to the
patch for r263619, and unify all the URLs to point to svnweb.
2014-05-24 22:27:31 +00:00
Gregory Neil Shapiro
10b240b765 Update for sendmail 8.14.9 import
MFC after:	3 days
2014-05-22 04:41:11 +00:00
Gregory Neil Shapiro
4313cc8344 Merge sendmail 8.14.9 to HEAD
MFC after:	3 days
2014-05-22 04:39:17 +00:00
Gregory Neil Shapiro
4a67213fda Import sendmail 8.14.9 2014-05-22 03:45:17 +00:00
John Baldwin
2ea259616a Add support for the 'rdseed' instruction. 2014-05-18 03:57:54 +00:00
Dag-Erling Smørgrav
a5ad888aa5 Don't cast away the const qualifier. Fixes gcc build. 2014-05-16 15:32:16 +00:00
Dag-Erling Smørgrav
daf4c72f7e ldns_axfr_abort is apparently an undocumented API function. Unstaticize
and add a prototype + documentation to the relevant header.
2014-05-15 20:41:16 +00:00
Dag-Erling Smørgrav
d107305190 regenerate 2014-05-15 19:48:52 +00:00
Dag-Erling Smørgrav
ba769e8b8f diff reduction 2014-05-15 19:48:13 +00:00
Dag-Erling Smørgrav
ba51c05bed Remove dead files. 2014-05-15 15:22:32 +00:00
Dag-Erling Smørgrav
17d15b2511 Upgrade to latest ldns (1.6.17) and unbound (1.4.22).
MFC after:	3 weeks
2014-05-15 03:30:03 +00:00
Gavin Atkinson
60506f4770 Fix typo. Note that although this file is under contrib, it has diverged
sufficiently from upstream (including a full whitespace commit and large
portions rewritten) that this change does not move us further from the
upstream.

PR:		docs/186608
Submitted by:	Jamie Landeg-Jones <jamie@dyslexicfish.net>
MFC after:	3 days
2014-05-15 03:08:20 +00:00
Dag-Erling Smørgrav
79dd93c19f import unbound 1.4.22 2014-05-14 18:44:22 +00:00
Dag-Erling Smørgrav
65be028f32 import ldns 1.6.17 2014-05-14 18:41:34 +00:00
Edwin Groothuis
1f4a471ae7 MFV of 265975, tzdata2014c
- Egypt will go into DST on 15 May 2014
2014-05-13 21:25:59 +00:00
Dimitry Andric
85d60e68ac Upgrade our copy of llvm/clang to 3.4.1 release. This release contains
mostly fixes, for the following upstream bugs:

http://llvm.org/PR16365 http://llvm.org/PR17473 http://llvm.org/PR18000
http://llvm.org/PR18068 http://llvm.org/PR18102 http://llvm.org/PR18165
http://llvm.org/PR18260 http://llvm.org/PR18290 http://llvm.org/PR18316
http://llvm.org/PR18460 http://llvm.org/PR18473 http://llvm.org/PR18515
http://llvm.org/PR18526 http://llvm.org/PR18600 http://llvm.org/PR18762
http://llvm.org/PR18773 http://llvm.org/PR18860 http://llvm.org/PR18994
http://llvm.org/PR19007 http://llvm.org/PR19010 http://llvm.org/PR19033
http://llvm.org/PR19059 http://llvm.org/PR19144 http://llvm.org/PR19326

MFC after:	2 weeks
2014-05-12 18:45:56 +00:00
Ed Maste
f9688ceecf Merge -fstandalone-debug from Clang r198655:
Implement a new -fstandalone-debug option. rdar://problem/15685848
  It controls everything that -flimit-debug-info used to, plus the
  vtable type optimization. The old -fno-limit-debug-info option is now an
  alias to -fstandalone-debug and vice versa.

  Standalone is the default on Darwin until dtrace is updated to work with
  non-standalone debug info (rdar://problem/15758808).

  Note: I kept the LimitedDebugInfo name in CodeGenOptions::DebugInfoKind
  because NoStandaloneDebugInfo sounded even more confusing.
2014-05-07 00:51:24 +00:00
Xin LI
c4bf0d04c2 Don't reply monlist request when it's not enabled.
No objection from:	roberto (but all bugs are mine)
MFC after:	2 weeks
2014-05-06 21:34:01 +00:00
Bryan Drewery
b42dda4bbc - Add J command to help.
MFC after:	2 weeks
X-MFC-with:	r265249
2014-05-02 23:47:14 +00:00
Bryan Drewery
ee92dd81a5 - Add a hint for 'u' and 'J' command that '+' displays all.
MFC after:	2 weeks
2014-05-02 23:32:44 +00:00
Bryan Drewery
1b60f97272 Add -J command/flag to filter by jail name/jid. This will automatically
display the JID as well (the -j command/flag).

  0 displays host.
  + displays all.

MFC after:	2 weeks
Relnotes:	yes
2014-05-02 23:30:39 +00:00
Pedro F. Giffuni
cd85ba9385 gcc: fix strict alignment.
From the OpenBSD log:

x86-64 ABI requires arrays greater than 16 bytes to be aligned to
16byte boundary.  However, GCC 16-byte aligns arrays of >=16 BITS,
not BYTES.

This diff improves bug detectability for code which has local arrays
of [16 .. 127] bits:  in those cases SSP will now detect even 1-byte
overflows.

Obtained from:	OpenBSD (CVS rev 1.4)
MFC after:	1 week
2014-05-02 16:15:34 +00:00
Marius Strobl
b05e961602 Merge r133175 from upstream:
2008-03-13  Dennis Czeremin  <dennis.czeremin@smiths-heimann.com>

	PR libstdc++/35566
	* include/bits/stl_multimap.h (multimap<>::multimap(_InputIterator,
	_InputIterator)): Forward to _M_insert_equal, not _M_insert_unique.

This patch was GPL2 at the time and fixes a regression introduced with
the merge of GCC r129013 in FreeBSD r236829.

MFC after:	3 days
Sponsored by:	Bally Wulff Games & Entertainment GmbH
2014-04-29 11:31:22 +00:00
Warner Losh
98407b8bc2 Spell NO_PROFILE= as MK_PROFILE=no. 2014-04-25 19:25:26 +00:00
Ed Maste
48856c5130 Add patches corresponding to r264826 and r264827 2014-04-23 18:36:32 +00:00
Ed Maste
68c01aed8e Merge Clang r202185:
Debug info: Generate debug info for variadic functions.
  Paired commit with LLVM.

  rdar://problem/13690847

This merege includes changes to use the Clang 3.4 API (revisions
199686 and 200082) in lib/CodeGen/CGDebugInfo.cpp:

getParamType  -> getArgType
getNumParams  -> getNumArgs
getReturnType -> getResultType

Sponsored by:	DARPA, AFRL
2014-04-23 18:26:12 +00:00
Ed Maste
f7a2594032 Merge LLVM r202188:
Debug info: Support variadic functions.
  Variadic functions have an unspecified parameter tag after the last
  argument. In IR this is represented as an unspecified parameter in the
  subroutine type.

  Paired commit with CFE r202185.

  rdar://problem/13690847

  This re-applies r202184 + a bugfix in DwarfDebug's argument handling.

This merge includes a change to use the LLVM 3.4 API in
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:

DwarfUnit -> CompileUnit

Sponsored by:       DARPA, AFRL
2014-04-23 18:25:11 +00:00
Baptiste Daroussin
0c8de5b03c Update to byacc 20140409
Among all the modifications, this new byacc also solves a 14 year old bug [1]

PR:		bin/23254 [1]
Submitted by:	marka@nominum.com [1]
MFC after:	3 weeks
2014-04-23 05:57:45 +00:00
Baptiste Daroussin
b04a7a0baf Import libucl 0.4.0
Adapt pkg(7) to the new libucl API
2014-04-22 22:02:06 +00:00
Warner Losh
3bdf775801 NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
and finish the job. ncurses is now the only Makefile in the tree that
uses it since it wasn't a simple mechanical change, and will be
addressed in a future commit.
2014-04-13 05:21:56 +00:00
Dag-Erling Smørgrav
696bc4a741 Remove the names of the build host and user and the build date. This
still leaves the host OS and version, but these are harder to remove.

MFC after:	3 weeks
2014-04-12 18:01:25 +00:00
Xin LI
3ae0125a99 MFV r258194-264360: nc(1) from OpenBSD 5.5.
MFC after:	2 weeks
2014-04-11 22:12:31 +00:00
Dimitry Andric
f567f56ebf Update the llvm/clang patch for r264345. 2014-04-11 18:40:29 +00:00
Dimitry Andric
1ff3b1375f Amend r263891, by making clang default to DWARF2 debug info format for
all FreeBSD versions, not just 10.x and earlier.  Apparently too many
people seem to have trouble with post-1993 formats.

Also remove the related notes about messing with kernel configuration
files from UPDATING, which are now superfluous.

Requested by:	many
MFC after:	3 days
2014-04-11 16:51:35 +00:00
Dimitry Andric
aa5cdf0136 For GNU as, add two missing modes for each of the fcomip and fucomip
instructions.  Partially obtained from OpenBSD by Pedro Giffuni, while I
added the fcomip variants.

Apparently this should help with compiling certain variants of WebKit.

MFC after:	3 days
2014-04-07 21:12:09 +00:00
Andrew Turner
34c7b21956 Mark __fixdfdi/__aeabi_d2lz with COMPILER_RT_ABI so it uses the correct
calling convention for __aeabi_* functions.
2014-04-06 09:14:11 +00:00
Pedro F. Giffuni
8fb9488054 gcc: define __block when block support is enabled
This mimics the behaviour in clang and lets us build cleanly
the libdispatch port on platforms where the base gcc is still
the default compiler.

Bump __FreeBSD_version for ports.

Tested by:	theraven
MFC after:	3 days
2014-04-04 15:49:23 +00:00
Julio Merino
912eec3015 Add atf m4 files from the vendor branch.
These were originally deleted as "not important" but, actually we need them
in place if we want to be able to use autoconf on software that provides
atf-based tests.  (That includes being able to rebuild autotest from scratch
on the Kyua cluster machines, as the automated setup does.)
2014-04-01 13:47:08 +00:00
Jason Evans
2fff27f84c Update jemalloc to version 3.6.0. 2014-03-31 17:04:04 +00:00
Baptiste Daroussin
48f1ce6489 Convert an unused banner from skeleton.c into a comment.
It is added to every generated files and fix build at certain warning level with clang 3.4

Submitted by:	Thomas Dickey <dickey@his.com> (byacc upstream)
Spotted by:	glebius
2014-03-30 21:56:13 +00:00
Rui Paulo
6f51bc45db Enable all cryptocaps because net80211 can do software encryption.
MFC after:	1 week
2014-03-29 23:25:09 +00:00
Edwin Groothuis
bf5a54b201 MFV for 263899, tzdata2014b
- Update antartica.
- Comments about historical data for Hawaii.
- Update details for Crimea on 30 March
- Move location data Simferopol.
2014-03-29 04:15:11 +00:00
Dimitry Andric
29084b6a92 Add the llvm/clang patch for r263891. 2014-03-29 00:48:50 +00:00
Dimitry Andric
e46fd9f9bc Make clang default to DWARF2 debug info format for FreeBSD 10.x and
earlier.  For head, this commit does not change anything, but it is
purely meant to be MFC'd.

MFC after:	3 days
2014-03-29 00:25:27 +00:00
Dimitry Andric
d592e78278 Avoid "cc1: warning: is shorter than expected" when using GNU cpp in
combination with dtrace scripts, which have "#!/usr/sbin/dtrace -Cs"
shebang lines.  This is because dtrace positions the file pointer after
the shebang line, before passing the file to GNU cpp.

To fix the warning, adjust the size downwards by the current position,
after a bit of sanity checking.

Suggested by:	avg
MFC after:	1 week
2014-03-26 19:57:50 +00:00
Dimitry Andric
fedda9c678 Revert r263694, and apply a better fix to squelch unnecessary warnings
from clang about possible keywords being treated as identifiers for the
remainder of the translation unit (a.k.a. -Wkeyword-compat), when using
libstdc++ in combination with -Wsystem-headers.  This will not only fix
devd, but any C++ program using libstdc++.

MFC after:	3 days
X-MFC-With:	r263694
2014-03-26 19:31:33 +00:00
Ed Maste
52c52d38d5 lldb: Invoke PT_KILL from ProcessPosix::DoDestroy
We previously sent SIGKILL to the debuggee in DoDestroy, but did not
actually detach or kill via ptrace.  It seems that this somehow didn't
matter on Linux, but did on FreeBSD.

This would happen when quitting LLDB while stopped at a breakpoint, for
example.  The debuggee remained stopped in ptrace (with the signal
either pending or lost).  After a timeout of a second or two LLDB exits,
which caused the debuggee to resume and dump core from an unhandled
SIGTRAP.

BringProcessIntoLimbo is a poorly named wrapper for ptrace(PT_KILL)
which is the desired behaviour from DoDestroy.

http://llvm.org/pr18894

Sponsored by:	DARPA, AFRL
2014-03-24 01:21:37 +00:00
Andrew Turner
91d2d3dd54 Add the llvm/clang patch for r263619. 2014-03-23 14:06:09 +00:00
Andrew Turner
73279d4113 Add a new ARM TARGET_ARCH, armv6hf. This is considered experimental.
This targets the existing ARMv6 and ARMv7 SoCs that contain a VFP unit.
This is an optional coprocessors may not be present in all devices, however
it appears to be in all current SoCs we support.

armv6hf targets the VFP variant of the ARM EABI and our copy of gcc is too
old to support this. Because of this there are a number of WITH/WITHOUT
options that are unsupported and must be left as the default value. The
options and their required value are:
 * WITH_ARM_EABI
 * WITHOUT_GCC
 * WITHOUT_GNUCXX

In addition, without an external toolchain, the following need to be left
as their default:
 * WITH_CLANG
 * WITH_CLANG_IS_CC

As there is a different method of passing float and double values to
functions the ABI is incompatible with existing armv6 binaries. To use
this a full rebuild of world is required. Because no floating point values
are passed into the kernel an armv6 kernel with VFP enabled will work with
an armv6hf userland and vice versa.
2014-03-23 12:49:25 +00:00
Baptiste Daroussin
97bd480fe3 Update to 20140321
This brings schema validation

MFC after:	1 week
2014-03-22 17:28:14 +00:00
Andrew Turner
856c73664b Pull in r201662 from upstream clang trunk:
Add FreeBSD ARM EABI hard-float support

  Patch by Andrew Turner.
2014-03-22 09:23:13 +00:00
Glen Barber
5344d9d8bb - Update commit template to include 'Relnotes:' tag, to
help re@ track release notes candidates.

Discussed with:	re
Reviewed by:	peter
MFC after:	3 days
X-MFC-To:	stable/10 only
Sponsored by:	The FreeBSD Foundation
2014-03-20 18:44:37 +00:00
Dimitry Andric
a1f8ad145e Add separate patch files for all the customizations we have currently
applied to our copy of llvm/clang.  These can be applied in alphabetical
order to a pristine llvm/clang 3.4 release source tree, to result in the
same version used in FreeBSD.

This is intended to clearly document all the changes until now, which
mostly consist of cherry pickings from the respective upstream trunks,
plus a number of hand-written FreeBSD-specific ones.  Hopefully those
can eventually be cleaned up and sent upstream too.

MFC after:	1 week
X-MFC-With:	r263313
2014-03-18 22:07:45 +00:00
Dimitry Andric
3ca4ead75d Pull in r203311 from upstream llvm trunk (by Arnold Schwaighofer):
ISel: Make VSELECT selection terminate in cases where the condition type has to
  be split and the result type widened.

  When the condition of a vselect has to be split it makes no sense widening the
  vselect and thereby widening the condition. We end up in an endless loop of
  widening (vselect result type) and splitting (condition mask type) doing this.
  Instead, split both the condition and the vselect and widen the result.

  I ran this over the test suite with i686 and mattr=+sse and saw no regressions.

  Fixes PR18036.

With this fix the original problem case from the graphics/rawtherapee
port (posted in http://llvm.org/PR18036 ) now compiles within ~97MB RSS.

Reported by:	mandree
MFC after:	1 week
2014-03-18 19:35:26 +00:00
Dimitry Andric
4f00c8c645 Pull in r196939 from upstream llvm trunk (by Reid Kleckner):
Reland "Fix miscompile of MS inline assembly with stack realignment"

  This re-lands commit r196876, which was reverted in r196879.

  The tests have been fixed to pass on platforms with a stack alignment
  larger than 4.

  Update to clang side tests will land shortly.

Pull in r196986 from upstream llvm trunk (by Reid Kleckner):

  Revert the backend fatal error from r196939

  The combination of inline asm, stack realignment, and dynamic allocas
  turns out to be too common to reject out of hand.

  ASan inserts empy inline asm fragments and uses aligned allocas.
  Compiling any trivial function containing a dynamic alloca with ASan is
  enough to trigger the check.

  XFAIL the test cases that would be miscompiled and add one that uses the
  relevant functionality.

Pull in r202930 from upstream llvm trunk (by Hans Wennborg):

  Check for dynamic allocas and inline asm that clobbers sp before building
  selection dag (PR19012)

  In X86SelectionDagInfo::EmitTargetCodeForMemcpy we check with MachineFrameInfo
  to make sure that ESI isn't used as a base pointer register before we choose to
  emit rep movs (which clobbers esi).

  The problem is that MachineFrameInfo wouldn't know about dynamic allocas or
  inline asm that clobbers the stack pointer until SelectionDAGBuilder has
  encountered them.

  This patch fixes the problem by checking for such things when building the
  FunctionLoweringInfo.

  Differential Revision: http://llvm-reviews.chandlerc.com/D2954

Together, these commits fix the problem encountered in the devel/emacs
port on the i386 architecture, where a combination of stack realignment,
alloca() and memcpy() could incidentally clobber the %esi register,
leading to segfaults in the temacs build-time utility.

See also: http://llvm.org/PR18171 and http://llvm.org/PR19012

Reported by:	ashish
PR:		ports/183064
MFC after:	1 week
2014-03-18 19:23:41 +00:00
Ed Maste
0fcefb433d Update NetBSD Foundation copyrights to 2-clause BSD
The NetBSD Foundation states "Third parties are encouraged to change the
license on any files which have a 4-clause license contributed to the
NetBSD Foundation to a 2-clause license."

This change removes clauses 3 and 4 from copyright / license blocks that
list The NetBSD Foundation as the only copyright holder.

Sponsored by:	The FreeBSD Foundation
2014-03-18 01:40:25 +00:00
Robert Watson
b881b8be1d Update most userspace consumers of capability.h to use capsicum.h instead.
auditdistd is not updated as I will make the change upstream and then do a
vendor import sometime in the next week or two.

MFC after:	3 weeks
2014-03-16 11:04:44 +00:00
Dag-Erling Smørgrav
cf961c95e5 Remove lukemftpd. It was disconnected from the build in 2009.
MFC after:	3 days
2014-03-14 08:43:56 +00:00
Gleb Smirnoff
2c284d9395 Remove IPX support.
IPX was a network transport protocol in Novell's NetWare network operating
system from late 80s and then 90s. The NetWare itself switched to TCP/IP
as default transport in 1998. Later, in this century the Novell Open
Enterprise Server became successor of Novell NetWare. The last release
that claimed to still support IPX was OES 2 in 2007. Routing equipment
vendors (e.g. Cisco) discontinued support for IPX in 2011.

Thus, IPX won't be supported in FreeBSD 11.0-RELEASE.
2014-03-14 02:58:48 +00:00
Dimitry Andric
a0492a1142 Pull in r201021 from upstream libc++ trunk:
Fix for PR18735 - self-assignment for map/multimap gives incorrect
  results in C++03

(Please note: that is an LLVM PR identifier, not a FreeBSD one.)

Reported by:	rakuco
MFC after:	3 days
2014-03-13 23:09:48 +00:00
Dimitry Andric
5d2613ad28 Garbage collect the old way of adding the libstdc++ include directories
in clang's InitHeaderSearch.cpp.  This has been superseded by David
Chisnall's commit in r255321.

Moreover, if libc++ is used, the libstdc++ include directories should
not be in the search path at all.  These directories are now only used
if you pass -stdlib=libstdc++.

MFC after:	3 days
X-MFC-With:	r261991
2014-03-11 21:43:10 +00:00
Dimitry Andric
bffb01c6d1 Repair recognition of "CC" as an alias for the C++ compiler, since it
was silently broken by upstream for a Windows-specific use-case.

Apparently some versions of CMake still rely on this archaic feature...

Reported by:	rakuco
MFC after:	3 days
X-MFC-With:	r261991
2014-03-11 21:11:43 +00:00
Edwin Groothuis
890859c77b MFV of 263039, tzdata2014a:
- Fix historical info about asia/Zion, Ukraine
- Fiji starts DST at 02:00 instead of 03:00
- Turkey will move to DST at 31 March this year.
2014-03-11 20:32:23 +00:00
Dimitry Andric
9d9a79e53d Repair a few minor mismerges from r262261 in the clang-sparc64 project
branch.  This is also to minimize differences with upstream.

MFC after:	3 weeks
X-MFC-With:	r262613
2014-03-10 21:58:38 +00:00
Baptiste Daroussin
36c53d6700 Update libucl to 2014-03-03 2014-03-10 10:39:29 +00:00
Dimitry Andric
689f150570 Pull in r203007 from upstream clang trunk:
Don't produce an alias between destructors with different calling conventions.

  Fixes pr19007.

(Please note that is an LLVM PR identifier, not a FreeBSD one.)

This should fix Firefox and/or libxul crashes (due to problems with
regparm/stdcall calling conventions) on i386.

Reported by:	multiple users on freebsd-current
PR:		bin/187103
MFC after:	1 week
2014-03-05 22:43:30 +00:00
Dimitry Andric
ed6e732211 Pull in r199848 from upstream libc++ trunk:
Const qualify __mem_fn call operator

  QOI improvement.

  Differential Revision: http://llvm-reviews.chandlerc.com/D2059

This should help with building recent versions of Mesa.  See also:
https://bugs.freedesktop.org/show_bug.cgi?id=75505

Reported by:	dumbbell
MFC after:	3 days
2014-03-05 20:01:04 +00:00
Xin LI
42b10a37c6 MFV r253848 (mm):
Update vendor/xz from v5.0 branch to post-5.0.5

MFC after:	2 weeks
2014-03-04 21:51:11 +00:00
Xin LI
fd13916c8b Workaround a GCC warning to unbreak ARM build.
Reported by:	ian
2014-03-03 08:01:36 +00:00
Xin LI
73f0a83d68 MFV r262639: ncurses 5.9 20140222 snapshot.
Requested by:	bapt
2014-03-02 08:58:21 +00:00
Marcel Moolenaar
6df39cc949 Improve upon previous commit:
1.  Check return of mmap(2) (*)
2.  Avoid FD leak when fstat fails.
3.  Fix style(9).

(*) Pointed out by jmg@
2014-03-02 03:34:06 +00:00
Marcel Moolenaar
8c82820bc3 Revive support for /etc/issue, lost due revision 81963.
Obtained from:	Juniper Networks, Inc.
2014-03-02 00:47:47 +00:00
Xin LI
06bfebdedb MFV r262617: ncurses 5.9. 2014-02-28 23:48:13 +00:00
Dimitry Andric
e40a3fc365 Merge from head up to r262611. 2014-02-28 17:46:56 +00:00
Dimitry Andric
a1509b8a0e Pull in r196874 from upstream llvm trunk:
Fix a crash that occurs when PWD is invalid.

  MCJIT needs to be able to run in hostile environments, even when PWD
  is invalid. There's no need to crash MCJIT in this case.

  The obvious fix is to simply leave MCContext's CompilationDir empty
  when PWD can't be determined. This way, MCJIT clients,
  and other clients that link with LLVM don't need a valid working directory.

  If we do want to guarantee valid CompilationDir, that should be done
  only for clients of getCompilationDir(). This is as simple as checking
  for an empty string.

  The only current use of getCompilationDir is EmitGenDwarfInfo, which
  won't conceivably run with an invalid working dir. However, in the
  purely hypothetically and untestable case that this happens, the
  AT_comp_dir will be omitted from the compilation_unit DIE.

This should help fix assertions occurring with ports-mgmt/tinderbox,
when it is using jails, and sometimes invalidates clang's current
working directory.

Reported by:	decke
MFC after:	2 weeks
X-MFC-With:	r261991
2014-02-28 17:12:31 +00:00
Dimitry Andric
f264370f00 Pull in r202422 from upstream llvm trunk (by Roman Divacky):
Lower FNEG just like FABS to fneg[ds] and fmov[ds], thus avoiding
  expensive libcall. Also, Qp_neg is not implemented on at least
  FreeBSD. This is also what gcc is doing.
2014-02-27 23:17:00 +00:00
Dimitry Andric
bdc74e2bc0 Merge from head up to r262536. 2014-02-26 22:26:40 +00:00
Dimitry Andric
a7ba6e6eb5 Pull in r202179 from upstream clang trunk:
Pass the sparc architecture variant to the assembler.
2014-02-26 22:21:01 +00:00
Dimitry Andric
d7538a4458 Pull in r202177 from upstream clang trunk (by Roman Divacky):
Give sparcv9 the ability to set the target cpu. Change it from
  accepting -march which doesnt exist on sparc gcc to -mcpu. While here
  adjust a few tests to not write an unused temporary file.
2014-02-26 22:18:33 +00:00
Dag-Erling Smørgrav
69cfb77152 MFV (r262529): fix is_upper() predicate
MFC after:	1 week
2014-02-26 17:14:02 +00:00
Ed Maste
6ec4f0a5fa Update LLDB snapshot to upstream r202189
Highlights include (upstream revs in parens):

- Improvements to the remote GDB protocol client
  (r196610, r197579, r197857, r200072, and others)

- Bug fixes for big-endian targets
  (r196808)

- Initial support for libdispatch (GCD) queues in the debuggee
  (r197190)

- Add "step-avoid-libraries" setting
  (r199943)

- IO subsystem improvements (including initial work on a curses gui)
  (r200263)

- Support hardware watchpoints on FreeBSD
  (r201706)

- Improved unwinding through hand-written assembly functions
  (r201839)

- Handle DW_TAG_unspecified_parameters for variadic functions
  (r202061)

- Fix Ctrl+C interrupting a running inferior process
  (r202086, r202154)

- Various bug fixes for memory leaks, LLDB segfaults, the C++ demangler,
  ELF core files, DWARF debug info, and others.

Sponsored by:	DARPA, AFRL
2014-02-26 16:09:54 +00:00
Jason Evans
706d9bd159 Update jemalloc to version 3.5.1. 2014-02-26 02:36:59 +00:00
Ed Maste
6fcb82420b Update LLDB snapshot to upstream r202189
Highlights include:

- Support hardware watchpoints on FreeBSD
  (r201706)

- Improved unwinding through hand-written assembly functions
  (r201839)

- Handle DW_TAG_unspecified_parameters for variadic functions
  (r202061)

- Fix Ctrl+C interrupting a running inferior process
  (r202086, r202154)

- Various bug fixes, including to the remote GDB protocol client

Sponsored by:	DARPA, AFRL
2014-02-25 22:13:51 +00:00
Dimitry Andric
89c1656950 Pull in r202059 from upstream clang trunk (by Roman Divacky):
Implement getDwarfEHStackPointer() and initDwarfEHRegSizeTable() for sparcv9.

Enables the libgcc-specific undocumented __builtin_dwarf_sp_column() and
__builtin_init_dwarf_reg_size_table() builtins to be compiled for
sparc64.
2014-02-24 21:48:03 +00:00
Dimitry Andric
892620150f Merge from head up to r262415. 2014-02-23 23:33:11 +00:00
Dimitry Andric
b7024fa517 Pull in r201994 from upstream llvm trunk (by Benjamin Kramer):
SPARC: Implement TRAP lowering. Matches what GCC emits.

This lets clang emit "ta 5" for trap instructions on sparc64, instead of
emitting a call to abort(), making it possible to link the kernel.
2014-02-23 23:23:01 +00:00
Baptiste Daroussin
d0bfcaf83e Remove libyaml, it has been replaced by libucl 2014-02-23 22:27:14 +00:00
Baptiste Daroussin
c99fb5f907 Import libucl into head
UCL is heavily infused by nginx configuration as the example of a convenient
configuration system. However, UCL is fully compatible with JSON format and is
able to parse json files.

UCL is used by pkg(8) for its configuration file as well for the manifest format
in packages, it will be used in base for the pkg boostrap (signature checking
and configuration file parsing.)

libucl has been developped and is maintained by vsevolod@
2014-02-23 21:49:21 +00:00
Peter Wemm
562a345c5d Update serf-1.3.0 -> 1.3.4 - fixes multiple issues (see the CHANGES file)
including an SSL issue that turned up in the cluster with svn-1.8.8.
2014-02-22 01:19:47 +00:00
Dimitry Andric
b663c98c57 Pull in r201909 from upstream compiler-rt trunk (by Joerg Sonnenberger):
Introduce CRT_HAS_128BIT, currently for all __LP64__ platforms.
  Use it to enable the various functions for TI mode.

This makes sure the correct primitives are also built for sparc64.
2014-02-22 00:09:43 +00:00
Dimitry Andric
9bc21aae69 Merge from head up to r262311. 2014-02-21 22:54:35 +00:00
Dimitry Andric
52be84ca03 Pull in r197521 from upstream clang trunk (by rdivacky):
Use the integrated assembler by default on FreeBSD/ppc and ppc64.

Requested by:	jhibbits
MFC after:	1 month
X-MFC-With:	r261991
2014-02-21 20:55:34 +00:00
Baptiste Daroussin
461918e205 Fix build on i386 2014-02-21 16:14:40 +00:00
Baptiste Daroussin
22354f09c8 Fix build with gcc 2014-02-21 13:17:10 +00:00
Baptiste Daroussin
a9e8641da9 Import Dragonfly Mail Agent into base system
It is a small and lightweight Mail Transport Agent.
It accepts mails from locally installed Mail User Agents (MUA) and delivers the
mails either locally or to a remote destination. Remote delivery includes
several features like TLS/SSL support, SMTP authentication and NULLCLIENT.

Make dma conditional to new WITHOUT_DMA option and make it respect WITHOUT_MAIL

Reviewed by:	peter
Discussed with:	emaste, bz, peter
2014-02-21 07:26:49 +00:00
Dimitry Andric
f5e6413717 Similar to r211505 for x86, remove unneeded casts in inline assembly for
sparc64 from contrib/gcc/longlong.h, which are considered "heinous" GNU
extensions by clang.
2014-02-20 23:08:01 +00:00
Dimitry Andric
d8d5a32f12 Pull in r201718 from upstream llvm trunk:
Expand 64bit {SHL,SHR,SRA}_PARTS on sparcv9.

Submitted by:	rdivacky
2014-02-20 22:33:27 +00:00
Dimitry Andric
406f39d5fd Pull in r200453 from upstream llvm trunk:
Implement SPARCv9 atomic_swap_64 with a pseudo.

  The SWAP instruction only exists in a 32-bit variant, but the 64-bit
  atomic swap can be implemented in terms of CASX, like the other
  atomic rmw primitives.

Submitted by:	rdivacky
2014-02-20 22:31:45 +00:00
Dimitry Andric
e18c3d5a5a Import a whole bunch of clang trunk commits to enable self-hosting clang
3.4 on Sparc64 (commit descriptions left out for brevity):

r198311 r198312 r198911 r198912 r198918 r198923 r199012 r199034 r199037
r199188 r199399 r200452

Submitted by:	rdivacky
2014-02-20 21:59:15 +00:00
Dimitry Andric
48173d357a Import a whole bunch of llvm trunk commits to enable self-hosting clang
3.4 on Sparc64 (commit descriptions left out for brevity):

r196755 r198028 r198029 r198030 r198145 r198149 r198157 r198565 r199186
r199187 r198280 r198281 r198286 r198480 r198484 r198533 r198567 r198580
r198591 r198592 r198658 r198681 r198738 r198739 r198740 r198893 r198909
r198910 r199014 r199024 r199028 r199031 r199033 r199061 r199775 r199781
r199786 r199940 r199974 r199975 r199977 r200103 r200104 r200112 r200130
r200131 r200141 r200282 r200368 r200373 r200376 r200509 r200617 r200960
r200961 r200962 r200963 r200965

Submitted by:	rdivacky
2014-02-20 21:56:15 +00:00
Peter Wemm
f5f7a7f70a Import svn-1.8.8.
Highlights:
* Security fix for apache server plugin that we don't build or use
* sqlite performance improvements.
* bug fixes for edge cases and some other less common operations.
2014-02-20 19:48:47 +00:00
Ed Maste
bc7f8367e6 Clang/LLVM 3.4 compatibility for the LLDB snapshot
Revert commits that tracked Clang/LLVM API changes after the 3.4 branch
point:

  Git    SVN
3ad0a1a 199408
05be72c 199689
9ad47a9 200085
2014-02-18 20:31:51 +00:00
Ed Maste
12b93ac689 Update LLDB snapshot to upstream r201577
Highlights include:

- Improvements to the remote GDB protocol client
  (r196610, r197579, r197857, r200072)

- Bug fixes for big-endian targets
  (r196808)

- Initial support for libdispatch (GCD) queues in the debuggee
  (r197190)

- Add "step-avoid-libraries" setting
  (r199943)

- IO subsystem improvements (including initial work on a curses gui)
  (r200263)

- Various bug fixes for memory leaks, LLDB segfaults, the C++ demangler,
  ELF core files, DWARF debug info, and others.

Sponsored by:	DARPA, AFRL
2014-02-18 19:52:51 +00:00
Ed Maste
8584c88e4d Fix mismerge in r262121
A break statement was lost in the merge.  The error had no functional
impact, but restore it to reduce the diff against upstream.
2014-02-18 19:46:45 +00:00
Ed Maste
adacc0725e Update lldb for clang/llvm 3.4 import
This commit largely restores the lldb source to the upstream r196259
snapshot with the addition of threaded inferior support and a few bug
fixes.

Specific upstream lldb revisions restored include:
   SVN      git
  181387  779e6ac
  181703  7bef4e2
  182099  b31044e
  182650  f2dcf35
  182683  0d91b80
  183862  15c1774
  183929  99447a6
  184177  0b2934b
  184948  4dc3761
  184954  007e7bc
  186990  eebd175

Sponsored by:	DARPA, AFRL
2014-02-17 18:50:03 +00:00
Julio Merino
c9be23cfca Undefine HAVE_VSNPRINTF_IN_STD.
Should fix the build with g++/libstdc++.

This is what we used to do prior the import of atf 0.20 and the build worked
just fine with both libstdc++ and libc++.  Still investigating how to properly
fix this upstream so that we do not hit the same issue on the next import.
2014-02-16 21:53:33 +00:00
Dimitry Andric
f785676f2a Upgrade our copy of llvm/clang to 3.4 release. This version supports
all of the features in the current working draft of the upcoming C++
standard, provisionally named C++1y.

The code generator's performance is greatly increased, and the loop
auto-vectorizer is now enabled at -Os and -O2 in addition to -O3.  The
PowerPC backend has made several major improvements to code generation
quality and compile time, and the X86, SPARC, ARM32, Aarch64 and SystemZ
backends have all seen major feature work.

Release notes for llvm and clang can be found here:
<http://llvm.org/releases/3.4/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html>

MFC after:	1 month
2014-02-16 19:44:07 +00:00
Julio Merino
1a61beb054 MFV: Import atf-0.20. 2014-02-14 19:33:16 +00:00
Dimitry Andric
eed07a2ea1 An ABI incompatibility crept into the libc++ 3.4 import in r261283. It
was caused by upstream libc++ commit r194536, which aimed to make the
headers more standards-compliant, by making std::pair's copy constructor
trivial.  Unfortunately, this could cause certain C++ applications using
shared libraries built against the previous version of libc++ to crash.

Fix the ABI incompatibility by making std::pair's copy constructor
non-trivial again.

Please note: Any C++ applications or shared libraries built with libc++
between r261283 and this revision should be recompiled.

Reported by:	stefanf
MFC after:	3 weeks
X-MFC-With:	r261283
2014-02-12 18:14:49 +00:00
John-Mark Gurney
85e5839202 recognize the FreeBSD ARCH tag that is put on binaries like on armeb
EABI binaries...

MFC after:	1 week
2014-02-12 02:03:37 +00:00
Dimitry Andric
279c613d4d Pull in r200899 from upstream clang trunk:
Allow transformation of VariableArray to ConstantArray.

  In the following code:

     struct A { static const int sz; };
     template<class T> void f() { T arr[A::sz]; }

  the array 'arr' is represented as a variable size array in the template.
  If 'A::sz' gets value below in the translation unit, the array in
  instantiation can turn into constant size array.

  This change fixes PR18633.

  Differential Revision: http://llvm-reviews.chandlerc.com/D2688

This fixes "Assertion failed: (T::isKind(*this)), function castAs"
errors, which can occur when building the security/quantis port.

Reported by:	ale
MFC after:	3 days
2014-02-09 20:52:47 +00:00
Dimitry Andric
f18dc6922d Pull in upstream libcxxrt commit 8006101, which makes its cxxabi.h file
compilable just by itself.

PR:		kern/184019
MFC after:	3 days
2014-02-07 21:34:09 +00:00
Dimitry Andric
d45679747c Apply a cleaner solution for the sign warnings that can occur when
compiling libc++'s <locale> header with -Wsystem-headers on.

This has also been submitted upstream.

Reported by:	asomers
2014-02-07 21:17:20 +00:00
Eitan Adler
86a7dfc3e0 HEAD is not buildable for the past day. Commit a 'quick fix' in order to permit
buildworld to complete.

Reviewed by:	theraven
2014-02-07 18:10:34 +00:00
Baptiste Daroussin
968ba8fe77 Apply patch for CVE-2013-6393 [1] to fix heap-based buffer overflow when
parsing YAML tags.
Also apply a patch for hardenning the guards againt the issue

The only user in base in yaml is pkg(7) which uses the library a way that it is not affected

Submitted by:	delphij
Obtained from:	https://bugzilla.redhat.com/show_bug.cgi?id=1033990
MFC after:	3 days
Security:	CVE-2013-6393
2014-02-03 08:13:44 +00:00
Justin Hibbits
1d5f07dc97 Make gas accept any PowerPC instruction by default. This is a local change,
and will not be submitted upstream.

Discussed with:	nwhitehorn,rdivacky
MFC after:	1 month
2014-02-03 01:45:07 +00:00
Ulrich Spörlein
9837d07131 Merge mdocml v1.12.3 into head
MFC after:	2 weeks
2014-02-01 09:27:57 +00:00
Ulrich Spörlein
9e90c87023 Pull up vendor changes up to 2014-01-29
- move local overrides into mdoc.local
- syncs us with git commit 819839b66c80e8dabe6cb24ea6319c26c9a2be14

Discussed with: ru
MFC after: 2 weeks
2014-01-31 12:26:30 +00:00
Dimitry Andric
4f7ab58ee6 Import libc++ 3.4 release. This contains a lot of bugfixes, and some
preliminary support for C++1y.

MFC after:	3 weeks
2014-01-30 07:44:22 +00:00
Sergey Kandaurov
a24f107bb9 Ressurect the local change documenting
authpf's requirement for a mounted fdescfs(5).

PR:		docs/186250
MFC after:	1 week
2014-01-29 19:28:52 +00:00
Sergey Kandaurov
492a99a2fc Restore the Nx macro lost in transit.
This matches upstream.

PR:		186205
Submitted by:	naddy
MFC after:	3 days
2014-01-29 11:39:58 +00:00
Kai Wang
ca82a53f82 MFH@261240. 2014-01-28 19:12:31 +00:00
Warner Losh
0f39bd6aa0 Merge from vendor branch importing dtc git rev 6a15eb2350426d285130e4c9d84c0bdb6575547a 2014-01-27 19:37:35 +00:00
Simon J. Gerraty
0dede8b0ba Merge bmake-20140101 from vendor 2014-01-27 17:47:21 +00:00
Gregory Neil Shapiro
9d59bad1e4 Update for sendmail 8.14.8 import
MFC after:	5 days
2014-01-26 23:44:12 +00:00
Gregory Neil Shapiro
1689ae4380 Remove local FreeBSD workaround now that upstream project has a better fix.
MFC after:	5 days
2014-01-26 23:42:40 +00:00
Gregory Neil Shapiro
5dd76dd0cc Merge sendmail 8.14.8 to HEAD
MFC after:	5 days
2014-01-26 23:39:11 +00:00
Gregory Neil Shapiro
c1bfccf73e Import sendmail 8.14.8 2014-01-26 20:46:55 +00:00
Gregory Neil Shapiro
e2cd7d5314 Update link to vendor import instructions 2014-01-26 20:13:28 +00:00
Pedro F. Giffuni
321c39ba84 gcc: Add support for -Wmissing-prototypes in C++
Support for warnings about missing prototypes in C++ was added by Apple
GCC (Radar 6261539).  Most of the code crept into r260311 so it felt
natural to make use of it.

Obtained from:	Apple GCC - 5646
MFC after:	5 days
2014-01-26 02:36:06 +00:00
Pedro F. Giffuni
887bf737ad binutils: add support for Intel SMAP-related instructions
Add support for stac/clac instructions to manipulate the flag
that controls the behaviour of Intel's Supervisor Mode Access
Prevention (SMAP) feature.

Tested by:	dim
Obtained from:	OpenBSD
MFC after:	5 days
2014-01-26 00:37:21 +00:00
Dimitry Andric
43349674f1 Pull in r195679 from upstream llvm trunk:
Don't use nopl in cpus that don't support it.

  Patch by Mikulas Patocka. I added the test. I checked that for cpu names that
  gas knows about, it also doesn't generate nopl.

  The modified cpus:
  i686 - there are i686-class CPUs that don't have nopl: Via c3, Transmeta
         Crusoe, Microsoft VirtualBox - see
         https://bbs.archlinux.org/viewtopic.php?pid=775414
  k6, k6-2, k6-3, winchip-c6, winchip2 - these are 586-class CPUs
  via c3 c3-2 - see https://bugs.archlinux.org/task/19733 as a proof that
         Via c3 and c3-Nehemiah don't have nopl

PR:		bin/185777
MFC after:	3 days
2014-01-25 16:35:56 +00:00
Kai Wang
a36ae249b8 MFH@261151. 2014-01-25 14:02:02 +00:00
Kai Wang
ee3d625d72 Reapply r221569, r233401, r233524 and r255105: Add support for a few
ARM/MIPS ELF section types in _libelf_xlate_shtype().
2014-01-25 13:53:46 +00:00
Jason Evans
f921d10f48 Update jemalloc to version 3.5.0. 2014-01-23 02:47:36 +00:00
Kai Wang
2612af8d84 MFH@260988. 2014-01-21 20:48:02 +00:00
Kai Wang
2496d1b162 Remove trailing whitespace. 2014-01-21 20:17:10 +00:00
Hartmut Brandt
30b5118d51 Fix a problem with OBJECT IDENTIFIER encoding: need to check the
second subid to be less than 40, not the first when the first
subid is 0 or 1.
2014-01-21 16:49:54 +00:00
Kai Wang
945a2095f6 MFH@260917. 2014-01-20 19:38:44 +00:00
Kai Wang
bc5fce8d8f * Allow API dwarf_loclist_n() and dwarf_loclist() to be called with
attributes that have form DW_FORM_sec_offset.
* If the .debug_info section conforms to DWARF4, do not allow the value
  of attributes with form DW_FORM_data[48] to be used as section
  offset.
2014-01-19 13:42:49 +00:00
Kai Wang
255d921adc Add a sanity check: The provided offset for the desired location list
should not exceed the size of the .debug_loc section.
2014-01-19 13:38:40 +00:00
Kai Wang
9c016dc4b2 API dwarf_attrval_flag() should properly handle an attribute with
(DWARF4) form DW_FORM_flag_present which implicitly indicates the
presence of the attribute. Manual page is updated to reflect this
change.

Note that this was previously fixed in the old libdwarf.
2014-01-18 17:59:22 +00:00
Kai Wang
1201c6fd27 Fix typo: the public API dwarf_child() should return DW_DLV_NO_ENTRY
instead of DW_DLE_NO_ENTRY when a child DIE is not found.
2014-01-18 17:49:32 +00:00
Kai Wang
5371959e6f Fix a warning in libdwarf found by -Wmissing-variable-declarations. 2014-01-18 17:47:06 +00:00
Kai Wang
35b270102d Apply r241720 by ed:
Fix warnings found by -Wmising-variable-declarations.
2014-01-18 10:13:04 +00:00
Pedro F. Giffuni
3cb44b3f65 gcc: Drop useless objc change from r260311.
Among some of the objc changes from Apple that crept into r260311,
Radar 5355344 is incomplete and is not used since we don't carry
ObjC in the base system.

The dead code seems to have caused issues in some Tinderboxes so
get rid of it altogether.

Reported by:	luigi
MFC after:	9 days
2014-01-17 21:21:28 +00:00
Kai Wang
4e5c697507 Use FreeBSD's ELF headers instead of the elfdefinitions.h header which
comes with elftoolchain. This version of libelf doesn't need to be
portable; using FreeBSD's own ELF headers will avoid conflicts and
make integration easier.
2014-01-16 21:47:27 +00:00
Kai Wang
2de3b87a12 Copy libelf, libdwarf and common files from vendor/ to contrib/. 2014-01-15 22:30:48 +00:00
Xin LI
f3f38455ea Disable 'monitor' feature in ntpd by default.
Security:	FreeBSD-SA-14:02.ntpd
Approved by:	so
2014-01-14 18:59:00 +00:00
Xin LI
ecd241b619 Fix bsnmpd remote denial of service vulnerability.
Reported by:	dinoex
Submitted by:	harti
Security:	FreeBSD-SA-14:01.bsnmpd
Security:	CVE-2014-1452
2014-01-14 18:58:57 +00:00
Julio Merino
a62905a977 Add atf pkg-config files from the vendor branch.
These were originally deleted by mistake (because they were not yet being
installed) and are actually necessary.

This should have been part of r260576 but I missed committing this
directory.

MFC after:	5 days
2014-01-12 22:17:10 +00:00
Andrew Turner
0b55a5a4af Fix gcc with EABI on big-endian ARM by setting the endian correctly.
Without this gcc would generate byte loads for a little-endian core.

MFC after:	1 week
2014-01-12 15:35:03 +00:00
Julio Merino
b17b15d8ea Fix path to the process_helpers for the libatf-c++ tests.
Because we respect the FreeBSD src tree layout under /usr/tests, and because
the layout of the tests in the atf distfile does not match the former, the
tests for atf-c++ were not able to find the process_helper binary.

Fix this by explicitly hardcoding the right path in the FreeBSD test suite.

Obtained from:	atf (git 1f0e878f7f127741a3762883ef24aef317e239d5)
MFC after:	1 week
2014-01-10 23:41:01 +00:00
Julio Merino
6d732c66bc Use .cpp as the extension for temporary C++ files.
Using a .c extension for a C++ file raises the following warning, which
breaks our header file tests if the compiler is using -Werror as well:

c++: warning: treating 'c' input as 'c++' when in C++ mode, this
behavior is deprecated

Obtained from:	atf (git 3104010c2849330440cc0ce108ff341913433339)
MFC after:	3 days
2014-01-09 18:53:21 +00:00
Baptiste Daroussin
4b4a8fca31 Import byacc 20140101 which imports %token-table from bison allowing to build ntpd 2014-01-08 08:08:22 +00:00
Kevin Lo
5945b5f5ab Rename definition of IEEE80211_FC1_WEP to IEEE80211_FC1_PROTECTED.
The origin of WEP comes from IEEE Std 802.11-1997 where it defines
whether the frame body of MAC frame has been encrypted using WEP
algorithm or not.
IEEE Std. 802.11-2007 changes WEP to Protected Frame, indicates
whether the frame is protected by a cryptographic encapsulation
algorithm.

Reviewed by:	adrian, rpaulo
2014-01-08 08:06:56 +00:00
Pedro F. Giffuni
aacea395b4 gperf: reverse size_type patch from r258115.
Silencing the broken warning as done in r258139 renders the
code unreacheable. An option could've been to turn off the
warnings in gperf but given that the code is not being used
it is better to just revert the original change altogether.

This code was never MFC'd.
2014-01-07 01:40:49 +00:00
Pedro F. Giffuni
02f1bd6b8d Fix optimization bug.
GCC-PR rtl-optimization/34628
	* combine.c (try_combine): Stop and undo after the first combination
	if an autoincrement side-effect on the first insn has effectively
	been lost.

The issue was detected in OpenBSD but their fix was not very good. Huge
thanks to the upstream author, Eric Botcazou, for permitting the use of
this patch under GPLv2.

MFC after:	5 days
2014-01-06 00:52:39 +00:00
Warren Block
998db43a8d Fix a cut and paste error.
PR:		docs/184791
Submitted by:	Jamie Landeg Jones <jamie@dyslexicfish.net>
MFC after:	3 days
2014-01-05 23:28:03 +00:00
Pedro F. Giffuni
ab07951c0c gcc: backport some fixes from llvm-gcc
llvm-gcc backported some patches from gcc trunk:

http://gcc.gnu.org/ml/gcc-cvs/2007-05/msg00662.html
http://gcc.gnu.org/ml/gcc-cvs/2007-07/msg00019.html
http://gcc.gnu.org/ml/gcc-cvs/2007-08/msg00240.html
http://gcc.gnu.org/ml/gcc-cvs/2007-08/msg00493.html

The first two were always GPL2. The last two were
added after the GPL3 transition, but were written
by aaw@google.com and Rafael Espíndola got permission
to relicense them under the GPL2 for inclusion in
llvm-gcc.

This fixes GCC-PR c++/31749

Obtained from:	llvm-gcc (rev. 75463; GPLv2)
MFC after:	2 weeks
2014-01-05 20:33:44 +00:00
Pedro F. Giffuni
5bfc7db451 gcc: Add support for Apple's Block extension
Block objects [1] are a C-level syntactic and runtime feature. They
are similar to standard C functions, but in addition to executable
code they may also contain variable bindings to automatic (stack)
or managed (heap) memory. A block can therefore maintain a set of
state (data) that it can use to impact behavior when executed.

This port is based on Apple's GCC 5646 with some bugfixes from
Apple GCC 5666.3. It has some small differences with the support
in clang, which remains the recommended compiler.

Perhaps the most notable difference is that in GCC that __block
is not actually a keyword, but a macro. There will be workaround
for this issue in a near future. Other issues can be consulted in
the clang documentation [2]

For better compatiblity with Apple's GCC and llvm-gcc some related
fixes and features from Apple have been included. Support for the
non-standard nested functions in GCC is now off by default.

No effort was made to update the ObjC support since FreeBSD doesn't
carry ObjC in the base system, but some of the code crept in and
was more difficult to remove than to adjust.

Reference:
[1]
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Blocks/Articles/00_Introduction.html
[2]
http://clang.llvm.org/compatibility.html#block-variable-initialization

Obtained from:	Apple GCC 4.2
MFC after:	3 weeks
2014-01-05 00:43:28 +00:00
Pedro F. Giffuni
e1b3bb5380 libcpp: misc fixes from Apple's GCC.
Fixes some bugs detected by Apple:
#error with unmatched quotes
pragma mark

Obtained from:	Apple GCC 4.2 - 5553
MFC after:	1 week
2014-01-05 00:32:38 +00:00
Pedro F. Giffuni
d096f2f5a8 Revert r260073; small diff reduction wrt gcc43 and Apple GCC.
Unfortunately this causes ICE on powerpc and sparc64.

Reducing these differences against upstream is not important
anymore so hopefully I have finished breaking the compiler
occasionally.
2014-01-02 13:53:53 +00:00
Pedro F. Giffuni
1b9906c757 gcc: Fix issue with "unavailable" attribute.
While here, point where we dropped the support for objc from r260014.

MFC after:	3 weeks
2013-12-30 20:24:05 +00:00
Pedro F. Giffuni
fdcd8bc639 gcc: small diff reduction wrt gcc43 and Apple GCC.
Obtained from:	gcc 4.3 (rev. 121464, 122528, 124106; GPLv2)
MFC after:	3 weeks
2013-12-30 02:52:43 +00:00
Marcel Moolenaar
e153be43ae Fix cross-compilation of ia64 target code with clang. 2013-12-28 22:52:46 +00:00
Dimitry Andric
17c43f4276 In libc++'s type_traits header, avoid warnings (activated by our use of
-Wsystem-headers) about potential keyword compatibility problems, by
adding a __libcpp prefix to the applicable identifiers.

Upstream is still debating about this, but we need it now, to be able to
import clang 3.4.

MFC after:	3 days
2013-12-28 20:54:08 +00:00
Pedro F. Giffuni
2d278bb89e gcc: Add support for label attributes and "unavailable" attribute.
Apple GCC has extensions to support for both label attributes and
an "unavailable" attribute. These are critical for objc but are
also useful in regular C/C++.

Apparently at least the label attributes might have found their way to
upstream GCC but the code doesn't seem available on the GPLv2 tree so
we are taking the code directly from Apple. To make this clearer we
are preserving the annoying "APPLE LOCAL" tags and the ChangeLogs
when they are available.

Obtained from:	Apple GCC 4.2 - 5531
MFC after:	3 weeks
2013-12-28 20:30:31 +00:00
Pedro F. Giffuni
4707030025 gcc: merge small upstream change.
Backport from mainline:
2007-04-24  Hui-May Chang <hm.chang@apple.com>

* reload1.c (merge_assigned_reloads) : Do not merge a RELOAD_OTHER
instruction with a RELOAD_FOR_OPERAND_ADDRESS instruction.

Obtained from:	gcc 4.3 (rev. r124115: GPLv2)
MFC after:	1 week
2013-12-27 15:15:49 +00:00
Pedro F. Giffuni
99dee3f5ae gcc: Implement -Wmost for compatibility with clang.
This is equivalent to -Wall -Wno-parentheses.

Obtained from:	Apple GCC 4.2 - 5531
MFC after:	1 week
2013-12-26 18:09:16 +00:00
Dimitry Andric
f1e7930afc Pull in r183971 from upstream llvm trunk:
X86: cvtpi2ps is just an SSE instruction with MMX operands. It has no AVX
  equivalent.

  Give it the right register format so we can also emit it when AVX is enabled.

This should fix a "Cannot select: intrinsic %llvm.x86.sse.cvtpi2ps" fatal error
in clang while building the gnuradio port for amd64.

Reported by:	db
MFC after:	3 days
2013-12-25 20:58:02 +00:00
Pedro F. Giffuni
8adb8fac02 gcc: small enhancements for the arm support.
Very small updates: fixes GCC-PR target/31152

Tested by building the cross-compiler.

Obtained from:	gcc 4.3 (rev. r118461, 125973: GPLv2)
MFC after:	2 weeks
2013-12-25 16:01:48 +00:00
Pedro F. Giffuni
29c20022de gcc: Add ability to generate DWARF pubtypes section if
DEBUG_PUBTYPES_SECTION is defined.

Obtained from:	gcc 4.3 (rev. 118826; GPLv2)

MFC after:	2 weeks
2013-12-24 20:42:48 +00:00
Dimitry Andric
c807508f73 Get rid of register keyword usage in gperf, it is totally obsolete for
C++, and this allows gperf to be compiled for C++11 without a warning
about it.

MFC after:	3 days
2013-12-23 00:02:18 +00:00
Dimitry Andric
b71498e619 Apply upstream commit 33312fd828e59c78ae4ee30fd70d0ca109748cf0 (by
zoulasc) to contrib/file:

  don't write a char to a pointer.

MFC after:	3 days
2013-12-22 14:14:53 +00:00
Pedro F. Giffuni
860701960d gcc: warnings from -Wformat-security
Minor mismatch in r259666.

Obtained from:	Apple GCC 4.2 - 5646 (Radar 5764921)
MFC after:	1 week
2013-12-21 19:53:51 +00:00
Glen Barber
8c82632e0b Fix build with WITHOUT_CAPSICUM.
Submitted by:	dt71 gmx com
Sponsored by:	The FreeBSD Foundation
2013-12-21 12:45:35 +00:00
Pedro F. Giffuni
5c3c610835 gcc: clean some warnings from -Wformat-security
Obtained from:	Apple GCC 4.2 - 5646 (Radar 5764921)
MFC after:	1 week
2013-12-20 20:57:13 +00:00
Pedro F. Giffuni
b078889a6b Revert r259619:
Fixes GCC libstdc++/29286

The fix seems to work for amd64 but causes segfaults on powerpc.
At this time gcc is much more important on powerpc than on amd64.

Reported by:	andreast
2013-12-20 18:16:02 +00:00
Pedro F. Giffuni
cc1a345c65 gcc: revert Rvalue references.
They are very useful but at this time I prefer not to figure out
some  minor conflicts with the bigger Apple's blocks support
patch that is being worked on for current.
2013-12-20 18:09:34 +00:00
Pedro F. Giffuni
a5fd0716f8 gcc: merge upstream fix and new feature.
Fix for PR c++/29928

Add support for Rvalue references as described here:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html

Obtained from:	gcc 4.3 (rev. 124724, 125211; GPLv2)
MFC after:	2 weeks
2013-12-20 16:01:02 +00:00
Pedro F. Giffuni
62f78f3261 gcc: more diff reductions against Apple GCC.
Mostly cosmetical changes to aid further merges.

Obtained from:	gcc 4.3 (rev. 120611, 124839; GPLv2)
MFC after:	1 week
2013-12-20 14:56:52 +00:00
Edwin Groothuis
668615cd26 MFV of r259624, tzdata2013i
Removed support for solar-time-based time zones
Jordan stays at summer time this year.
Fix historical data for Cuba

Obtained from:  ftp://ftp.iana.org/tz/releases/
2013-12-19 20:19:57 +00:00
Pedro F. Giffuni
915b4b42ae gcc: backport upstream fix for issue with C++'s placement new
Fixes GCC libstdc++/29286

Obtained from:	gcc 4.3 (rev. 125603, 125653; GPLv2)
MFC after:	2 weeks
2013-12-19 18:27:32 +00:00
Pawel Jakub Dawidek
8ff3952b72 If we cannot connect to casperd we don't enter sandbox, but if we can connect
to casperd, but we cannot access the service we need we exit with an error.
This should not happen and just indicates some configuration error which
should be fixed, so we force the user to do it by failing.

Discussed with:	emaste
2013-12-19 00:51:48 +00:00
Pedro F. Giffuni
505ca70a65 gcc: add Apple compatible -Wnewline-eof
Fix document: "Apple compatible" suits better the origin.

MFC after:	1 week
2013-12-18 15:27:48 +00:00
Pedro F. Giffuni
cfbe5d01ee gcc: add Apple compatible -Wnewline-eof
GCC 4.2 and previous have always warned about
"No newline at end of file".

Upstream GCC removed the warning completely but
Apple made it an optional warning. Adopt it for
compatibility with older GCC and clang.

While here, add comment to complement r258712.

Obtained from:	Apple Inc. (Apple GCC 4.2 - 5531)
MFC after:	1 week
2013-12-18 14:53:36 +00:00
Pedro F. Giffuni
9596cafea0 gcc: point to our address for bug reports.
As recommended by the FSF in gcc/version.c :

"If you distribute a modified version of GCC, please change
this to refer to a document giving instructions for reporting
bugs to you, not us."

MFC after:	2 weeks
2013-12-18 00:10:30 +00:00
Pedro F. Giffuni
2dcaa2963d gcc: small merges from upstream
Solves GCC issues:
PR middle-end/32602
PR middle-end/32603

Updates the to documentation and processing
improvement.

Obtained from:	gcc 4.3 (rev. 119427, 126278, 126422; GPLv2)
MFC after:	2 weeks
2013-12-17 23:31:51 +00:00
Pedro F. Giffuni
5244c21dd0 gcc: fix ICE in rs600 when using -fno-trapping-math.
Solve build issue with previous change.

Obtained from:	gcc 4.3 (rev. 120902; GPLv2)
MFC after:	2 weeks
2013-12-17 21:39:40 +00:00
Pedro F. Giffuni
08fd2c8bd7 gcc: fix ICE in rs600 when using -fno-trapping-math.
Solves GCC-PR target/30485

Obtained from:	gcc 4.3 (rev. 120902; GPLv2)
MFC after:	2 weeks
2013-12-17 20:53:22 +00:00
Dimitry Andric
b177d064d7 Pull in r197399 from upstream clang trunk:
Add bit_FXSAVE as an alias for bit_FXSR, for gcc compat.

MFC after:	3 days
2013-12-17 07:59:00 +00:00
Benjamin Kaduk
1871769f1f tzfile.5: catch up to r204333
The stdtime sources were moved from lib/libc to contrib/tzcode, and tzfile.h
is not an installed header, so the man page refers to its location in the
source tree.

The documentation could be more clear about the internal nature of the
header, but those changes should go through upstream tzcode.

PR:	docs/176864
Approved by:	hrs (mentor)
2013-12-16 01:58:12 +00:00
Pawel Jakub Dawidek
197731f68f Make use of casperd's system.dns service when running without the -n option.
Now tcpdump(8) is sandboxed even if DNS resolution is required.

Sponsored by:	The FreeBSD Foundation
2013-12-15 23:02:36 +00:00
Dimitry Andric
8b3d3bafec Use correct casts in gcc's emmintrin.h for the first arguments of the
following builtin functions:

* __builtin_ia32_pslldi128() takes __v4si instead of __v8hi
* __builtin_ia32_psllqi128() takes __v2di instead of __v8hi
* __builtin_ia32_psradi128() takes __v4si instead of __v8hi

This should fix the following errors when building the LINT kernel with
gcc:

sys/crypto/aesni/aesni_wrap.c:191: error: incompatible type for argument 1 of
'__builtin_ia32_psradi128'
sys/crypto/aesni/aesni_wrap.c:195: error: incompatible type for argument 1 of
'__builtin_ia32_pslldi128'

MFC after:	3 days
2013-12-08 23:24:32 +00:00
Dimitry Andric
0514e96282 Pull in r196658 from upstream clang trunk:
CodeGen: Don't emit linkage on thunks that aren't emitted because they're
  vararg.

  This can happen when we're trying to emit a thunk with available_externally
  linkage with optimization enabled but bail because it doesn't make sense for
  vararg functions.

  [LLVM] PR18098.

This should fix clang "Broken module found, compilation aborted" errors when
building the qt4-based dvbcut port.

Reported by:	se
MFC after:	3 days
2013-12-08 13:56:26 +00:00
Pedro F. Giffuni
5dab84a07c gcc: new fvisibility-ms-compat option
Obtained from:	gcc 4.3 (rev. 126088; GPLv2)
MFC after:	3 weeks
2013-12-08 03:02:44 +00:00
Peter Wemm
37d5a7cdf8 Vendor import nvi-2.1.2-c80f493b038 a multikey mapping fix
PR:		bin/182463
2013-12-08 00:08:03 +00:00
Dimitry Andric
914afe13c2 Pull in r196590 from upstream clang trunk (by rdivacky):
Move the body of GCCInstallationDetector ctor into an init() function
  and call it from its only user. The linux toolchain. This saves quite
  a lot of directory searching on other platforms.

See http://docs.freebsd.org/cgi/mid.cgi?51E6FAF5.3080802 for the
original discussion.  With this fix, the search for gcc installations is
completely eliminated on FreeBSD.

Reported by:	Kurt Lidl <lidl@pix.net>
MFC after:	3 days
2013-12-07 00:05:45 +00:00
Pedro F. Giffuni
36543c3739 gcc: Include types in error message for build_binary_op.
Mostly cosmetic change, again to reduce differences with Apple's gcc.

Obtained from:	gcc 4.3 (rev. 125239; GPLv2)
MFC after:	3 weeks
2013-12-06 02:19:58 +00:00
Pedro F. Giffuni
1aa997ff6a gcc: Add -flax-vector-conversions
Obtained from:	gcc 4.3 (rev. 120572, 120688; GPLv2)
2013-12-05 21:22:51 +00:00
Pedro F. Giffuni
0a56d1d88d gcc: On rs6000 update sp_offset depending only on size.
This fixes a nasty bug introduced in r258651.

Reported and tested by:	Justin Hibbits
Obtained from:		gcc pre-4.3 (rev. 125116; GPLv2)
MFC after:		2 weeks
2013-12-04 21:17:39 +00:00
Ed Maste
a4849615b2 Update LLDB to upstream r196322 snapshot
Upstream revisions of note:
r196298 - Fix use of std::lower_bound
r196322 - Fix log message for new invalidation checks

Sponsored by:	DARPA, AFRL
2013-12-03 22:26:38 +00:00
Ed Maste
04c171520d lldb: Threaded inferior support for FreeBSD
This is in the process of being submitted to the upstream LLDB
repository.  The thread list functionality is modelled in part on
GDBRemoteCommunicationClient.

LLDB bug pr16696 and code review D2267

Sponsored by:	DARPA, AFRL
2013-12-03 21:29:45 +00:00
Ed Maste
b952cd584f Update LLDB to upstream r196259 snapshot
Sponsored by:	DARPA, AFRL
2013-12-03 19:23:54 +00:00
Ed Maste
9151c81ccb Workaround lldb issue with main module base address
On FreeBSD lldb sometimes reloads the the main module's (executable's)
symbols at the wrong address.  Work around this for now by explicitly
reloading at base_address=0 when it happens.

A proper fix is needed but early testers have reported this issue so
this workaround should allow them to make further progress.

http://llvm.org/bugs/show_bug.cgi?id=17880
2013-12-03 18:12:51 +00:00
Pawel Jakub Dawidek
42a8595256 Please welcome casperd daemon. It (and its services) will be responsible for
giving access to functionality that is not available in capability mode
sandbox. The functionality can be precisely restricted.

Start with the following services:
- system.dns - provides API compatible to:
	- gethostbyname(3),
	- gethostbyname2(3),
	- gethostbyaddr(3),
	- getaddrinfo(3),
	- getnameinfo(3),
- system.grp - provides getgrent(3)-compatible API,
- system.pwd - provides getpwent(3)-compatible API,
- system.random - allows to obtain entropy from /dev/random,
- system.sysctl - provides sysctlbyname(3-compatible API.

Sponsored by:	The FreeBSD Foundation
2013-12-02 08:21:28 +00:00
Pedro F. Giffuni
51e28103da libcpp: Merge fixes from upstream
GCC preprocessor/29966:
* macro.c (lex_expansion_token): Save and restore cpp_reader's
cur_token.
(_cpp_create_definition): Don't restore cur_token here.
* lex.c (_cpp_lex_token): Added assertion.

GCC preprocessor/28709:
* macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.

GCC c/31924
* expr.c (interpret_float_suffix): Check for invalid suffix.

GCC preprocessor/14331
* lex.c (_cpp_get_fresh_line):  Don't warn if no newline at EOF.

Fixup whitespacing

Obtained from:	gcc per-4.3 (rev. 121340, 124356, 124358, 124730,
				  125212, 125255 ; GPLv2)
MFC after:	3 weeks
2013-12-02 03:47:08 +00:00
Pedro F. Giffuni
6d94bd07cc libiberty: upstream updates.
There is a new ChangeLog.gcc43 file but most notable:

* floatformat.c (get_field): Fix segfault with little-endian word
  order on 64-bit hosts.
  (put_field): Likewise.
  (min): Move definition.

gcc/cp/ChangeLog
2007-05-04  Geoffrey Keating  <geoffk@apple.com>

  PR 31775
  * mangle.c (write_mangled_name): Mangle static variable names.
  (write_unqualified_name): Use local-source-name for
  namespace-scope static variables.
(Completes FreeBSD's r258017 )

Obtained from:	gcc 4.3 (rev. 118552, 120097, 20698, 120702,
			 121364, 122972, 126588; GPLv2)
MFC after:	2 weeks
2013-12-01 22:08:19 +00:00
Pedro F. Giffuni
5b1674597f gcc: upstream alignment cleanups.
This solves GCC/32617 and contributes to reduce differences with
Apple's gcc42.

Complete some references in the ChangeLog while here.

Obtained from:	gcc 4.3 (rev. 126529, 126588; GPLv2)
MFC after:	3 weeks
2013-11-29 18:46:02 +00:00
Pedro F. Giffuni
9a252f0990 gcc: Make use of TREE_OVERFLOW_P.
While it was brought in r258179 only to fix a build issue,
bringing the rest of the change has the advantage of fixing
GCC/19978.

Obtained from:	gcc 4.3 (rev. 120505; GPLv2)
MFC after:	1 week
2013-11-29 05:00:07 +00:00
Pedro F. Giffuni
729f64d6ae libcpp: fix an underflow.
Obtained from:	OpenBSD (Rev 1.2)
MFC after:	2 weeks
2013-11-28 16:36:03 +00:00
Konstantin Belousov
0615c93b2c Use sysctl KERN_PROC_SIGTRAMP to retrieve the signal trampoline
location for the native amd64 ABI.  This fixes unwinding over the
signal frame after trampoline was moved to the shared page.

The code would be more correct if using sysctl for the target process
instead of inspecting gdb' own trampoline, but the current change is
least intrusive and currently, we always initialize the native ABI
sysvec first, which means that trampoline location for FreeBSD/amd64
ABI is relatively stable.

Similar change will benefit libunwind.

Analyzed by:	avg
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2013-11-26 19:54:12 +00:00
Matthew D Fleming
9b76499a0b Fix a segfault / internal compiler error.
Among other causes, when gcc throws a warning before parsing any tokens,
the cur_token pointer is at the beginning of malloc'd memory.
Dereferencing cur_token[-1] can cause a segfault.

Code taken from OpenBSD
http://www.openbsd.org/cgi-bin/cvsweb/src/gnu/gcc/libcpp/errors.c
which was a more complete fix than the one I originally coded.

MFC after:	1 week
2013-11-26 17:11:43 +00:00
Pedro F. Giffuni
346d5f0202 Forced commit to note that r258652 is actually:
gcc: Move conditions before an assert.

It is a bit cleaner to check the conditions before calling the assertion.
It also preserves the style from the rest of the code.
This is just a cosmetical change to match better what both Apple's gcc42
and Android's gcc-4.2.1 do.
2013-11-26 15:18:40 +00:00
Pedro F. Giffuni
db8e31dfdd gcc: Altivec register adjustments from Apple.
Obtained from:	gcc pre-4.3 (rev. 124763; GPLv2)
MFC after:	3 weeks
2013-11-26 14:58:37 +00:00
Pedro F. Giffuni
7b0d23ce5a gcc: Altivec register adjustments from Apple.
Obtained from:	gcc pre-4.3 (rev. 124763; GPLv2)
MFC after:	3 weeks
2013-11-26 14:52:29 +00:00
Dimitry Andric
ce67429848 Pull in r195558 from upstream clang trunk:
Fix a SSE2 intrinsics typo

  Full discourse at:

   http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131104/092514.html
   http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-November/068124.html

  Patch by Dimitry Andric and Alexey Dokuchaev!

Reported by:	danfe
MFC after:	3 days
2013-11-26 08:07:45 +00:00
Peter Wemm
a5b9d9b723 Import apr-util-1.5.3 from vendor branch (rr258600)
This is a minor bug fix release.
2013-11-25 22:20:34 +00:00
Pedro F. Giffuni
340b342723 MFV: removes strict-aliasing warnings from GCC in tcpdump.
Reported by:	tinderbox (gjb)
Submitted by:	glebius
MFC after:	2 weeks
2013-11-25 18:46:08 +00:00
Peter Wemm
949ef25c23 Import svn-1.8.5. This contains a user-visible fix for svn:externals
handling (there are no svn:externals in freebsd repo), and two security
fixes for modules that we don't build for the apache http server stack.
2013-11-25 17:52:16 +00:00
Pedro F. Giffuni
b5e1e9602d libcpp: Keep a record of changes from upstream GCC (pre-43).
This makes it easier to track the changes in the rare event of the code
being distributed without access to version control.

MFC after:	3 weeks
2013-11-24 20:54:52 +00:00
Pedro F. Giffuni
81e5b01765 gcc: Bring updates from Google's enhanced gcc-4.2.1.
Google released and enhanced version of gcc-4.2.1 plus their local
patches for Android[1].

The patches are owned by Google and the license hasn't been changed
from  the original GPLv2. We are only bringing a subset of the
available patches that may be helpful in FreeBSD. Changes specific
to android are not included.

From the README.google file[1].

Patches applied to google_vendor_src_branch/gcc/gcc-4.2.1:

gcc/Makefile.in
gcc/c-common.c
gcc/c-common.h
gcc/c-opts.c
gcc/c-typeck.c
gcc/cp/typeck.c
gcc/doc/invoke.texi
gcc/flags.h
gcc/opts.c
gcc/tree-flow.h
gcc/tree-ssa-alias-warnings.c
gcc/tree-ssa-alias.c

 Backport of -Wstrict-aliasing from mainline.
  Silvius Rus <rus@google.com>

gcc/coverage.c:
  Patch coverage_checksum_string for PR 25351.
  Seongbae Park <spark@google.com>
  Not yet submitted to FSF.

gcc/c-opts.c
gcc/c-ppoutput.c
gcc/c.opt
gcc/doc/cppopts.texi
libcpp/Makefile.in
libcpp/directives-only.c
libcpp/directives.c
libcpp/files.c
libcpp/include/cpplib.h
libcpp/init.c
libcpp/internal.h
libcpp/macro.c
  Support for -fdirectives-only.
  Ollie Wild <aaw@google.com>.
  Submitted to FSF but not yet approved.

libstdc++-v3/include/ext/hashtable.h
  http://b/742065
  http://b/629994
  Reduce min size of hashtable for hash_map, hash_set from 53 to 5

libstdc++-v3/include/ext/hashtable.h
  http://b/629994
  Do not iterate over buckets if hashtable is empty.

gcc/common.opt
gcc/doc/invoke.texi
gcc/flags.h
gcc/gimplify.c
gcc/opts.c
  Add Saito's patch for -finstrument-functions-exclude-* options.

gcc/common.opt
gcc/doc/invoke.texi
gcc/final.c
gcc/flags.h
gcc/opts.c
gcc/testsuite/gcc.dg/Wframe-larger-than.c
  Add a new flag -Wframe-larger-than- which enables a new warning
  when a frame size of a function is larger than specified.
  This patch hasn't been integrated into gcc mainline yet.

gcc/tree-vrp.c
  Add a hack to avoid using ivopts information for pointers starting
  at constant values.

Reference:

[1]
https://android.googlesource.com/toolchain/gcc/+/master/gcc-4.2.1/

Obtained from:	Google Inc.
MFC after:	3 weeks
2013-11-23 18:32:53 +00:00