Commit Graph

6028 Commits

Author SHA1 Message Date
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
Dimitry Andric
56510193f0 Revert r258455 for now, as it apparently causes miscompilation in some
situations.  Until this is fully resolved, the X.org workaround in ports
still needs to take place.
2013-11-22 17:54:53 +00:00
Dimitry Andric
711f10ae9f Pull in r195318 from upstream llvm trunk:
The basic problem is that some mainstream programs cannot deal with the way
  clang optimizes tail calls, as in this example:

  int foo(void);
  int bar(void) {
  return foo();
  }

  where the call is transformed to:

   calll .L0$pb
  .L0$pb:
   popl  %eax
  .Ltmp0:
   addl  $_GLOBAL_OFFSET_TABLE_+(.Ltmp0-.L0$pb), %eax
   movl  foo@GOT(%eax), %eax
   popl  %ebp
   jmpl  *%eax                   # TAILCALL

  However, the GOT references must all be resolved at dlopen() time, and so this
  approach cannot be used with lazy dynamic linking (e.g. using RTLD_LAZY), which
  usually populates the PLT with stubs that perform the actual resolving.

  This patch changes X86TargetLowering::LowerCall() to skip tail call
  optimization, if the called function is a global or external symbol.

This fixes problems with loading X.org driver modules, which could occur
when X.org was compiled on i386 with tailcall optimization on, for which
ports r312583 was committed as a workaround.  After this change, the
workaround can be removed.

MFC after:	3 days
2013-11-21 23:09:07 +00:00
Brooks Davis
19fa1aa698 Sync with NetBSD. The funtional change is to make the output when
comparing a directory to an mtree file more compatible with fmtree when
FreeBSD 9 compatiblity mode is on.  This output is clearly intended for
humans not computers, but some tools such as mergemaster's -U option rely
on it.

MFC after:	3 days
2013-11-21 19:29:41 +00:00
Pedro F. Giffuni
096464d39c libstdc++: merge non-abi changes from Apple's developer tools
Take some changes from Apple's Developer Tools 4.0 [1]:

block.patch
emergency-buffer-reduction.patch
test_cleanup.patch

vector_copy_no_alloc.patch
	problem/6473222 copy-constructing a std::vector	from an
	empty std::vector calls malloc

2008-10-27  Howard Hinnant
stl_tree_system_header.patch
	Added #pragma GCC system_header to stl_tree.h.
copy_doc.patch
	Corrected documentation concerning copy in stl_algobase.h.
string_compare.patch
	Fixed basic_string.h, basic_string.tcc, incorrect 64bit to
	32bit narrowing.

Reference:

[1] http://opensource.apple.com/source/libstdcxx/libstdcxx-39/patches-4.2.1/

Obtained from:	Apple
MFC after:	1 month
2013-11-21 16:44:36 +00:00
Pedro F. Giffuni
2bd5e058b7 gcc: another round of merges from the gcc pre-43 branch.
Bring The following revisions from the gcc43 branch[1]:

118360, 118361, 118363, 118576, 119820,
123906, 125246, and 125721.

They all have in common that the were merged long ago
into Apple's gcc and should help improve the general
quality of the compiler and make it easier to bring
new features from Apple's gcc42.

For details please review the additions to the files:
gcc/ChangeLog.gcc43
gcc/cp/ChangeLog.gcc43 (new, adds previous revisions)

Reference:
[1] http://gcc.gnu.org/viewcvs/gcc/trunk/?pathrev=126700

Obtained from:	gcc pre4.3 (GPLv2) branch
MFC after:	3 weeks
2013-11-21 16:38:57 +00:00
Ed Maste
3e7aca6f4e libexecinfo: Include terminating null in byte count
Otherwise, a formatted string with a strlen equal to the remaining
buffer space would have the last character omitted (because vsnprintf
always null-terminates), and later the assert in backtrace_symbols_fmt
would fail.

MFC after:	3 days
Sponsored by:	DARPA, AFRL
2013-11-21 14:12:36 +00:00
Dimitry Andric
110f993aa9 Pull in r191896 from upstream llvm trunk:
CaptureTracking: Plug a loophole in the "too many uses" heuristic.

  The heuristic was added to avoid spending too much compile time in a
  specially crafted test case (PR17461, PR16474) with many uses on a
  select or bitcast instruction can still trigger the slow case. Add a
  check for that case.

  This only affects compile time, don't have a good way to test it.

This fixes the excessive compile time spent on a specific file of the
graphics/rawtherapee port.

Reported by:	mandree
MFC after:	3 days
2013-11-19 17:53:19 +00:00
Pedro F. Giffuni
6ca7e51c77 gcc: Record some previous commits in the gcc43 ChangeLog.
It is useful to update the ChangeLog with upstream references
related to our local r189824 and r255095.

MFC after:	3 weeks
2013-11-18 20:21:44 +00:00
Julio Merino
be1938b303 Drop all ATF tools code.
We stopped building the tools in r256365 so there is no need to ship
their code any longer.

Approved by:	rpaulo (mentor)
2013-11-18 01:28:29 +00:00
Julio Merino
a18eacbefd MFV: Import atf-0.18.
Approved by:	rpaulo (mentor)
2013-11-17 23:51:19 +00:00
Julio Merino
73cdac7877 Update notes for imports of atf.
This is because the atf vendor branch now includes a verbatim copy of
the distfile sources.  As a result, the list of files to-be-removed from
the contrib/ directory is now more aggressive (and different) and the
upgrade notes now only describe stuff that is specific to the atf import
and is not documented in the Subversion Primer.

Approved by:	rpaulo (mentor)
2013-11-17 23:19:06 +00:00
Pedro F. Giffuni
a88cf0f07f gcc: Fix postreload-gcse treatment of call-clobbered registers.
Reference:
http://gcc.gnu.org/ml/gcc-patches/2007-05/msg01636.html

Obtained from:	gcc 4.3 (rev. 125037; GPLv2)
MFC after:	3 weeks
2013-11-16 01:29:27 +00:00
Pedro F. Giffuni
71fd392a23 gcc: add femit-struct-debug support to reduce Reduce dwarf debug size
Obtained from:	gcc 4.3 (rev. 123909; GPLv2)
MFC after:	3 weeks
2013-11-16 01:16:24 +00:00
Pedro F. Giffuni
966b6fbbae libcpp: preprocessor speedup patches from mainline.
* lex.c (_cpp_clean_line): Add uses of __builtin_expect.  Don't
look backward at the end of the line unless we saw a backslash.

* internal.h (struct cpp_reader): Add new fields:
nonexistent_file_hash and nonexistent_file_ob.
* files.c: Include "obstack.h".
(find_file_in_dir): Before trying to open the file, look up the
path name in the hash table of nonexistent files.  After failing
to open the file, add the path name to the hash table.
(_cpp_find_file): Cache the results of looking up the file name
starting with the quote and bracket chain heads, if we can.
(nonexistent_file_hash_eq): New static function.
(_cpp_init_files): Initialize pfile->nonexistent_file_hash and
pfile->nonexistent_file_ob.
(_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
pfile->nonexistent_file_ob.

Obtained from:	gcc 4.3 (rev. 120263, 124929 ; GPLv2)
MFC after:	3 weeks
2013-11-16 01:07:02 +00:00
Pedro F. Giffuni
007acff069 gcc: Add a new option -Wvla to warn variable length array.
Obtained from:	gcc 4.3 (rev. 122851; GPLv2)
MFC after:	3 weeks
2013-11-16 01:03:56 +00:00
Xin LI
5abd6fdcfa MFV: netcat from OpenBSD 5.4.
No functional change.
2013-11-15 22:45:14 +00:00
Sean Bruno
2f0e4b9e62 Merge in gcc svn r120505 to include definition of TREE_OVERFLOW_P:
http://gcc.gnu.org/viewcvs/gcc/trunk/gcc/tree.h?revision=120505&view=markup

This repairs build breakage for non x86 arch's that use gcc to build
intruduced at svn R258157
2013-11-15 18:44:25 +00:00
Pedro F. Giffuni
57e56fa7b9 gcc: warn about integer overflow in constant expressions in the C++ frontend.
This fixes GCC 28986:
 http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00473.html

Obtained from:	gcc 4.3 (rev. 120558; GPLv2)
MFC after:	3 weeks
2013-11-15 03:05:33 +00:00
Pedro F. Giffuni
448b703500 Merge vrp-tree fix from gcc-4.3
Fix missed conversion from / to >> (GCC PR32521)

Note that vrp-tree is currently disabled by default in
FreeBSD's gcc due many bugs.

While here fix a revision number in the 4.3 Changelog.

Obtained from:	gcc 4.3 (rev. 122831 - partial; GPLv2)
MFC after:	3 weeks
2013-11-14 20:21:05 +00:00
Sean Bruno
b770668b1e Repair build after svn r258115
options.get_size_type() appears to return a const char *, so assume that
its a string as oppose to *nothing*.  I have no idea what apple's code is
trying to do here:

http://opensource.apple.com/source/gperf/gperf-9/patches/size_type.patch
2013-11-14 18:41:58 +00:00
Pedro F. Giffuni
57538af0b7 gcc: merge rs6000 change from FSF pre-gcc43
config/rs6000/rs6000.c
http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01551.html
Don't set MASK_PPC_GFXOPT for 8540 or 8548.

Obtained from:	gcc 4.3 (rev. 124381; GPLv2)
MFC after:	3 weeks
Reviewed by:	nathan
2013-11-14 16:10:21 +00:00
Pedro F. Giffuni
0c8565a099 gperf: bring small update from Apple Developers tools 4.4
From [1]

offset.patch
Makes use the C offsetof() macro.

size_type.patch
Lets you specify the type for length parameters.

[1] http://opensource.apple.com/source/gperf/gperf-9/patches/

MFC after:	3 weeks
2013-11-14 00:57:20 +00:00
Simon J. Gerraty
bc49bb2062 Don't SEGV when Hash_Table is uninitialized 2013-11-14 00:29:48 +00:00
Simon J. Gerraty
4ec38eb510 Avoid SEGV when passed NULL for list 2013-11-14 00:06:44 +00:00
Ed Maste
afda932a71 Merge upstream LLDB r194487:
Log failure to restore thread state in ThreadPlanCallFunction::DoTakedown

  In order to help track down llvm.org/pr17226.

Sponsored by:	DARPA, AFRL
2013-11-13 17:06:26 +00:00
Ed Maste
4d1da75392 lldb: Correct a standalone debug file path
For a file /bin/ls with a .gnu_debuglink entry of "ls.debug" the path
should be /usr/lib/debug/bin/ls.debug, not /usr/lib/debug/bin/ls.

ref: https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html

Upstream defect pr17903 (http://llvm.org/pr17903)

Sponsored by:	DARPA, AFRL
2013-11-13 14:46:41 +00:00
Pedro F. Giffuni
3b5bdcdf37 gcc: Backport fixes for -W parentheses in C++
This fixes GCC 19564:
  http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00868.html
  http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01772.html
  http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00545.html

The patch and its fixes are used by Google in their enhanced gcc-4.2.1
port and predates the license switch in GCC so they are still under
GPLv2.

MFC after:	3 weeks
2013-11-13 04:31:27 +00:00
Pawel Jakub Dawidek
36da5199bb Bring in libnv library for managing name/value pairs. The following types
are currently supported:

- NV_TYPE_NULL - only name, no data;
- NV_TYPE_BOOL - boolean (true or false);
- NV_TYPE_NUMBER - 64bit unsigned integer;
- NV_TYPE_STRING - C string;
- NV_TYPE_NVLIST - nested nvlist;
- NV_TYPE_DESCRIPTOR - file descriptor;
- NV_TYPE_BINARY - binary data.

For detailed documentation and examples see nv(3) manual page.

Sponsored by:	The FreeBSD Foundation
2013-11-12 19:39:14 +00:00
Ed Maste
3561791104 Update LLDB to upstream r194122 snapshot
ludes minor changes relative to upstream, for compatibility with
FreeBSD's in-tree LLVM 3.3:

- Reverted LLDB r191806, restoring use of previous API.
- Reverted part of LLDB r189317, restoring previous enum names.
- Work around missing LLVM r192504, using previous registerEHFrames API
  (limited functionality).
- Removed PlatformWindows header include and init/terminate calls.

Sponsored by:	DARPA, AFRL
2013-11-12 17:25:33 +00:00
Gleb Smirnoff
ce102ac2ae Just disable recoding support in libsmb if built WITHOUT_ICONV. 2013-11-12 15:09:28 +00:00
Pedro F. Giffuni
0944614655 cxxfilt: small changes from Apple's developer tools
From Apple's Developer Tools 4.0 [1]:

demangle.patch
2007-05-05  Geoffrey Keating
	(d_name): Detect local-source-name.
	(d_prefix): Likewise.
	(d_unqualified_name): Implement local-source-name.

libiberty-printf.patch

MFC after:	1 month

[1] http://opensource.apple.com/source/cxxfilt/cxxfilt-9/patches/
2013-11-11 21:18:02 +00:00
Ed Maste
0adcb21d02 Merge upstream LLVM r192118:
Formally added an explicit enum for DWARF TLS support. No functionality
  change.

Reviewed by:	dim@
Sponsored by:	DARPA, AFRL
2013-11-11 19:06:12 +00:00
Ed Maste
66cbfb81eb Merge upstream LLVM r182803:
[Mips] Add Mips specific dynamic table entry tags.

This is to support an upcoming LLDB snapshot update.

Reviewed by:	dim@
Sponsored by:	DARPA, AFRL
2013-11-11 19:00:20 +00:00
Peter Wemm
9d9df6f478 Merge nvi-2.1.1 -> 2.1.2 2013-11-11 16:52:02 +00:00
Peter Wemm
18b44c2d73 Update svn from 1.8.1 to 1.8.4 - minor security fixes and client side
merge handling bug fixes (reintegrate, mergeinfo etc)
2013-11-11 01:14:58 +00:00
Gleb Smirnoff
096013098a Use system libiconv, instead of trying to dlopen() it.
PR:		183153
Submitted by:	Dominic Fandrey <kamikaze bsdforen.de>
2013-11-09 14:48:50 +00:00
Simon J. Gerraty
1a02b48ede Propagate ancient fix from Junos.
Use of -h is not supposed to depend on AUTHENTICATION being defined.

Reviewed by: markm
2013-11-07 00:36:39 +00:00
Edwin Groothuis
c26a580251 MFV of 255902, tzdata2013f
MFV of 257651, tzdata2013h

tzdata2013f
- Jordan goes to winter time on the last Friday in October.
- Tocantins in Brazil will not go into summer time in October.
- Indonesian time zones renames.
- Lots of cleanups in with regarding to links and historical data.

tzdata2013h
- Libya didn't go back to DST.
- Fix Morocco 2038 issue.
- Brazil/Acre and Western Amazonas are chaning timezones.
2013-11-05 06:32:23 +00:00
Sean Bruno
2f2f23894e Quiesce warning about unused argument in call to rl_message() by wrapping
this call with the same #if defined (PREFER_STDARG) directive as in display.c

Using -E to compile display.c/search.c shows that this is the code chosen by
the build when we create libreadline
2013-11-04 16:52:27 +00:00
Sean Bruno
9161dd723e Update libreadline with vendor patches 8-13 as fetched from:
ftp://ftp.cwru.edu/pub/bash/readline-5.2-patches/

MFC after:	2 weeks
2013-11-03 20:38:51 +00:00
Sean Bruno
3055dc3e48 Integrate github revision 0446821e49224c6a29be28760cc9c4cc14f56d8a as
suggested by upstream

https://github.com/the-tcpdump-group/libpcap/issues/327

Quiesce assignment warnings by use of const
2013-10-31 20:03:59 +00:00
Sean Bruno
a9f8a8772a Queisce warning about attempting to add char * together and use explicit
array indexing to indicate what is meant to be done
2013-10-31 18:53:39 +00:00
Sean Bruno
9113c7c613 Queisce warning about attempting to add char * together and use explicit
array indexing to indicate what is meant to be done
2013-10-31 18:53:13 +00:00
Sean Bruno
707dd2b1d7 Queisce warning about undeclared function usage.
yp_get_default_domain is defined in workaround.c but is not declared
in any header file.  Tie the declaration to the same #define conditional
used when the function is called, NETGROUP
2013-10-30 22:45:35 +00:00
Sean Bruno
5375e4f833 Quiesce warning, which could be a bug IMO, by correctly defining the host_info
structure name
2013-10-30 22:43:40 +00:00
Sean Bruno
bbaadbd796 Quiesce two warnings:
1.  define the CODE * as const
2.  restructure function to eliminate warning about exiting with no return.
    severity_map() never returns when it can't find an appropriate sysylog
    facility, and it longjmp()'s away into error code handling.  Keep this
    behavior by stashing the facility value found during our search and
    checking for -1 if found.
2013-10-30 22:41:18 +00:00
Sean Bruno
46bcf11d50 Quiesce warnings by updating headerfile includes 2013-10-30 21:18:14 +00:00
Ed Maste
3901c6c9af Revert to upstream literal $FreeBSD tag
radiotap.h in upstream wpa originally came from the FreeBSD CVS
repository.  The copy in vendor/ matched the upstream one; with this
change the contrib copy now matches too.

Discussed with:	jhb@
2013-10-30 18:33:40 +00:00
Sean Bruno
dde0bbff1f Quiesce warnings regarding assignement of loop conditionals by implementing
the solution from the compiler to wrap the statement in parens.
2013-10-29 20:53:09 +00:00
Sean Bruno
b01ec0d4e7 Quiesce warning by including appropriate header file 2013-10-29 20:36:04 +00:00
Sean Bruno
06dce123b6 Queisce warning about empty bodies in these loops by bumping the ;; to the
next line.
2013-10-29 20:35:28 +00:00
Gleb Smirnoff
3e4d5cd37b Make userland tools honor WITHOUT_PF build option.
Tested by:	dt71@gmx.com
2013-10-29 17:38:13 +00:00
Baptiste Daroussin
7dde5df42b Merge byacc 20130925
2 changes:
- Increase default stack-size so that used to be our default stack-size prior byacc import
- fix two loop-limits found by clang 3.3
2013-10-29 08:21:22 +00:00
Eygene Ryabinkin
4ba4bea936 binutils/bfd: fix printf-like format strings for "bfd *" arguments
There is a special format argument '%B' that directly handles values
of type 'bfd *', they must be used instead of '%s'.  Manifestations
of this bug can be seen in ld(1) error messages, for example,
  http://lists.freebsd.org/pipermail/freebsd-current/2013-August/043580.html
  http://lists.freebsd.org/pipermail/freebsd-current/2013-October/045404.html

Approved by:	dim
MFC after:	2 weeks
2013-10-29 04:25:49 +00:00
Sean Bruno
2f1e5d4767 Queisce two category of clang warnings:
1.  missing explicit includes for string.h, stdio.h, etc
2.  missing explicit declaration for some common functions

I have been unable to contact the upstream maintainer for this patch,
http://www.inner.net/opie appears to be the source of truth but it
unreachable
2013-10-28 18:24:31 +00:00
Sean Bruno
b51b786d73 Quiesce warnings -Wdangling-else
Thanks to jilles for some reviews and tips.
2013-10-28 18:10:35 +00:00
Gleb Smirnoff
75bf2db380 Move new pf includes to the pf directory. The pfvar.h remain
in net, to avoid compatibility breakage for no sake.

The future plan is to split most of non-kernel parts of
pfvar.h into pf.h, and then make pfvar.h a kernel only
include breaking compatibility.

Discussed with:		bz
2013-10-27 16:25:57 +00:00
Gleb Smirnoff
9dae57e134 Start splitting pfvar.h into internal and external parts.
- Provide pf_altq.h that has only stuff needed for ALTQ.
- Start pf.h, that would have all constant values and
  eventually non-kernel structures.
- Build ALTQ w/o pfvar.h, include if_var.h, that before
  came via pollution.
- Build tcpdump w/o pfvar.h.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2013-10-26 18:59:58 +00:00
Sean Bruno
61390f6811 Queisce warnings for gperf -Wlogical-op-parentheses with parens to
explicitly define the logic
2013-10-26 14:49:19 +00:00
Colin Percival
7fedb8b7a5 Remove time and date stamps from svn* binaries, in order to make the
builds reproducible.

Reviewed by:	peter
MFC after:	3 days
2013-10-25 18:43:53 +00:00
Steven Hartland
3e8aed7f71 Add clang-CC and CC to list of hints allowing clang to identify its operating
mode as c++ instead of defaulting to c for the binary names CC and clang-CC.

This fixes builds that use cmake, which automatically sets CXX to
/usr/bin/CC by default.

PR:		bin/182442
Reviewed by:	dwhite, wca
MFC after:	2 days
2013-10-25 09:09:00 +00:00
Sean Bruno
29ef2f0e31 Queisce quite a few clang warnings -Wdangling-else due to this work around
for compiling gperf under Visual Studio from 1998.

ref. http://msdn.microsoft.com/en-us/library/b80153d8%28v=vs.90%29.aspx
ref. http://stackoverflow.com/questions/984878/what-is-the-possible-use-for-define-for-if-false-else-for
2013-10-25 01:10:07 +00:00
Sean Bruno
4971c4adad Resolve clang warning about a use of syslog. By using a proper enforcement
of string format in a call so syslog

/usr/src/gnu/lib/libssp/../../../contrib/gcclibs/libssp/ssp.c:137:23:
warning: format string is not a string literal (potentially insecure)
      [-Wformat-security]
    syslog (LOG_CRIT, msg1);
                      ^~~~

Reviewed by:	dim@
2013-10-21 22:55:56 +00:00
Ed Maste
9773a1f20f Don't force 64-bit DWARF2 on MIPS
64-bit debug data is only necessary for objects with greater than 4GB of
debug data, and is not used on other 64-bit FreeBSD targets.

Sponsored by:	DARPA, AFRL
2013-10-21 20:38:02 +00:00
Jason Evans
2b06b2013c Update jemalloc to version 3.4.1. 2013-10-21 05:10:46 +00:00
Andrew Turner
9bff0a1d6a Merge from projects/arm_eabi_vfp r255380:
Fix the VCVT instruction. It must round towards zero when converting from
a floating-point to an integer value. This was not the case causing issues
when printing certain values.

There is a VCVTR instruction that will round depending on the current
rounding mode. We don't yet support this instruction, or setting the
rounding mode.
2013-10-20 15:13:32 +00:00
Ed Maste
1b182736a6 Fix .debug_line prologue header length calculation for 64-bit DWARF
The header_length field is the number of bytes following the field to
the first byte of the line number program.  The hard-coded constants
previously here (4 + 2 + 4) were correct only for 32-bit DWARF.

Sponsored by:	DARPA, AFRL
2013-10-17 17:25:00 +00:00
Brooks Davis
6ab38b8e25 Upgrade to the latest version of mtree from NetBSD. This revision
re-removes the printing of size for non-regular files, supports
type-less root (.) entries as seen in a couple ports, and corrects a bug
in -N that caused expanded Subversion $FreeBSD$ strings in comments to
be processed as /etc/group entries.

Includes one trivial portability fix (including <stdint.h> in three
files) that has been submitted upstream but not yet committed.

MFC after:	3 days
2013-10-17 14:18:11 +00:00
Shteryana Shopova
546401ce54 Fix the -Wconversion warnings produced when compiling the SNMP agent. 2013-10-17 12:03:17 +00:00
Shteryana Shopova
0698344859 Fix SNMP Error response PDUs and properly encode them when using v3 auth/encryption.
Reported by:	harti@
2013-10-17 11:49:46 +00:00
Dimitry Andric
04461e6012 Since C++ typeinfo objects are currently not guaranteed to be merged at
runtime by the dynamic linker, check for their equality in libcxxrt by
not only comparing the typeinfo's name pointers, but also comparing the
full names, if necessary.  (This is similar to what GNU libstdc++ does
in its default configuration.)  The 'deep' check can be turned off again
by defining LIBCXXRT_MERGED_TYPEINFO, and recompiling libcxxrt.

Reviewed by:	theraven
MFC after:	3 days
2013-10-16 17:00:21 +00:00
Gleb Smirnoff
6ed910fabe Hide 'struct ifaddr' definition from userland. Two tools left that use it,
namely ipftest(1) and ifmcstat(1). These sniff structure definition using
_WANT_IFADDR define.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2013-10-15 10:19:24 +00:00
Dimitry Andric
e1a5a8a74a Add support for assembling and disassembling Intel Random Number
Generator extensions (e.g. the 'rdrand' mnemonic) to our copy of
binutils.

Approved by:	re (kib)
Obtained from:	OpenBSD, via pfg
MFC after:	1 week
2013-10-07 16:33:16 +00:00
Dimitry Andric
7ae3e01a31 Pull in r192064 from upstream llvm trunk:
X86: Don't fold spills into SSE operations if the stack is unaligned.

  Regalloc can emit unaligned spills nowadays, but we can't fold the
  spills into SSE ops if we can't guarantee alignment. PR12250.

This fixes unaligned SSE accesses (leading to a SIGBUS) which could
occur in the ffmpeg ports.

Approved by:	re (kib)
Reported by:	tijl
MFC after:	3 days
2013-10-06 16:12:45 +00:00
Bernhard Froehlich
ac64499012 ename internal function test() to avoid name clashes with
common macros. This fixes ports like mysql 5.6 which has an
internal macro called test.

Approved by:	re (gjb)
Discussed with:	theraven
2013-10-06 10:12:11 +00:00
Dimitry Andric
5b3c2be312 Pull in r189644 from upstream llvm trunk:
Add ms_abi and sysv_abi attribute handling.

  Based on a patch by Benno Rice!

This will help to develop EFI support.

Approved by:	re (kib)
Verified by:	benno
MFC after:	1 week
2013-10-03 20:38:57 +00:00
Dimitry Andric
75345ac580 Pull in r186338 from upstream llvm trunk:
Remove invalid assert in DAGTypeLegalizer::RemapValue

  There is a comment at the top of DAGTypeLegalizer::PerformExpensiveChecks
  which, in part, says:

   // Note that these invariants may not hold momentarily when processing a node:
   // the node being processed may be put in a map before being marked Processed.

  Unfortunately, this assert would be valid only if the above-mentioned invariant
  held unconditionally. This was causing llc to assert when, in fact,
  everything was fine.

  Thanks to Richard Sandiford for investigating this issue!

  Fixes PR16562.

This fixes assertions which could occur in the multimedia/ffmpeg1 and
multimedia/ffmpeg2 ports.

Approved by:	re (hrs)
Reported by:	Matthias Apitz <guru@unixarea.de>
MFC after:	3 days
2013-10-03 17:50:14 +00:00
Ed Maste
36afc9ab6c Use correct size for MIPS .rld_map section
On MIPS .dynamic is read-only and so a special section .rld_map is used
to store the pointer to the rtld information for debuggers.  This
section had a hard coded size of 4 bytes which is not correct for
mips64.  (Note that FreeBSD's rtld does not yet populate .rld_map.)

Sponsored by:   DARPA, AFRL
Approved by:	re (delphij)
2013-10-02 00:50:27 +00:00
Dimitry Andric
1f27f9b50b Pull in r191711 from upstream llvm trunk:
The X86FixupLEAs pass for Intel Atom must not call
  convertToThreeAddress on ADD16rr opcodes, if src1 != src, since that
  would cause convertToThreeAddress to try to create a virtual register.
  This is not permitted after register allocation, which is when the
  X86FixupLEAs pass runs.

  This patch fixes PR16785.

Pull in r191715 from upstream llvm trunk:

  Forgot to add a break statement.

This should enable building the x11-toolskits/libXaw port with
CPUTYPE=atom.

Approved by:	re (gjb)
Reported by:	Kenta Suzumoto <kentas@hush.com>
MFC after:	3 days
2013-10-01 19:14:24 +00:00
Dag-Erling Smørgrav
56b72efe82 Remove BIND.
Approved by:	re (gjb)
2013-09-30 17:23:45 +00:00
Dimitry Andric
64fa5e4ddf Fix a bug in ld, where indirect symbols are not handled properly during
linking of a shared library, leading to corrupt indexes in the dynamic
symbol table.  This should fix the multimedia/ffmpegthumbnailer port.

Approved by:	re (kib)
Reported by:	swills
MFC after:	2 weeks
2013-09-28 23:03:40 +00:00
Simon J. Gerraty
a0774d09d3 Fix Fx syntax.
PR: 182269
Approved by: re@
2013-09-27 17:42:23 +00:00
Andrew Turner
27b7672219 Add an elf note on ARM to store the MACHINE_ARCH an executable was built
for. This is useful for software needing to know which architecture a
binary is built for as arm and armv6 have slight differences meaning only
some binaries build for one will work as expected on the other. It is
expected pkgng will be able to make use of this to simplify the logic to
determine which package ABI to use.

Approved by:	re (kib)
2013-09-26 07:53:18 +00:00
Xin LI
e10b5a023e Correct a NULL pointer deference in nslookup and nsupdate that would
cause the utility to crash in interactive mode when the user gives
an EOF on standard input.

MFC after:	3 days
Approved by:	re (gjb)
2013-09-25 20:37:16 +00:00
Devin Teske
febdb46880 Update dialog to 1.2-20130923.
Approved by:	re (marius)
2013-09-24 14:52:43 +00:00
Dag-Erling Smørgrav
a3096cc770 Regenerate
Approved by:	re (blanket)
2013-09-24 09:56:58 +00:00
Dag-Erling Smørgrav
8ba2dec2ce Regenerate the configure script before running it.
Set the default config file to /var/unbound/unbound.conf.

Approved by:	re (blanket)
2013-09-24 09:56:10 +00:00
Dag-Erling Smørgrav
68ab5d8f35 Don't include the build date or command-line arguments in the binary.
Approved by:	re (blanket)
2013-09-24 09:54:07 +00:00
David Chisnall
0f9eee39f0 Import a new libcxxrt. This fixes some potential crashing in the demangler.
Approved by:	re (gjb)
MFC after:	1 week
2013-09-23 13:16:21 +00:00
Dimitry Andric
462fc0e072 Pull in r191165 from upstream llvm trunk:
ISelDAG: spot chain cycles involving MachineNodes

  Previously, the DAGISel function WalkChainUsers was spotting that it
  had entered already-selected territory by whether a node was a
  MachineNode (amongst other things). Since it's fairly common practice
  to insert MachineNodes during ISelLowering, this was not the correct
  check.

  Looking around, it seems that other nodes get their NodeId set to -1
  upon selection, so this makes sure the same thing happens to all
  MachineNodes and uses that characteristic to determine whether we
  should stop looking for a loop during selection.

  This should fix PR15840.

Specifically, this fixes the long-standing assertion failure when
compiling the multimedia/gstreamer port on i386.  Thanks to Tijl
Coosemans for his help in getting upstream to fix it.

Approved by:	re (marius)
2013-09-22 22:03:30 +00:00
Dag-Erling Smørgrav
fdde88bc82 Build and install drill(1).
Approved by:	re (blanket)
2013-09-22 20:30:55 +00:00
Dag-Erling Smørgrav
c1d67563f6 Due to a missing command-line argument, yacc regenerated the parser but
not its header file, resulting in a mismatch between the lexer and parser
and strange errors when reading the configuration file.

Approved by:	re (blanket)
2013-09-22 19:09:43 +00:00
Dag-Erling Smørgrav
a6a726073f Set props and correct RCS ID tag.
Approved by:	re (blanket)
2013-09-21 23:29:02 +00:00
Cy Schubert
c4d0c9d04e Remove redundant files.
Approved by:    glebius (mentor)
Approved by:    re (blanket)
2013-09-21 14:23:20 +00:00
Cy Schubert
8464e56e2a Check return code from inet_pton.
Discovered by:	Coverity.
Approved by:	glebius (mentor)
Approved by:	re (blanket)
2013-09-21 14:22:07 +00:00
Ed Maste
34ff737fae Disable LLDB OSX ABI plugin
Approved by:	re (blanket)
2013-09-20 01:18:50 +00:00
Ed Maste
fc8b9f8f79 Merge lldb man page from r188801 to contrib/llvm/tools/lldb/docs/
Approved by:	re (gjb)
2013-09-19 00:32:07 +00:00
Dag-Erling Smørgrav
44995aca33 Remove duplicate function declaration.
Approved by:	re (blanket)
2013-09-15 15:52:07 +00:00
Dag-Erling Smørgrav
9dcfb8beaf The Unbound developers have never met a pointer game they didn't like.
Fix needless deconsting.

Approved by:	re (blanket)
2013-09-15 15:49:17 +00:00
Dag-Erling Smørgrav
c775ab573d Previous commit accidentally left out the umask change.
Approved by:	re (blanket)
2013-09-15 13:50:56 +00:00
Dag-Erling Smørgrav
b502f8bfb3 Set the correct prefix and exec-prefix.
Approved by:	re (blanket)
2013-09-15 13:49:43 +00:00
Dag-Erling Smørgrav
e0f0c857db Regenerate.
Approved by:	re (blanket)
2013-09-15 13:49:23 +00:00
Dag-Erling Smørgrav
16efed0220 The unbound-control-setup script needs to be generated so it knows where
to place the keys.  Also, the correct umask is 027, not 026, although it's
not likely to make any difference.

Approved by:	re (blanket)
2013-09-15 13:48:08 +00:00
Dag-Erling Smørgrav
05ff931f41 Add unbound-control.
Approved by:	re (blanket)
2013-09-15 12:41:05 +00:00
Dag-Erling Smørgrav
8860c90c1c Final #include tweak.
Approved by:	re (blanket)
2013-09-15 11:58:07 +00:00
Dag-Erling Smørgrav
ebc5657f89 Massive constification + solve an alignment issue by using a union.
Approved by:	re (blanket)
2013-09-15 01:44:07 +00:00
Dag-Erling Smørgrav
39dd631a2c Add missing #includes and fix some incorrect definitions.
Approved by:	re (blanket)
2013-09-15 01:32:32 +00:00
Dag-Erling Smørgrav
5d649f2dc0 Wholesale constification.
Approved by:	re (blanket)
2013-09-15 01:31:55 +00:00
Dag-Erling Smørgrav
8a9587d773 Move more prototypes around, and remove one that wasn't used.
Approved by:	re (blanket)
2013-09-15 01:29:00 +00:00
Dag-Erling Smørgrav
49e6c5a26d Regenerated lexer and parser
Approved by:	re (blanket)
2013-09-15 00:40:46 +00:00
Dag-Erling Smørgrav
47ec2d313c Generated configuration and documentation
Approved by:	re (blanket)
2013-09-15 00:40:21 +00:00
Dag-Erling Smørgrav
69d86e3ff0 Forgotten in r255579: #include fixes.
Approved by:	re (blanket)
2013-09-15 00:37:30 +00:00
Dag-Erling Smørgrav
04b59eac33 Numerous fixes to make Unbound compile cleanly:
- cast through void * to silence alignment warnings (presumably false
   positives resulting from poor API design)

 - constify a few function arguments

 - move prototypes for callbacks into a common header

 - now that the prototypes are in scope, fix instances of function
   definitions that don't match the prototype or what the caller
   actually passes

 - hide a conditionally unused global variable behind the same #ifdef
   that controls its use

Approved by:	re (blanket)
2013-09-15 00:36:18 +00:00
Dag-Erling Smørgrav
f41b5392e6 Move prototypes into header.
Approved by:	re (blanket)
2013-09-15 00:07:51 +00:00
Dag-Erling Smørgrav
439fafc748 Two helper scripts for porting Unbound:
- freebsd-configure.sh runs ./configure with the correct parameters
   and regenerates the lex and yacc code.

 - freebsd-sources.pl untangles the upstream Makefile and generates
   source lists for our Makefiles.

Approved by:	re (blanket)
2013-09-15 00:05:16 +00:00
Ed Maste
377fc97958 Improve readelf notes output for Linux ELF files
Add four ELF note constants:
- NT_FILE and NT_SIGINFO (core file notes output by recent Linux kernels)
- NT_GNU_ABI_TAG (was incorrectly reported as NT_VERSION)
- NT_GNU_BUILD_ID (used for locating standalone debug files)

Approved by:	re (kib)
2013-09-13 18:21:31 +00:00
Dag-Erling Smørgrav
3fc9e2c365 Import Magerya Vitaly's ldns-host, and build it instead of the BIND version
in the WITH_LDNS_UTILS case.

Approved by:	re (blanket)
2013-09-08 19:40:32 +00:00
Dag-Erling Smørgrav
d1c8ba6e97 MFV (r255387): undo autoprop damage
Approved by:	re (glebius)
2013-09-08 16:56:17 +00:00
Dag-Erling Smørgrav
ce77a8d692 Update to OpenPAM Nummularia. 2013-09-07 19:43:39 +00:00
Dag-Erling Smørgrav
fec3606c04 This was a good idea that never went anywhere. 2013-09-07 18:55:52 +00:00
Dag-Erling Smørgrav
f7e6344d4a MFV (r255364): move the code around in preparation for Nummularia. 2013-09-07 18:46:35 +00:00
Andrew Turner
0a10f22a30 On ARM EABI double precision floating point values are stored in the
endian the CPU is in, i.e. little-endian on most ARM cores.

This allows ARMv4 and ARMv5 boards to boot with the ARM EABI.
2013-09-07 14:04:10 +00:00
Cy Schubert
bfc88dcbf7 Update ipfilter 4.1.28 --> 5.1.2.
Approved by:		glebius (mentor)
BSD Licensed by:	Darren Reed <darrenr@reed.wattle.id.au> (author)
2013-09-06 23:11:19 +00:00
David Chisnall
52b42bace1 On platforms where clang is the default compiler, don't build gcc or libstdc++.
To enable them, set WITH_GCC and WITH_GNUCXX in src.conf.
Make clang default to using libc++ on FreeBSD 10.
Bumped __FreeBSD_version for the change.

GCC is still enabled on PC98, because the PC98 bootloader requires GCC to build
(or, at least, hard-codes the use of gcc into its build).

Thanks to everyone who helped make the ports tree ready for this (and bapt
for coordinating them all).  Also to imp for reviewing this and working on the
forward-porting of the changes in our gcc so that we're getting to a much
better place with regard to external toolchains.

Sorry to all of the people who helped who I forgot to mention by name.

Reviewed by:	bapt, imp, dim, ...
2013-09-06 20:08:03 +00:00
Simon J. Gerraty
2d395cb507 If MAKE_JOB_ERROR_TOKEN is set to false, do not put an error token ("E")
into the job queue.
This avoids closing down an entire build on failure of one branch.
Probably has no use outside the context of universe/tinderbox.

Reviewed by:	obrien
2013-09-06 02:55:51 +00:00
Simon J. Gerraty
1bbe5942b5 Merge bmake-20130904 2013-09-05 15:57:26 +00:00
Pawel Jakub Dawidek
7008be5bd7 Change the cap_rights_t type from uint64_t to a structure that we can extend
in the future in a backward compatible (API and ABI) way.

The cap_rights_t represents capability rights. We used to use one bit to
represent one right, but we are running out of spare bits. Currently the new
structure provides place for 114 rights (so 50 more than the previous
cap_rights_t), but it is possible to grow the structure to hold at least 285
rights, although we can make it even larger if 285 rights won't be enough.

The structure definition looks like this:

	struct cap_rights {
		uint64_t	cr_rights[CAP_RIGHTS_VERSION + 2];
	};

The initial CAP_RIGHTS_VERSION is 0.

The top two bits in the first element of the cr_rights[] array contain total
number of elements in the array - 2. This means if those two bits are equal to
0, we have 2 array elements.

The top two bits in all remaining array elements should be 0.
The next five bits in all array elements contain array index. Only one bit is
used and bit position in this five-bits range defines array index. This means
there can be at most five array elements in the future.

To define new right the CAPRIGHT() macro must be used. The macro takes two
arguments - an array index and a bit to set, eg.

	#define	CAP_PDKILL	CAPRIGHT(1, 0x0000000000000800ULL)

We still support aliases that combine few rights, but the rights have to belong
to the same array element, eg:

	#define	CAP_LOOKUP	CAPRIGHT(0, 0x0000000000000400ULL)
	#define	CAP_FCHMOD	CAPRIGHT(0, 0x0000000000002000ULL)

	#define	CAP_FCHMODAT	(CAP_FCHMOD | CAP_LOOKUP)

There is new API to manage the new cap_rights_t structure:

	cap_rights_t *cap_rights_init(cap_rights_t *rights, ...);
	void cap_rights_set(cap_rights_t *rights, ...);
	void cap_rights_clear(cap_rights_t *rights, ...);
	bool cap_rights_is_set(const cap_rights_t *rights, ...);

	bool cap_rights_is_valid(const cap_rights_t *rights);
	void cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src);
	void cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src);
	bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little);

Capability rights to the cap_rights_init(), cap_rights_set(),
cap_rights_clear() and cap_rights_is_set() functions are provided by
separating them with commas, eg:

	cap_rights_t rights;

	cap_rights_init(&rights, CAP_READ, CAP_WRITE, CAP_FSTAT);

There is no need to terminate the list of rights, as those functions are
actually macros that take care of the termination, eg:

	#define	cap_rights_set(rights, ...)				\
		__cap_rights_set((rights), __VA_ARGS__, 0ULL)
	void __cap_rights_set(cap_rights_t *rights, ...);

Thanks to using one bit as an array index we can assert in those functions that
there are no two rights belonging to different array elements provided
together. For example this is illegal and will be detected, because CAP_LOOKUP
belongs to element 0 and CAP_PDKILL to element 1:

	cap_rights_init(&rights, CAP_LOOKUP | CAP_PDKILL);

Providing several rights that belongs to the same array's element this way is
correct, but is not advised. It should only be used for aliases definition.

This commit also breaks compatibility with some existing Capsicum system calls,
but I see no other way to do that. This should be fine as Capsicum is still
experimental and this change is not going to 9.x.

Sponsored by:	The FreeBSD Foundation
2013-09-05 00:09:56 +00:00
John Baldwin
dffe0dc4d2 Add support for the 'invpcid' instruction to binutils and DDB's
disassembler on amd64.

MFC after:	1 month
2013-09-03 21:21:47 +00:00
John-Mark Gurney
003f0fa63f add support to gcc for AES and PCLMUL intrinsics... This addes the
-maes option, but not the -mpclmul option as I ran out of bits in
the 32 bit flags field...  You can -D__PCLMUL__ to get this, but it
won't be compatible w/ clang and modern gcc...

Reviewed by:	-current, -toolchain
2013-09-03 17:33:29 +00:00
Ed Maste
e7fec5c320 Add $FreeBSD$ tag for user-facing header 2013-09-03 13:36:23 +00:00
Simon J. Gerraty
f4ae7f0c45 Pay attention to errCheck!
PR:		181715
2013-09-01 18:59:09 +00:00
Pedro F. Giffuni
e639f25706 Add support for the GCC binary integer constants extension.
This is required to build the i965 backend with newer versions of mesa.

Original patch from Joerg Wunsch in GCC Bug 23479, under the GPLv2;
also taken from there in OpenBSD.

Obtained from:	gcc 4.3 (rev. 125346; GPLv2)
MFC after:	5 days
2013-08-31 20:33:37 +00:00
Andrew Turner
2f393c15a6 Implement _Unwind_GetIP and _Unwind_GetIPInfo as functions as that is what
we expect on FreeBSD. The implementation is based on the existing macros.
2013-08-31 14:56:09 +00:00
Andrew Turner
69f351c4c2 Bring in gcc r128087 to add support for _Unwind_Backtrace on ARM. This is
prior to the licence change so is under the GPLv2.
2013-08-31 14:53:19 +00:00
David Chisnall
26b8b75c54 Don't use _Unwind_Backtrace() on ARM as it's currently missing from our libgcc_s. andrew@ has patches to add it, so this can be reverted and sync'd with upstream later. 2013-08-31 08:56:33 +00:00
Dimitry Andric
89a53411d4 Pull in r189672 from upstream llvm trunk:
InstCombine: Check for zero shift amounts before subtracting one
  causing integer overflow.

  PR17026. Also avoid undefined shifts and shift amounts larger than 64
  bits (those are always undef because we can't represent integer types
  that large).

This should fix assertion failures when building the emulators/xmame
port.

Reported by:	bapt
2013-08-30 18:29:25 +00:00
Ed Maste
f357c00bf7 Update to 2013-08-29 NetBSD libexecinfo snapshot
This adds my patch to use the kern.proc.pathname sysctl instead of
relying on procfs(5).
2013-08-29 16:57:55 +00:00
Will Andrews
caf6fbd81a Make the PAM password strength checking module WARNS=2 safe.
lib/libpam/modules/pam_passwdqc/Makefile:
	Bump WARNS to 2.

contrib/pam_modules/pam_passwdqc/pam_passwdqc.c:
	Bump  _XOPEN_SOURCE and _XOPEN_VERSION from 500 to 600
	so that vsnprint() is declared.

	Use the two new union types (pam_conv_item_t and
	pam_text_item_t) to resolve strict aliasing violations
	caused by casts to comply with the pam_get_item() API taking
	a "const void **" for all item types.  Warnings are
	generated for casts that create "type puns" (pointers of
	conflicting sized types that are set to access the same
	memory location) since these pointers may be used in ways
	that violate C's strict aliasing rules.  Casts to a new
	type must be performed through a union in order to be
	compliant, and access must be performed through only one
	of the union's data types during the lifetime of the union
	instance.  Handle strict-aliasing warnings through pointer
	assignments, which drastically simplifies this change.

	Correct a CLANG "printf-like function with more arguments
	than format" error.

Submitted by:	gibbs
Sponsored by:	Spectra Logic
2013-08-27 15:50:26 +00:00
Ed Maste
d09607dfdb Disable lldb target support not (currently) of interest
- Remote iOS debugging
- OS X symbol provider, core files
- PECOFF object files
- Linux platform support

Sponsored by:	DARPA, AFRL
2013-08-25 12:07:34 +00:00
Ed Maste
3979636f6f Revert lldb change for Attribute::NoBuiltin
NoBuiltin was introduced after clang/llvm 3.3 and thus does not exist in
FreeBSD.  Thus special handling for the attribute is not needed in lldb.

This reverts lldb r186990 (git eebd175)

Sponsored by:	DARPA, AFRL
2013-08-24 16:09:52 +00:00
Ed Maste
265a85219f Import llvm r187614 (git 44c8e34), for lldb's use:
Author: Daniel Malea <daniel.malea@intel.com>
  Date:   Thu Aug 1 21:18:16 2013 +0000

    Fixed the Intel-syntax X86 disassembler to respect the (existing)
    option for hexadecimal immediates, to match AT&T syntax. This also
    brings a new option for C-vs-MASM-style hex.

    Patch by Richard Mitton
    Reviewed: http://llvm-reviews.chandlerc.com/D1243
2013-08-24 15:33:17 +00:00
Ed Maste
7e7299d197 Revert lldb changes due to post-3.3 clang and llvm API changes
Revisions:
svn	git
183929	99447a6
183862	15c1774
  source/Host/common/FileSpec.cpp

184954	007e7bc
184948	4dc3761
  source/Expression/ClangExpressionParser.cpp

182099	b31044e
181387	779e6ac
  include/lldb/Expression/IRExecutionUnit.h
  source/Expression/IRExecutionUnit.cpp

184177	0b2934b
182650	f2dcf35
181703	7bef4e2
  source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp

182683	0d91b80
  source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp

Sponsored by:	DARPA, AFRL
2013-08-24 10:06:51 +00:00
Ed Maste
ac7ddfbf72 Merge lldb r188801 to contrib/llvm/tools/lldb/ 2013-08-23 18:06:42 +00:00
Ed Maste
b32840d048 Update libexecinfo man page for FreeBSD
Sponsored by:	DARPA, AFRL
2013-08-23 13:47:18 +00:00
Ed Maste
38ed7e0769 FreeBSD compatibility for libexecinfo 2013-08-23 12:42:13 +00:00
Ed Maste
287472b39c Import NetBSD libexecinfo 20130822 to contrib 2013-08-23 12:38:51 +00:00
Erwin Lansing
08e6ea976b Update Bind to 9.9.3-P2
Notable new features:

*  Elliptic Curve Digital Signature Algorithm keys and signatures in
   DNSSEC are now supported per RFC 6605. [RT #21918]

*  Introduces a new tool "dnssec-verify" that validates a signed zone,
   checking for the correctness of signatures and NSEC/NSEC3 chains.
   [RT #23673]

*  BIND now recognizes the TLSA resource record type, created to
   support IETF DANE (DNS-based Authentication of Named Entities)
   [RT #28989]

*  The new "inline-signing" option, in combination with the
   "auto-dnssec" option that was introduced in BIND 9.7, allows
   named to sign zones completely transparently.

Approved by:	delphij (mentor)
MFC after:	3 days
Sponsored by:	DK Hostmaster A/S
2013-08-22 08:15:03 +00:00
Dimitry Andric
992b133da5 Pull in r182983 from upstream clang trunk:
Fix handling of braced-init-list as reference initializer within
  aggregate initialization. Previously we would incorrectly require an
  extra set of braces around such initializers.

Pull in r188718 from upstream clang trunk:

  Handle init lists and _Atomic fields.

  Fixes PR16931.

These fixes are needed for the atomic_flag type to work correctly in our
stdatomic.h.

Requested by:	theraven
2013-08-20 20:51:32 +00:00
Dimitry Andric
df2637d88a Pull in r188716 from upstream clang trunk:
PR16727: don't try to evaluate a potentially value-dependent
  expression when checking for missing parens in &&/|| expressions.

This fixes an assertion encountered when building the lang/sdcc port.

Reported by:	kwm
2013-08-20 20:46:29 +00:00
Andrew Turner
fbc66a3be6 Silence a warning that is incorrect on ARMv6 and later. In the smull, umull,
smlal, and umlal the output registers are allowed to be the same as either
input registers, where in ARMv4 and ARMv5 they could only be the same as the
last input register.
2013-08-17 14:36:32 +00:00
Simon J. Gerraty
9a4bc556be Add .MAKE.ALWAYS_PASS_JOB_QUEUE knob (default yes)
for backwards compatability.
2013-08-16 18:47:18 +00:00
Gregory Neil Shapiro
c4190e0fcf Temporarily revert sendmail 8.14.7 change to getipnodebyname() flags to
prevent problems between the resolver and Microsoft DNS servers with
AAAA lookups.  The upstream open source project will work on a more
permanent fix for the next release.  Issue noted by Pavel Timofeev.

MFC after:	3 days
2013-08-12 17:22:39 +00:00
Peter Wemm
f0957ccae4 Update nvi-1.79 to 2.1.1-4334a8297f
This is the gsoc-2011 project to clean up and backport multibyte support
from other nvi forks in a form we can use.

USE_WIDECHAR is on unless building for the rescue crunchgen. This should
allow editing in the native locale encoding.

USE_ICONV depends on make.conf having 'WITH_ICONV=YES' for now.  This
adds the ability to do things like edit a KOI8-R file while having $LANG
set to (say) en_US.UTF-8.  iconv is used to transcode the characters for
display.

Other points:
* It uses gencat and catopen/etc instead of homegrown msg catalog stuff.
* A lot of stuff has been trimmed out, eg: the perl and tcl bindings which
  we could never use in base anyway.
* It uses ncursesw when in widechar mode.  This could be interesting.

GSoC info: http://www.google-melange.com/gsoc/proposal/review/google/gsoc2011/zy/1
Repo at: https://github.com/lichray/nvi2

Obtained from:  Zhihao Yuan <lichray@gmail.com>
2013-08-11 20:03:12 +00:00
Peter Wemm
84ed61ee23 Post-cvs2svn flatten pass. 2013-08-11 08:38:10 +00:00
Simon J. Gerraty
84efbe96f1 ParseGetLine: don't treat a zero byte as end of buffer if P_end says it isn't.
Consume up to next newline, and issue a parse warning.
If no newline found before P_end, carry on as before.
2013-08-10 21:31:35 +00:00
Jeff Roberson
9681a74932 - Fix compile errors from the clang conversion
- Grab AF_SDP_INET from sys/socket.h

Submitted by:	Garrett Cooper
Sponsored by:	EMC / Isilon Storage Division
2013-08-09 03:29:46 +00:00
Rui Paulo
bfd13d9679 Fix previous commit: both flags must be set. 2013-08-07 15:55:12 +00:00
David Chisnall
02e4f2a3a4 Remove __attribute__((__aligned__)) that generates incorrect alignment on compilers that know about SSE. Code left over from old header that thought that 64 bits was the maximum alignment that anything would ever need... 2013-08-07 11:30:04 +00:00
Rui Paulo
e7b969bbee Make sure IFM_AVALID is also set when checking ifm_status.
Submitted by:	yongari
2013-08-07 04:03:30 +00:00
Rui Paulo
43673d4bfc Fix a timing issue with the wired driver.
After configuring the interface, wait for the link to become active.
Many ethernet drivers reset the chip when we set multicast filters
(causing significant delays due to link re-negotiation) and, by the time
we start sending packets, they are discared instead of going to the ether.

Tested by:	dumbbell
2013-08-07 01:01:58 +00:00
Erwin Lansing
d561392572 Remove weirdly-named autofoo file. This is not needed for the (FreeBSD)
build, and freebsd-update chokes on it.  Somehow it did manage to be merged,
despite my best efforts not to.

Approved by:	delphij (mentor)
2013-08-06 06:24:37 +00:00
Erwin Lansing
a273027f92 Update Bind to 9.8.5-P2
New Features

   Adds a new configuration option, "check-spf"; valid values are
   "warn" (default) and "ignore".  When set to "warn", checks SPF
   and TXT records in spf format, warning if either resource record
   type occurs without a corresponding record of the other resource
   record type.  [RT #33355]

   Adds support for Uniform Resource Identifier (URI) resource
   records. [RT #23386]

   Adds support for the EUI48 and EUI64 RR types. [RT #33082]

   Adds support for the RFC 6742 ILNP record types (NID, LP, L32,
   and L64). [RT #31836]

Feature Changes

   Changes timing of when slave zones send NOTIFY messages after
   loading a new copy of the zone.  They now send the NOTIFY before
   writing the zone data to disk.  This will result in quicker
   propagation of updates in multi-level server structures. [RT #27242]
   "named -V" can now report a source ID string.  (This is will be
   of most interest to developers and troubleshooters).  The source

   ID for ISC's production versions of BIND is defined in the "srcid"
   file in the build tree and is normally set to the most recent
   git hash. [RT #31494]

   Response Policy Zone performance enhancements.  New "response-policy"
   option "min-ns-dots".  "nsip" and "nsdname" now enabled by default
   with RPZ. [RT #32251]

Approved by:	delphij (mentor)
Sponsored by:	DK Hostmaster A/S
2013-08-06 06:22:54 +00:00
Simon J. Gerraty
d191243d90 Move the call to Job_SetPrefix() to Job_Init() so that
makefiles have had a chance to set .MAKE.JOB.PREFIX
2013-08-04 07:10:16 +00:00
Peter Wemm
6d2b20fd17 Update serf 1.2.1 -> 1.3.0 for svn 2013-08-02 19:21:46 +00:00
Simon J. Gerraty
51ee2c1cc6 Merge bmake-20130730
Main feature of interest is .MAKE.JOB.PREFIX=
to suppress --- job --- tokens.
2013-08-02 06:25:28 +00:00
Baptiste Daroussin
0fd8fddb96 Change default behaviour of ld(1) to not recursively copy DT_NEEDED
This is the default behaviour of the newer binutils as well as most alternative linkers.
All the ports tree has been fixed to be able to link properly with this new behaviour.
2013-07-31 12:35:06 +00:00
Rui Paulo
480d5cc8f7 When using tcpdump -I -i wlanN and wlanN is not a monitor mode VAP,
tcpdump will print an error message saying rfmon is not supported.
Give a concise explanation as to how one might solve this problem by
creating a monitor mode VAP.
2013-07-31 02:13:18 +00:00
Dimitry Andric
12ebae77ad Pull in r186696 from upstream clang trunk:
This patch implements __get_cpuid_max() as an inline and __cpuid()
  and __cpuid_count() as macros to be compatible with GCC's cpuid.h.
  It also adds bit_<foo> constants for the various feature bits as
  described in version 039 (May 2011) of Intel's SDM Volume 2 in the
  description of the CPUID instruction.  The list of bit_<foo>
  constants is a bit exhaustive (GCC doesn't do near this many).  More
  bits could be added from a newer version of SDM if desired.

  Patch by John Baldwin!

This should fix several ports which depend on this functionality being
available.

MFC after:	1 week
2013-07-30 12:33:21 +00:00
Peter Wemm
4705e3668d Update subversion-1.8.0 -> 1.8.1. Update supporting
components: apr-1.4.6 -> 1.4.8 and apr-util-1.4.1 -> 1.5.2.

This is a post point-zero bug-fix / fix-sharp-edges release, including
some workarounds for UTF-8 for people who haven't yet turned on WITH_ICONV.
2013-07-28 06:02:40 +00:00
Xin LI
4202b2ded4 Fix Denial of Service vulnerability in named(8). [13:07]
Security:	CVE-2013-4854
Security:	FreeBSD-SA-13:07.bind
Approved by:	so
2013-07-26 22:40:17 +00:00
David Chisnall
e2a74d7247 Add isnan() and isinf() to the global namespace in libstdc++'s <cmath>.
The standard (n3242, section 17.6.1.1, paragraph 4) says that, because these are
declared as macros in the C specification (even though they are
implemented as functions in the C++ library) they should be in the global
namespace.

A surprising number of configure checks rely on this.  It was broken by recent
cleanups to math.h.
2013-07-23 10:23:43 +00:00
Colin Percival
ed2661f5a2 Remove weirdly-named autofoo file. This is not needed for the (FreeBSD)
build, and freebsd-update chokes on it.

9.2-RELEASE candidate.

Approved by:	rwatson
MFC after:	3 days
2013-07-22 08:46:15 +00:00
Cy Schubert
f27f47054d As per the developers handbook (5.3.1 step 1), prepare the vendor trees for
import of new ipfilter vendor sources by flattening them.

To keep the tags consistent with dist, the tags are also flattened.

Approved by:	glebius (Mentor)
2013-07-19 05:41:57 +00:00
Ed Maste
750288f343 Correct ELF note decoding for non-core files
Requested by:	kib
2013-07-19 01:04:17 +00:00
Ed Maste
9be99d951b Correct alignment in note output 2013-07-18 20:36:21 +00:00
Ed Maste
4e7a9c2e6f Remove accidentally cut-and-pasted colons 2013-07-18 19:17:58 +00:00
Ed Maste
c158e13f7d Handle FreeBSD-specific ELF notes
Add a function to return the specific type, when the note's Name field is
'FreeBSD'.

r249558 added FreeBSD-specific ELF note types that reuse type numbers of
existing generic / Linux types.  This caused 'readelf -n' to produce
incorrect output on FreeBSD core files.

Sponsored by:	DARPA, AFRL
MFC after:	3 days
2013-07-18 17:25:50 +00:00
David Chisnall
4bab9fd964 Import new libcxxrt / libc++. This brings some bug fixes, including a potential race condition for static initialisers. 2013-07-10 16:28:24 +00:00
Dimitry Andric
7a06320990 Pull in r185616 from llvm trunk:
FastISel can only append to basic blocks.

  Compute the insertion point from the end of the basic block instead of
  skipping labels from the front.

  This caused failures in landing pads when live-in copies where inserted
  before instruction selection.

I missed this change in r252720; without it, certain compilation flags
can cause exception labels to not be generated, but still referenced,
leading to link errors.

Reported by:	zeising
MFC after:	3 days
2013-07-08 17:57:11 +00:00
Hiren Panchasara
3eb0227259 Move to MSG_DEBUG to print it via syslog only when requested.
Reviewed by:	rpaulo, adrian
Approved by:	sbruno (mentor)
2013-07-08 16:03:18 +00:00
Edwin Groothuis
875f3108f7 MFV of tzdata2013d, 253008
- Morocco:
  announced that the year's Ramadan daylight-savings transitions
  would be 2013-07-07 and 2013-08-10.

- Israel:
  As of 2013, DST starts at 02:00 on the Friday before the last
  Sunday in March.  DST ends at 02:00 on the first Sunday after
  October 1, unless it occurs on the second day of the Jewish Rosh
  Hashana holiday, in which case DST ends a day later (i.e. at 02:00
  the first Monday after October 2).  [Rosh Hashana holidays are
  factored in until 2100.]
2013-07-07 22:23:59 +00:00
Pawel Jakub Dawidek
457f64b4ed Sandbox tcpdump(8) using Capsicum's capability mode and capabilities.
For now, sandboxing is done only if -n option was specified and neither -z nor
-V options were given. Because it is very common to run tcpdump(8) with the -n
option for speed, I decided to commit sandboxing now. To also support
sandboxing when -n option wasn't specified, we need Casper daemon and its
services that are not available in FreeBSD yet.

- Limit file descriptors of a file specified by -r option or files specified
  via -V option to CAP_READ only.

- If neither -r nor -V options were specified, we operate on /dev/bpf.
  Limit its descriptor to CAP_READ and CAP_IOCTL plus limit allowed ioctls to
  BIOCGSTATS only.

- Limit file descriptor of a file specified by -w option to CAP_SEEK and
  CAP_WRITE.

- If either -C or -G options were specified, we open directory containing
  destination file and we limit directory descriptor to CAP_CREATE, CAP_FCNTL,
  CAP_FTRUNCATE, CAP_LOOKUP, CAP_SEEK and CAP_WRITE. Newly opened/created
  files are limited to CAP_SEEK and CAP_WRITE only.

- Enter capability mode if -n option was specified and neither -z nor -V
  options were specified.

Approved by:	delphij, wxs
Sponsored by:	The FreeBSD Foundation
2013-07-07 21:19:53 +00:00
Rui Paulo
a61123749d Delete .gitignore files. 2013-07-04 23:05:28 +00:00
Rui Paulo
d4f2939c85 Restore the dbus directory that was not meant to be deleted in r252729. 2013-07-04 23:01:24 +00:00
Rui Paulo
521fc850a0 Remove unused files / directories. 2013-07-04 21:31:28 +00:00
Rui Paulo
f05cddf940 Merge hostapd / wpa_supplicant 2.0.
Reviewed by:	adrian (driver_bsd + usr.sbin/wpa)
2013-07-04 21:12:58 +00:00
Dimitry Andric
6beeb09142 Pull in r185594 from llvm trunk:
Add MachineBasicBlock::addLiveIn().

  This function adds a live-in physical register to an MBB and ensures
  that it is copied to a virtual register immediately.

Pull in r185615 from llvm trunk:

  Live-in copies go *after* EH_LABELs.

  This will soon be tested by exception handling working at all.

Pull in r185617 from llvm trunk:

  Simplify landing pad lowering.

  Stop using the ISD::EXCEPTIONADDR and ISD::EHSELECTION when lowering
  landing pad arguments. These nodes were previously legalized into
  CopyFromReg nodes, but that never worked properly because the
  CopyFromReg node weren't guaranteed to be  scheduled at the top of the
  basic block.

  This meant the exception pointer and selector registers could be
  clobbered before being copied to a virtual register.

  This patch copies the two physical registers to virtual registers at
  the beginning of the basic block, and lowers the landingpad instruction
  directly to two CopyFromReg nodes reading the *virtual* registers. This
  is safe because virtual registers don't get clobbered.

  A future patch will remove the ISD::EXCEPTIONADDR and ISD::EHSELECTION
  nodes.

Together, these changes fix llvm PR 16038 ('qt4 webcore file results in
"Bad machine code: Using an undefined physical register"'), and should
make it possible again to compile the www/qt4-webkit port again on the
i386 arch, without using a CPUTYPE=i686 or higher setting.
2013-07-04 20:10:33 +00:00
Dimitry Andric
0cf157db98 Pull in r185446 from clang trunk:
Fix to PR15826 - clang hits assert in clang::ASTContext::getASTRecordLayout.

Reported by:	glebius
2013-07-03 19:08:10 +00:00
Andrew Turner
b206d4e77f Work around an ARM EABI issue where clang would sometimes incorrectly align
the stack in a leaf function that uses TLS.

The issue is, when using TLS, the function is no longer a leaf as it calls
__aeabi_read_tp. With statically linked programs this is not an issue as
it doesn't make use of the stack, however with dynamically linked
applications we enter rtld which does use the stack and makes assumptions
about it's alignment.

This is only a temporary fix until a better patch can be made and submitted
upstream.
2013-07-02 08:04:41 +00:00
Dimitry Andric
914922decc Make libsupc++'s __cxa_call_terminate() prototype consistent with the
definition.

Submitted by:	dt71@gmx.com
MFC after:	3 days
2013-06-29 20:17:14 +00:00
Davide Italiano
237abf0c56 - Trim an unused and bogus Makefile for mount_smbfs.
- Reconnect with some minor modifications, in particular now selsocket()
internals are adapted to use sbintime units after recent'ish calloutng
switch.
2013-06-28 21:00:08 +00:00
Pedro F. Giffuni
5282be2aa3 gcc: configuration fix.
-Fix configuration support for FreeBSD 10 and 11.

Note this change is based on GCC-SVN-131197 with permission
by gerald@ .

Reported by:	jmallet
2013-06-24 21:13:58 +00:00
Pedro F. Giffuni
4b73bd90c1 gcc: add some configuration and references.
-Add configure support for FreeBSD 10 and 11.
-Adapt a threading fix to gnu POSIX95 (which we don't use).
-Refer to a bug fix for the disabled vrptree support.

This is all useless in our current build but it is included
for convenience in case someone may want to re-package our
older gcc.

Reviewed by:	gerald (long ago)
2013-06-24 20:38:27 +00:00
Dimitry Andric
707d0cef66 Pull in r183984 from llvm trunk:
Make PrologEpilogInserter save/restore all callee saved registers in
  functions which call __builtin_unwind_init()

  __builtin_unwind_init() is an undocumented gcc intrinsic which has
  this effect, and is used in libgcc_eh.

  Goes part of the way toward fixing PR8541.

This obsoletes the ugly hack to libgcc's unwind code from r245272, and
should also work for other arches, so revert the hack too.
2013-06-20 18:25:10 +00:00
Tim Kientzle
7969a6ec5f Try to fix build of apr on FreeBSD/arm. 2013-06-20 02:04:03 +00:00
Simon J. Gerraty
15441b18e2 Fix use after free bug.
Parse_SetInput:
curFile->fname was using the buffer passed to it - which ReadMakefile frees.
This change makes the comment in ParseEOF about leaking curFile->fname true.
2013-06-18 19:35:51 +00:00
Peter Wemm
65ee63f7fc Merge 1.8.0 2013-06-18 16:36:21 +00:00
Peter Wemm
10386c424e Merge the commit template patch. 2013-06-18 04:57:36 +00:00
Peter Wemm
f515e3f113 Merge the 3-way merge marker tweak. 2013-06-18 04:56:11 +00:00
Peter Wemm
937a200089 Introduce svnlite so that we can check out our source code again.
This is actually a fully functional build except:
* All internal shared libraries are static linked to make sure there
  is no interference with ports (and to reduce build time).
* It does not have the python/perl/etc plugin or API support.
* By default, it installs as "svnlite" rather than "svn".
* If WITH_SVN added in make.conf, you get "svn".
* If WITHOUT_SVNLITE is in make.conf, this is completely disabled.

To be absolutely clear, this is not intended for any use other than
checking out freebsd source and committing, like we once did with cvs.

It should be usable for small scale local repositories that don't
need the python/perl plugin architecture.
2013-06-18 02:53:45 +00:00
Ed Maste
73adaf3810 Fold in frame-unwind patch
After moving to svn there's no need to avoid pulling files off a vendor
branch.
2013-06-17 18:34:34 +00:00
Sergey Kandaurov
c222608952 Import change e4ac6417c7504e1c55ec556ce908974c04e29e3c from upstream wpa:
From: Guy Eilam <guy@wizery.com>
  Date: Mon, 21 Feb 2011 20:44:46 +0000 (+0200)
  Subject: utils: Corrected a typo in header's name definition

  utils: Corrected a typo in header's name definition

  Corrected a typo in the BASE64_H definition that
  might cause the header file to be included more than once.

  Signed-off-by: Guy Eilam <guy@wizery.com>

Submitted by:	<dt71@gmx.com>
MFC after:	3 days
2013-06-17 14:46:54 +00:00
Ed Maste
80fae82753 Include die tag in error message 2013-06-17 12:49:26 +00:00
Baptiste Daroussin
2a3e3873a1 Update dialog to 1.2-20130523
Level up WARNS
2013-06-17 10:28:55 +00:00
Eitan Adler
1cbff2a999 Remove CVS from the base system.
Discussed with:	many
Reviewed by:	peter, zi
Approved by:	core
2013-06-15 20:29:07 +00:00
Andrew Turner
1f4f127b99 Pull in r183926 from LLVM trunk:
Allow clang to build __clear_cache on ARM.

  __clear_cache is special. It needs no signature, but is a real function in
  compiler_rt or libgcc.

  Patch by Andrew Turner.

This allows us to build the __clear_cache function in compiler-rt.
2013-06-15 12:13:22 +00:00
Ed Schouten
d23f3f67b5 Pull in r184040 from upstream clang trunk:
Emit native implementations of atomic operations on FreeBSD/armv6.

  Just like on Linux, FreeBSD/armv6 assumes the system supports
  ldrex/strex unconditionally. It is also used by the kernel. We can
  therefore enable support for it, like we do on Linux.

  While there, change one of the unit tests to explicitly test against
  armv5 instead of armv7, as it actually tests whether libcalls are
  emitted.
2013-06-15 09:42:43 +00:00
Dimitry Andric
b6fdb9ab2f Pull in r181620 from llvm trunk:
[ms-inline asm] Fix a crasher when we fail on a direct match.

  The issue was that the MatchingInlineAsm and VariantID args to the
  MatchInstructionImpl function weren't being set properly.  Specifically, when
  parsing intel syntax, the parser thought it was parsing inline assembly in the
  at&t dialect; that will never be the case.

  The crash was caused when the emitter tried to emit the instruction, but the
  operands weren't set.  When parsing inline assembly we only set the opcode, not
  the operands, which is used to lookup the instruction descriptor.
  rdar://13854391 and PR15945

  Also, this commit reverts r176036.  Now that we're correctly parsing the intel
  syntax the pushad/popad don't match properly.  I've reimplemented that fix using
  a MnemonicAlias.

Pull in r183907 from llvm trunk:

  X86: Make the cmov aliases work with intel syntax too.

These commits make a number of Intel-style inline assembly mnemonics
aliases (occurring in several ports) work properly, which could cause
assertions otherwise.

Reported by:	kwm, bapt
2013-06-14 21:14:36 +00:00
Ed Maste
8d56b202dd Handle DW_TAG_unspecified_type
2011-11-14  Jim Ingham  <jingham@apple.com>

        * dwarf2read.c (read_type_die): Handle DW_TAG_unspecified_type.
        (read_tag_unspecified_type): New function, add a type for the
        DW_TAG_unspecified_type die.

Obtained from:	Apple, gdb-1752
2013-06-12 20:11:49 +00:00
Ed Maste
513f8c0cb8 Handle DW_TAG_rvalue_reference_type
2012-05-21  Jim Ingham <jingham@apple.com>

      * dwarf2read.c (process_die): Handle DW_TAG_rvalue_reference_type.
      (read_type_die): Ditto.
      (dwarf_tag_name): Ditto.

      * elf/dwarf2.h: Add DW_TAG_rvalue_reference_type.

Obtained from:	Apple, gdb-1820
2013-06-12 20:05:19 +00:00
Dimitry Andric
284c197886 Upgrade our copy of llvm/clang to 3.3 release.
Release notes are still in the works, these will follow soon.

MFC after:	1 month
2013-06-12 18:48:53 +00:00
Jung-uk Kim
9745a2624c Fix build for FreeBSD. We do not have alloca.h. 2013-06-05 21:28:33 +00:00
Jung-uk Kim
1bfc81bb23 Add GNU regex from glibc 2.17. 2013-06-05 21:27:04 +00:00
Dimitry Andric
89d5a4380e Pull in r183297 from upstream llvm trunk:
PR15662: Optimized debug info produces out of order function
  parameters

  When a function is inlined we lazily construct the variables
  representing the function's parameters. After that, we add any
  remaining unused parameters.

  If the function doesn't use all the parameters, or uses them out of
  order, then the DWARF would produce them in that order, producing a
  parameter order that doesn't match the source.

  This fix causes us to always keep the arg variables at the start of
  the variable list & in the original order from the source.

Reported by:	avg
MFC after:	1 week
2013-06-05 19:46:39 +00:00
Simon J. Gerraty
74d2e02b85 Update to bmake-20130604 to fix file descriptor leak. 2013-06-05 16:12:50 +00:00
Jason Evans
f8ca2db1f8 Update jemalloc to version 3.4.0. 2013-06-03 14:36:28 +00:00
Pedro F. Giffuni
b7875bd695 Revert: Use time_t instead of long for archive timestamps.
Back out for now: this breaks the i386 build and requires some revision.
2013-06-01 18:03:01 +00:00
Pedro F. Giffuni
53eda80d00 BFD: Use time_t instead of long for archive timestamps.
This basically follows the suggestion in the binutils code and is more
in line with what BSD ar(1) does.

Obtained from:	OpenBSD
MFC after:	2 weeks.
2013-06-01 14:16:51 +00:00
Ed Schouten
6306ff32fd Pull in r183033 and r183036 from LLVM trunk:
Add support for optimized (non-generic) atomic libcalls.

  For integer types of sizes 1, 2, 4 and 8, libcompiler-rt (and libgcc)
  provide atomic functions that pass parameters by value and return
  results directly.

  libgcc and libcompiler-rt only provide optimized libcalls for
  __atomic_fetch_*, as generic libcalls on non-integer types would make
  little sense. This means that we can finally make __atomic_fetch_*
  work
  on architectures for which we don't provide these operations as
  builtins
  (e.g. ARM).

  This should fix the dreaded "cannot compile this atomic library call
  yet" error that would pop up once every while.

This should make it possible for me to get C11 atomics working on all of
our platforms.
2013-06-01 08:07:09 +00:00
Pedro F. Giffuni
9636f78ba3 GCC: bring back experimental support for amdfam10/barcelona CPUs.
Initial support for the AMD amdfam10 chipsets has been available in the
gcc43 branch under GPLv2. AMD and some linux distributions (OpenSUSE) did
a backport of the amdfam10 support and made it available.

This is a revised subset of the support initially brought in in r236962
and later reverted. The collateral efects seem to have disappeared but
it is still recommended to set the CPUTYPE with caution.

Reviewed by:	jkim (ages ago)
MFC after:	3 weeks
2013-06-01 01:02:24 +00:00
Xin LI
049c53d3ff MFV: Redo the fixup using the submitted version accepted by upstream. 2013-05-31 22:55:23 +00:00
Marcel Moolenaar
f2e6a017d5 Fix "automatic" login, broken by revision 69825 (12 years, 5 months ago).
The "automatic" login feature is described as follows:
The USER environment variable holds the name of the person telnetting in.
This is the username of the person on the client machine. The traditional
behaviour is to execute login(1) with this username first, meaning that
login(1) will prompt for the password only. If login fails, login(1) will
retry, but now prompt for the username before prompting for the password.

This feature got broken by how the environment got scrubbed. Before the
change in r69825 we removed variables that we deemed dangerous. Starting
with r69825 we only keep those variable we know to be safe.

The USER environment variable fell through the cracks. It suddenly got
scrubbed (i.e. removed from the environment) while still being checked
for. It also got explicitly removed from the environment to handle the
failed login case.

The fix is to obtain the value of the USER environment variable before
we scrub the environment and used the "cached" in subsequent checks.
This guarantees that the environment does not contain the USER variable
in the end, while still being able to implement "automatic" login.

Obtained from:	Juniper Networks, Inc.
2013-05-31 17:30:12 +00:00
Xin LI
c4becf7370 Revert files with no local changes to their vendor state to ease future
upgrading.
2013-05-31 00:31:45 +00:00
Xin LI
4700d89d50 Remove unused files. 2013-05-31 00:21:05 +00:00
Xin LI
356c1037fa Diff reduction against tcpdump revision 949a22064d3534eddeb8aa2b9c36a50e45fe16fa. 2013-05-30 21:25:55 +00:00
Xin LI
d03c0883ad MFV: tcpdump 4.4.0.
MFC after:	4 weeks
2013-05-30 20:51:22 +00:00
Baptiste Daroussin
5b91e83f53 Update byacc to 20130304 2013-05-30 16:16:28 +00:00
Xin LI
edc89b24f3 MFV: libpcap 1.4.0.
MFC after:	4 weeks
2013-05-30 08:02:00 +00:00
Marcel Moolenaar
5686c6c38a Modify atf::fs::path::get_process_helpers_path API to properly
handle pathing with detail/ tests. Based on patch pushed upstream to
ATF project.

Obtained from:	Garrett Cooper <yaneurabeya@gmail.com>
2013-05-29 19:41:36 +00:00
Dimitry Andric
9448dd00b0 Fix warnings from newer clang versions about constexpr member functions
not being implicitly const in libc++'s <chrono> header.  The warnings
have been introduced because of new language rules recently adopted by
the C++ WG.  More info:

<http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2013/n3598.html>

MFC after:	3 days
2013-05-28 20:11:28 +00:00
Dimitry Andric
b3eb0ffbc9 Pull in r182656 from upstream llvm trunk:
LoopVectorize: LoopSimplify can't canonicalize loops with an
  indirectbr in it, don't assert on those cases.

  Fixes PR16139.

This should fix clang assertion failures when optimizing at -O3, similar
to:

  Assertion failed: (TheLoop->getLoopPreheader() && "No preheader!!"),
  function canVectorize, file
  contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp, line 2171.

Reported by:	O. Hartmann <ohartman@zedat.fu-berlin.de>
PR:		ports/178332, ports/178977
MFC after:	3 days
2013-05-26 14:14:42 +00:00
Marcel Moolenaar
9dfba391d6 Make the malloc(3) family of functions weak and make their non-weak
implementations visible for use by applications. The functions $F that
are now weak symbols are:
	allocm, calloc, dallocm, free, malloc, malloc_usable_size,
	nallocm, posix_memalign, rallocm, realloc, sallocm

The non-weak implementations of $F are exported as __$F.

Submitted by:	stevek@juniper.net
Reviewed by:	jasone@, kib@
Approved by:	jasone@ (jemalloc)
Obtained from:	juniper Networks, Inc
2013-05-25 18:59:11 +00:00
Jung-uk Kim
9c5a52cf88 Work around build breakages with GCC 4.2.
Reported by:	tinderbox
2013-05-23 05:42:35 +00:00
Jung-uk Kim
aec5199f85 Enable GNU m4 compatibility mode. 2013-05-21 19:23:49 +00:00
Jung-uk Kim
a994b2242d Allow YY_NO_UNPUT to disable unput() for backward compatibility. 2013-05-21 19:22:42 +00:00
Jung-uk Kim
5ad5113ebd Define yy_current_buffer for backward compatibility. 2013-05-21 19:21:26 +00:00
Jung-uk Kim
fd3b3c3ae6 Do not use log10(3) to get rid of libm dependency. It is really not useful. 2013-05-21 19:20:03 +00:00
Jung-uk Kim
8acd331814 Reduce compiler warnings. 2013-05-21 19:17:02 +00:00
Jung-uk Kim
e1fc19713a Apply still relevant local changes.
r124183:	Work around a `label defined but not used' warning.
r179549:	De-register declarations.
r179657:	De-register declarations in non-dot-c files.
r181269:	Mark yy_fatal_error() as __dead2.
r228992:	Spelling fixes.
r240518:	Correct double "the the".
2013-05-21 19:11:11 +00:00
Jung-uk Kim
3e102307b7 Add flex 2.5.37 from flex.sourceforge.net to contrib. 2013-05-21 19:09:30 +00:00
Simon J. Gerraty
52d8625616 Sync with upstream version (20130520) that includes same fixes made last week. 2013-05-20 22:51:11 +00:00
Simon J. Gerraty
4fc82fe44c Fix wildcard srcs for phony targets 2013-05-18 13:24:53 +00:00
Simon J. Gerraty
2c6a3af9ab Match what is in netbsd. 2013-05-18 13:15:19 +00:00
Simon J. Gerraty
6088328518 Var_Delete: expand name to delete if needed. 2013-05-18 13:07:01 +00:00
Simon J. Gerraty
8ebb983529 We really need to get the bsd.own.mk from this tree so the
correct options are set.
Also defined NO_PWD_OVERRIDE to match behavior of fmake.
2013-05-17 19:37:16 +00:00
Hiren Panchasara
a385d0b340 Add tcp header flags ECE and CWR defined in RFC 3168.
PR:	140349
Submitted by:	Alan Amesbury <amesbury@umn.edu> (earlier version)
Reviewed by:	delphij
Approved by:	sbruno (mentor)
2013-05-16 05:16:56 +00:00
Jaakko Heinonen
29c4b7861b Rename O_DIRECTORY to O_TMP_DIRECTORY to avoid shadowing the fcntl.h
O_DIRECTORY flag.

PR:		bin/173924
Obtained from:	git://repo.or.cz/nvi.git
2013-05-15 18:41:49 +00:00
Dimitry Andric
779aaa5564 Pull in r181286 from upstream llvm trunk:
LoopVectorize: getConsecutiveVector must respect signed arithmetic

  We were passing an i32 to ConstantInt::get where an i64 was needed and we must
  also pass the sign if we pass negatives numbers. The start index passed to
  getConsecutiveVector must also be signed.

  Should fix PR15882.

This should fix Firefox crashes some people have been reporting, when it
is compiled with -O3.
2013-05-13 07:02:15 +00:00
Xin LI
7bd2567c7c MFV: less v458.
MFC after:	2 weeks
2013-05-13 06:52:46 +00:00
Pedro F. Giffuni
691f7fadcd Add support for "d" floating-point suffix, as defined by draft N1312
of TR 24732. Emit pedantic warning if the feature is being used.

Should solve GCC bug 39027.

Obtained from:	OpenBSD
MFC after:	2 weeks
2013-05-12 15:29:35 +00:00
Pedro F. Giffuni
fcd6d20340 Update the gcc43 changelog.
The issue solved in r250392 actually originated upstream and was
fixed in upstream gcc43 branch in 2006/10/24 (under GPLv2).

Register it in the appropriate ChangeLog for reference.

MFC after:	3 days
2013-05-12 03:36:28 +00:00
Dimitry Andric
ca21efa1b5 For some reason, the gcc intrinsics header tmmintrin.h was imported with
two copies of itself pasted together.  Remove the extraneous copy.

MFC after:	3 days
2013-05-08 22:50:36 +00:00
Mikolaj Golub
b96e78e02c Register OID for HAST module.
MFC after:	2 weeks
2013-05-08 20:04:32 +00:00
Davide Italiano
92a4d9bcc8 Completely rewrite the interface to smbdev switching from dev_clone
to cdevpriv(9). This commit changes the semantic of mount_smbfs
in userland as well, which now passes file descriptor in order to
to mount a specific filesystem istance.

Reviewed by:	attilio, ed
Tested by:	martymac
2013-05-04 14:03:18 +00:00
Jung-uk Kim
a7880d59c9 Improve compatibility with recent flex from flex.sourceforge.net. 2013-05-03 23:51:32 +00:00
Simon J. Gerraty
07290e58ff Local hack to allow smooth transition for ports.
bsd.port.mk can set .MAKE.FreeBSD_UL=yes
to cause :L and :U to have their old behavior.
This should be reverted when 8.3 is EOL.

PR:		173299
Reviewed by:	obrien
2013-05-01 23:58:39 +00:00
Dimitry Andric
1bf9f7c1c5 Merge libc++ trunk r180598. Contains several minor cleanups and bug
fixes, no major changes.

MFC after:	2 weeks
2013-04-27 22:47:52 +00:00
Dimitry Andric
d9e22925e0 Merge libcxxrt c812a07cd2f95c1403baf0bbe0366e7618d1d6d3:
* Don't call the _fast version of the TLS accessor in terminate() or
  unexpected().
  1) TLS may not have been set up yet.
  2) When we're in one of these functions, Really Bad Stuff has
     happened and potentially saving a few cycles really isn't
     important.
* Merge in fixes from FreeBSD trunk to make atomics work with recent
  clang.

MFC after:	1 week
2013-04-27 19:26:56 +00:00
Gleb Smirnoff
8cc5fb3d91 Restore the ipNetToMedia MIB, that was broken with new ARP commit
in the r186119.

Submitted by:	Konstantin Kukushkin <dark rambler-co.ru>
2013-04-25 16:23:22 +00:00
Dimitry Andric
5c47cd667d Pull in r180121 from upstream llvm trunk:
LoopVectorizer: Fix 15830. When scalarizing and unrolling stores make
  sure that the order in which the elements are scalarized is the same
  as the original order.
  This fixes a miscompilation in FreeBSD's regex library.

This should fix lib/libc/regex/regcomp.c at -O3 with clang 3.3 r178860
on CPUs with SSE.  Before this change, the vectorizer could incorrectly
rearrange the second loop in computejumps(), leading to possibly invalid
entries in the re_gets::charjump table.

The net result was that for example "sed s/@CC@/foo/" failed to work
correctly, leading to trouble with many configure scripts.
2013-04-23 18:58:39 +00:00
Gregory Neil Shapiro
b0b88fe82d Update for sendmail 8.14.7
MFC after:	4 days
2013-04-21 17:09:51 +00:00
Gregory Neil Shapiro
552d4955b8 Merge sendmail 8.14.7 to HEAD
MFC after:	4 days
2013-04-21 17:08:44 +00:00
Gregory Neil Shapiro
e388eedd7a Import sendmail 8.14.7 2013-04-21 16:35:04 +00:00
Edwin Groothuis
b1fd06c7f7 Merge of vendor of 249690, tzdata2013c
- antarctica: AusAQ and ATAQ have been removed.
- Antarctica/Macquarie has been moved to australasia file and AU.
- Asia/Hebron, Palestine updated for 2013.
- Paraguay stays with DST for the whole year.
2013-04-20 11:42:10 +00:00
Andrew Turner
b00bf67dd2 Fix the value of NT_FREEBSD_TAG to be the same as ABI_NOTRTYPE in lib/csu.
Add NT_FREEBSD_NOINIT_TAG for the value of CRT_NOINIT_NOTETYPE.
Check for both of these when detecting a FreeBSD binary in gdb.
2013-04-18 02:20:58 +00:00
Xin LI
3719c1c85c Reflect version update.
MFC after:	13 days
2013-04-15 18:35:09 +00:00
Xin LI
0772266e63 MFV r249496,249498. The most visible change is that we no longer shuts
down the connection when stdin closes, by default.  This matches Hobbit's
original netcat and GNU netcat.

Old behavior can be restored with the new -N flag.

MFC after:	2 weeks
2013-04-15 05:31:59 +00:00
Dag-Erling Smørgrav
fb69d3e351 Backport upstream r684 (OPENPAM_DEBUG enables debugging macros but does
not turn debugging on by default) and add OPENPAM_DEBUG to CFLAGS.
2013-04-14 16:49:27 +00:00
Dag-Erling Smørgrav
308f001bca Clean up the ntop / pton code. Part of a patch which has been submitted
upstream but not yet adopted.
2013-04-13 22:44:48 +00:00
Dimitry Andric
139f7f9bf5 Upgrade our copy of llvm/clang to trunk r178860, in preparation of the
upcoming 3.3 release (branching and freezing expected in a few weeks).

Preliminary release notes can be found at the usual location:
<http://llvm.org/docs/ReleaseNotes.html>

An MFC is planned once the actual 3.3 release is finished.
2013-04-12 17:57:40 +00:00
Dag-Erling Smørgrav
f722e1909c Last remaining prototype issue that still hasn't been fixed upstream. 2013-04-09 13:16:11 +00:00
Dag-Erling Smørgrav
d6e492fe3d Revert local changes and pull in r3828 from upstream. 2013-04-09 13:14:39 +00:00
Ed Schouten
edd6bc7670 Import a new version of NetBSD's mtree.
This version of mtree implements a new flag (-O) that can be used to
restrict the tool to certain pathnames. Also, it fixes a compiler
warning generated by -Wmissing-variable-declarations.

Acked by:	brooks
2013-04-09 06:50:11 +00:00
Dag-Erling Smørgrav
8ed2b5240c Upgrade to 1.4.20. 2013-04-05 09:51:31 +00:00
Dag-Erling Smørgrav
b7579f77d1 Minimal subset of the unbound sources. 2013-04-05 09:43:20 +00:00
Dag-Erling Smørgrav
697291b66c Import unbound 1.4.20 2013-04-05 09:06:26 +00:00
Simon J. Gerraty
1748de26cb Update to bmake-20130330 2013-04-02 21:31:11 +00:00
Matthew D Fleming
e324bf91e8 Fix return type of extattr_set_* and fix rmextattr(8) utility.
extattr_set_{fd,file,link} is logically a write(2)-like operation and
should return ssize_t, just like extattr_get_*.  Also, the user-space
utility was using an int for the return value of extattr_get_* and
extattr_list_*, both of which return an ssize_t.

MFC after:	1 week
2013-04-02 05:30:41 +00:00
Dimitry Andric
9333231988 Similar to r239870 and r239872, teach the other binutils tools about the
DW_FORM_flag_present dwarf attribute, so they do not print errors or
warnings on files that contain it.  (This attribute can be emitted by
newer versions of clang and gcc.)

MFC after:	1 week
2013-03-27 19:21:36 +00:00
Erwin Lansing
378a72e36a Update to 9.8.4-P2
Removed the check for regex.h in configure in order
to disable regex syntax checking, as it exposes
BIND to a critical flaw in libregex on some
platforms. [RT #32688]

Security:	CVE-2013-2266
Approved by:	delphij (mentor)
Sponsored by:	DK Hostmaster A/S
2013-03-27 10:11:43 +00:00
Martin Matuska
70970541ad Merge bugfix from vendor master branch:
Limit write requests to at most INT_MAX.
This prevents a certain common programming error (passing -1 to write)
from leading to other problems deeper in the library.

References:
https://github.com/libarchive/libarchive/commit/22531545514043e0

Reported by:	Xin Li <delphij@FreeBSD.org>
Obtained from:  libarchive (master branch)
2013-03-23 21:34:10 +00:00
Martin Matuska
acc60b03c1 MFV r248590,248594:
Update libarchive to 3.1.2

Some of new features:
  - support for lrzip and grzip compression
  - support for writing tar v7 format
  - b64encode and uuencode filters
  - support for __MACOSX directory in Zip archives
  - support for lzop compresion (external utility)
2013-03-22 13:36:03 +00:00
Pawel Jakub Dawidek
e948704e4b Implement chflagsat(2) system call, similar to fchmodat(2), but operates on
file flags.

Reviewed by:	kib, jilles
Sponsored by:	The FreeBSD Foundation
2013-03-21 22:59:01 +00:00
Andrew Turner
e9a848494f Pull in r177252 from upstream clang trunk:
Make sure to use same EABI version for external assembler as for
 integrated as.

This allows us to use gcc on a world built with clang on ARM.
2013-03-20 08:34:30 +00:00
Andrew Turner
da6b2089d5 do_vfp_vmrs and do_vfp_vmsr should not return anything. 2013-03-18 15:14:36 +00:00
Andrew Turner
e8dde80b1d Add support for the vmsr and vmrs instructions. This supports the system
level version of the instructions. When used in userland the hardware only
allows us to read/write FPSCR.
2013-03-18 08:22:35 +00:00
Andrew Turner
90ab443e31 Some ARM vmov similar to 'vmov.f32 s1, s2' will incorrectly have the second
register added to the symbol table by the assembler. On further
investigation it was found the problem was with the my_get_expression
function. This is called by parse_big_immediate.

Fix this by moving the call to parse_big_immediate to the end of the if,
else if, ..., else block.
2013-03-18 07:41:08 +00:00
Edwin Groothuis
eb185a68f3 MFV of 248305, tzdata2013b
Lots of historical data added.

Morocco: add DST rules for the coming years
Cuba: Doing DST in 2013.
Chili: Will do DST in 2013 as it seems.
2013-03-15 00:27:24 +00:00
Brooks Davis
f1f8908049 Replace our (un)vis(1) commands with implementations from NetBSD to
match our import of the (un)vis(3) APIs.

This adds support for multibyte encoding and the -h and -m flags which
support HTTP and MIME encoding respectively.

PR:		bin/175418
Obtained from:	NetBSD
2013-03-15 00:05:50 +00:00
Brooks Davis
778c12a624 Update to the latest (un)vis(3) sources from NetBSD. This adds
multibyte support[0] and the new functions strenvisx and strsenvisx.

Add MLINKS for vis(3) functions add by this and the initial import from
NetBSD[1].

PR:		bin/166364, bin/175418
Submitted by:	"J.R. Oldroyd" <fbsd@opal.com>[0]
		stefanf[1]
Obtained from:	NetBSD
MFC after:	2 weeks
2013-03-14 23:51:47 +00:00
Dag-Erling Smørgrav
ea80740663 Merge upstream r634:646: correctly parse mixed quoted / unquoted text. 2013-03-04 18:51:53 +00:00
Baptiste Daroussin
e51c53f366 Import libyaml as libbsdyml (private brand name)
LibYAML is a YAML 1.1 parser and emitter under MIT license which will
soon be used by the pkg boostrap (usr.bin/pkg) and bhyve

Reviewed by:	roberto, antoine
2013-03-04 11:27:41 +00:00
Pawel Jakub Dawidek
7493f24ee6 - Implement two new system calls:
int bindat(int fd, int s, const struct sockaddr *addr, socklen_t addrlen);
	int connectat(int fd, int s, const struct sockaddr *name, socklen_t namelen);

  which allow to bind and connect respectively to a UNIX domain socket with a
  path relative to the directory associated with the given file descriptor 'fd'.

- Add manual pages for the new syscalls.

- Make the new syscalls available for processes in capability mode sandbox.

- Add capability rights CAP_BINDAT and CAP_CONNECTAT that has to be present on
  the directory descriptor for the syscalls to work.

- Update audit(4) to support those two new syscalls and to handle path
  in sockaddr_un structure relative to the given directory descriptor.

- Update procstat(1) to recognize the new capability rights.

- Document the new capability rights in cap_rights_limit(2).

Sponsored by:	The FreeBSD Foundation
Discussed with:	rwatson, jilles, kib, des
2013-03-02 21:11:30 +00:00
Pawel Jakub Dawidek
2609222ab4 Merge Capsicum overhaul:
- Capability is no longer separate descriptor type. Now every descriptor
  has set of its own capability rights.

- The cap_new(2) system call is left, but it is no longer documented and
  should not be used in new code.

- The new syscall cap_rights_limit(2) should be used instead of
  cap_new(2), which limits capability rights of the given descriptor
  without creating a new one.

- The cap_getrights(2) syscall is renamed to cap_rights_get(2).

- If CAP_IOCTL capability right is present we can further reduce allowed
  ioctls list with the new cap_ioctls_limit(2) syscall. List of allowed
  ioctls can be retrived with cap_ioctls_get(2) syscall.

- If CAP_FCNTL capability right is present we can further reduce fcntls
  that can be used with the new cap_fcntls_limit(2) syscall and retrive
  them with cap_fcntls_get(2).

- To support ioctl and fcntl white-listing the filedesc structure was
  heavly modified.

- The audit subsystem, kdump and procstat tools were updated to
  recognize new syscalls.

- Capability rights were revised and eventhough I tried hard to provide
  backward API and ABI compatibility there are some incompatible changes
  that are described in detail below:

	CAP_CREATE old behaviour:
	- Allow for openat(2)+O_CREAT.
	- Allow for linkat(2).
	- Allow for symlinkat(2).
	CAP_CREATE new behaviour:
	- Allow for openat(2)+O_CREAT.

	Added CAP_LINKAT:
	- Allow for linkat(2). ABI: Reuses CAP_RMDIR bit.
	- Allow to be target for renameat(2).

	Added CAP_SYMLINKAT:
	- Allow for symlinkat(2).

	Removed CAP_DELETE. Old behaviour:
	- Allow for unlinkat(2) when removing non-directory object.
	- Allow to be source for renameat(2).

	Removed CAP_RMDIR. Old behaviour:
	- Allow for unlinkat(2) when removing directory.

	Added CAP_RENAMEAT:
	- Required for source directory for the renameat(2) syscall.

	Added CAP_UNLINKAT (effectively it replaces CAP_DELETE and CAP_RMDIR):
	- Allow for unlinkat(2) on any object.
	- Required if target of renameat(2) exists and will be removed by this
	  call.

	Removed CAP_MAPEXEC.

	CAP_MMAP old behaviour:
	- Allow for mmap(2) with any combination of PROT_NONE, PROT_READ and
	  PROT_WRITE.
	CAP_MMAP new behaviour:
	- Allow for mmap(2)+PROT_NONE.

	Added CAP_MMAP_R:
	- Allow for mmap(PROT_READ).
	Added CAP_MMAP_W:
	- Allow for mmap(PROT_WRITE).
	Added CAP_MMAP_X:
	- Allow for mmap(PROT_EXEC).
	Added CAP_MMAP_RW:
	- Allow for mmap(PROT_READ | PROT_WRITE).
	Added CAP_MMAP_RX:
	- Allow for mmap(PROT_READ | PROT_EXEC).
	Added CAP_MMAP_WX:
	- Allow for mmap(PROT_WRITE | PROT_EXEC).
	Added CAP_MMAP_RWX:
	- Allow for mmap(PROT_READ | PROT_WRITE | PROT_EXEC).

	Renamed CAP_MKDIR to CAP_MKDIRAT.
	Renamed CAP_MKFIFO to CAP_MKFIFOAT.
	Renamed CAP_MKNODE to CAP_MKNODEAT.

	CAP_READ old behaviour:
	- Allow pread(2).
	- Disallow read(2), readv(2) (if there is no CAP_SEEK).
	CAP_READ new behaviour:
	- Allow read(2), readv(2).
	- Disallow pread(2) (CAP_SEEK was also required).

	CAP_WRITE old behaviour:
	- Allow pwrite(2).
	- Disallow write(2), writev(2) (if there is no CAP_SEEK).
	CAP_WRITE new behaviour:
	- Allow write(2), writev(2).
	- Disallow pwrite(2) (CAP_SEEK was also required).

	Added convinient defines:

	#define	CAP_PREAD		(CAP_SEEK | CAP_READ)
	#define	CAP_PWRITE		(CAP_SEEK | CAP_WRITE)
	#define	CAP_MMAP_R		(CAP_MMAP | CAP_SEEK | CAP_READ)
	#define	CAP_MMAP_W		(CAP_MMAP | CAP_SEEK | CAP_WRITE)
	#define	CAP_MMAP_X		(CAP_MMAP | CAP_SEEK | 0x0000000000000008ULL)
	#define	CAP_MMAP_RW		(CAP_MMAP_R | CAP_MMAP_W)
	#define	CAP_MMAP_RX		(CAP_MMAP_R | CAP_MMAP_X)
	#define	CAP_MMAP_WX		(CAP_MMAP_W | CAP_MMAP_X)
	#define	CAP_MMAP_RWX		(CAP_MMAP_R | CAP_MMAP_W | CAP_MMAP_X)
	#define	CAP_RECV		CAP_READ
	#define	CAP_SEND		CAP_WRITE

	#define	CAP_SOCK_CLIENT \
		(CAP_CONNECT | CAP_GETPEERNAME | CAP_GETSOCKNAME | CAP_GETSOCKOPT | \
		 CAP_PEELOFF | CAP_RECV | CAP_SEND | CAP_SETSOCKOPT | CAP_SHUTDOWN)
	#define	CAP_SOCK_SERVER \
		(CAP_ACCEPT | CAP_BIND | CAP_GETPEERNAME | CAP_GETSOCKNAME | \
		 CAP_GETSOCKOPT | CAP_LISTEN | CAP_PEELOFF | CAP_RECV | CAP_SEND | \
		 CAP_SETSOCKOPT | CAP_SHUTDOWN)

	Added defines for backward API compatibility:

	#define	CAP_MAPEXEC		CAP_MMAP_X
	#define	CAP_DELETE		CAP_UNLINKAT
	#define	CAP_MKDIR		CAP_MKDIRAT
	#define	CAP_RMDIR		CAP_UNLINKAT
	#define	CAP_MKFIFO		CAP_MKFIFOAT
	#define	CAP_MKNOD		CAP_MKNODAT
	#define	CAP_SOCK_ALL		(CAP_SOCK_CLIENT | CAP_SOCK_SERVER)

Sponsored by:	The FreeBSD Foundation
Reviewed by:	Christoph Mallon <christoph.mallon@gmx.de>
Many aspects discussed with:	rwatson, benl, jonathan
ABI compatibility discussed with:	kib
2013-03-02 00:53:12 +00:00
Pawel Jakub Dawidek
a66ffea41d When we are waiting for new trail files we may have been disconnected and
reconnected in the meantime. Check if reset is set before opening next trail
file, as not doing so will result in sending OPEN message with the same
file name twice and this is illegal - the second OPEN is send without first
closing previous trail file.
2013-02-28 01:24:24 +00:00
Andrew Turner
e63b930908 Clear the memory allocated to build the unwind tables. This fixes C++
exceptions on ARM EABI with static binaries.
2013-02-27 06:53:15 +00:00
Xin LI
e3466a89fd Update base system libexpat to 2.1.0.
MFC after:	3 days
2013-02-26 00:58:44 +00:00
Dimitry Andric
b2a67e7b16 Pull in r175962 from upstream llvm trunk:
X86: Disable cmov-memory patterns on subtargets without cmov.

  Fixes PR15115.

For the i386 arch, this should enable cmov instructions only on
-march=pentiumpro and higher.  Since our default CPU is i486, cmov
instructions will now be disabled by default.

MFC after:	1 week
2013-02-23 22:48:12 +00:00
Dimitry Andric
2d97b320fb Pull in r172354 from upstream clang trunk:
Refactor the x86 CPU name logic in the driver and pass -march and -mcpu
  flag information down from the Clang driver into the Gold linker plugin
  for LTO. This allows specifying -march on the linker commandline and
  should hopefully have it pass all the way through to the LTO optimizer.

  Fixes PR14697.

Pull in r175919 from upstream clang trunk:

  Driver: Pass down the -march setting down to -cc1as on x86 too.

  The assembler historically didn't make use of any target features, but this has
  changed when support for old CPUs that don't support long nops was added.

This should fix the long nops that still occurred in crt*.o, and
possibly other object files, if the system was compiled for a CPU that
does not support those, such as Geode.

Note that gcc on i386 also does not pass through any -march, -mcpu or
-mtune setting to gas, but this has not caused any trouble yet, because
gas defaults to i386.

Reported by:	lev
MFC after:	1 week
2013-02-22 22:40:10 +00:00
John-Mark Gurney
ed7ce02c2c reorder so all the flags are together and make the PCLMUL flag unique..
This fixes the problem on amd64 miscompiling mpboot.s causing boot
issues...  We are still using gas for a few files in the kernel...

Submitted by:	kib
MFC after:	1 month
2013-02-21 19:13:19 +00:00
John-Mark Gurney
c9ad522755 add support for AES and PCLMULQDQ instructions to binutils...
Thanks to Mike Belopuhov for the pointer to the OpenBSD patch, though
OpenBSD's gcc is very different that it only helped w/ where to modify,
not how...  Thanks to jhb for some early reviews...

Reviewed by:	imp, kib
MFC after:	1 month
2013-02-19 21:35:17 +00:00
Dimitry Andric
953290ffde Pull in r175360 from upstream llvm trunk:
MCParser: Reject .balign with non-pow2 alignments.

  GNU as rejects them and there are configure scripts in the wild that
  check if the assembler rejects ".align 3" to determine whether the
  alignment is in bytes or powers of two.

MFC after:	3 days
2013-02-19 17:53:32 +00:00
Gregory Neil Shapiro
69b95e367f Merge sendmail 8.14.6 errata issue
MFC after:	3 days
2013-02-18 19:33:07 +00:00
Pawel Jakub Dawidek
7e46ff5f4c Allow [] in remote address, which fixes IPv6 support.
Reported by:	simon
2013-02-18 00:38:40 +00:00
Dag-Erling Smørgrav
c81beee50e #if out unused functions which trip up gcc but not clang. 2013-02-16 22:16:14 +00:00
Dimitry Andric
5f33039834 Import change 40eebf235370b6fe6353784ccf01ab92eed062a5 from upstream wpa:
From: Jouni Malinen <j@w1.fi>
  Date: Fri, 15 Jul 2011 13:42:06 +0300
  Subject: [PATCH] MD5: Fix clearing of temporary stack memory to use correct length

  sizeof of the structure instead of the pointer was supposed to be used
  here. Fix this to clear the full structure at the end of MD5Final().

Found by:	clang ToT
Reviewed by:	rpaulo
MFC after:	3 days
2013-02-16 12:52:40 +00:00
Dimitry Andric
d21f31a1a7 Fix two instances of undefined behaviour in contrib/nvi.
Found by:	clang ToT
Obtained from:	NetBSD
Reviewed by:	jh
MFC after:	3 days
2013-02-16 12:48:06 +00:00
Dimitry Andric
a9fb907e0b In contrib/opie/opiekey.c, use the correct length to zero the secret.
Found by:	clang ToT
Reviewed by:	delphij
MFC after:	3 days
2013-02-16 12:45:57 +00:00
Dimitry Andric
74870cdedf Pull in r175057 from upstream llvm trunk:
X86: Disable generation of rep;movsl when %esi is used as a base pointer.

  This happens when there is both stack realignment and a dynamic alloca in the
  function. If we overwrite %esi (rep;movsl uses fixed registers) we'll lose the
  base pointer and the next register spill will write into oblivion.

  Fixes PR15249 and unbreaks firefox on i386/freebsd. Mozilla uses dynamic allocas
  and freebsd a 4 byte stack alignment.

MFC after:	1 week
2013-02-15 23:12:58 +00:00
Dag-Erling Smørgrav
2787e39aaa Upgrade to 1.6.16 2013-02-15 21:49:12 +00:00
Dag-Erling Smørgrav
6709dfe57a Add generated files 2013-02-15 21:33:05 +00:00
Dag-Erling Smørgrav
2f10c3e258 import ldns 1.6.16 2013-02-15 13:51:54 +00:00
Dag-Erling Smørgrav
7b5038d71c Import LDNS and build it as an internal library. 2013-02-15 13:44:18 +00:00
David Chisnall
cfdf2879c9 Import new libc++ to head. Various small fixes and cleanups.
MFC after:	2 weeks
2013-02-07 15:45:28 +00:00
David Chisnall
fe9b3289e6 Fix a copy-and-paste error in libcxxrt. 2013-02-07 11:08:03 +00:00
Andrew Turner
9d9758ed46 Add #undef TARGET_DEFAULT back as it shouldn't have been removed in r245539 2013-02-04 09:42:12 +00:00
Andrew Turner
93c7e89712 Allow the unwind functions int libgcc_s to interact correctly with libthr.
_Unwind_ForcedUnwind in libgcc_s takes as one of it's parameters a stop
function to tell it when to stop unwinding. One of the stop function's
parameters is a _Unwind_Exception_Class. On most architectures this is an
int64_t, however on ARM EABI the gcc developers have made this a char array
with 8 items. While both of these take the same space they are passed into
the stop function differently, an int64_t is passed in in registers r2 and
r3, while the char[8] is passed in as a pointer to the first item in
register r2.

Because libthr expects the value to be an int64_t we would get incorrect
results when it passes a function that take an int64_t but libgcc passes in
a pointer to a char array including crashing.

The fix is to update libgcc_s to make it pass an int64_t to the stop
function and to libstdc++ as it expects _Unwind_Exception_Class to be an
array.
2013-02-04 09:28:36 +00:00
Andrew Turner
42fe3ad9b1 Extend GDB to check the value in the .note.tag section along with the
.note.ABI-tag section.

This helps on ARM EABI where the OS/ABI field is zero. It would be better
to use the NOTES program header however this would require a more invasive
change.
2013-02-04 06:59:33 +00:00
Dimitry Andric
df5d2454a3 Pull in r170135 from upstream clang trunk:
Dont use/link ARCMT, StaticAnalyzer and Rewriter to clang when the user
  specifies not to. Dont build ASTMatchers with Rewriter disabled and
  StaticAnalyzer when it's disabled.

  Without all those three, the clang binary shrinks (x86_64) from ~36MB
  to ~32MB (unstripped).

To disable these clang components, and get a smaller clang binary built
and installed, set WITHOUT_CLANG_FULL in src.conf(5).  During the
initial stages of buildworld, those extra components are already
disabled automatically, to save some build time.

MFC after:	1 week
2013-02-02 22:28:29 +00:00
Tim Kientzle
3fd25813ed Fix an obvious typo that broke time specifications of the form
"2 hours ago".
2013-02-02 06:06:39 +00:00
Simon J. Gerraty
3cbdda60ff Merge bmake-20130123
Approved by:	marcel (mentor)
2013-02-01 22:55:27 +00:00
Gleb Smirnoff
9711a168b9 Retire struct sockaddr_inarp.
Since ARP and routing are separated, "proxy only" entries
don't have any meaning, thus we don't need additional field
in sockaddr to pass SIN_PROXY flag.

New kernel is binary compatible with old tools, since sizes
of sockaddr_inarp and sockaddr_in match, and sa_family are
filled with same value.

The structure declaration is left for compatibility with
third party software, but in tree code no longer use it.

Reviewed by:	ru, andre, net@
2013-01-31 08:55:21 +00:00
Pedro F. Giffuni
646a7fea0c Clean some 'svn:executable' properties in the tree.
Submitted by:	Christoph Mallon
MFC after:	3 days
2013-01-26 22:08:21 +00:00
Jason Evans
70fabd840d Update list of ports required for importing jemalloc. 2013-01-24 03:33:15 +00:00
Jason Evans
88ad2f8dcc Import jemalloc 3.3.0. This reduces zeroed memory validation overhead for
non-MALLOC_PRODUCTION builds.
2013-01-24 03:08:37 +00:00
David Chisnall
d5861eaae8 Import new fix from libcxxrt. This fixes the case where you attempt to rethrow
an exception when you haven't caught one.  This is largely a cosmetic fix, as
(unless you have a very unusual terminate handler installed) it will print a
nice error and then abort, rather than just aborting.

MFC after:     7 days
2013-01-21 17:37:23 +00:00
Andrew Turner
e2a7ad82f2 Don't use the pcs attribute on compilers that don't support it. We can
revert this when we stop supporting old versions of gcc.
2013-01-19 02:24:14 +00:00
Andrew Turner
3eace1b98b Add a newline at the end of the file to stop gcc from complaining 2013-01-19 02:22:01 +00:00
Andrew Turner
33b61a0b06 Import compiler-rt r172839.
This brings in __aeabi_lcmp and __aeabi_ulcmp. It also fixes the spelling
of __aeabi_f2lz. Both changes originated on the arm_eabi project branch.
2013-01-18 22:52:59 +00:00
Andrew Turner
1992e9a10c Add compiler support for the ARM EABI.
ARM EABI support is disabled by default and can be enabled by setting
WITH_ARM_EABI when building, however only the kernel-toolchain target will
work with this flag until the rest of the support is added.
2013-01-17 05:56:28 +00:00
Andrew Turner
ed53231d73 Switch the default CPU to an arm9. This removes compiler support for the
unsupported 26-bit addressing mode. This change is required for moving to
the ARM EABI.
2013-01-14 08:39:48 +00:00
David Chisnall
f795bc7ccc Fix libcxxrt / libc++ build with the clang in head.
Pointy hat to:	theraven
2013-01-12 10:06:59 +00:00
David E. O'Brien
4ebb86b33b Add support for Lua 5.2.
Submitted by:	skreuzer
2013-01-11 17:34:30 +00:00
David Chisnall
f7cb16572f Merge new version of libcxxrt. This brings in three fixes:
- Don't treat pointers to members as pointers in catch blocks (they're usually
  fat pointers).

- Correctly catch foreign exceptions in catchalls.

- Ensure that a happens-before relationship is established when setting
  terminate handlers in one thread and calling them in another.
2013-01-11 15:05:55 +00:00
Dimitry Andric
bfd6a1d202 Add an ugly hack to libgcc's unwind code, to make it behave properly at
runtime on amd64, when it is compiled by clang.  Some versions of clang
don't save and restore all callee registers, if a __builtin_eh_return()
intrinsic is used in a function.  This is particularly bad on amd64.

Until the problem gets fixed by upstream, use an asm statement to force
clang to assume the registers in question are clobbered, when invoking
__builtin_eh_return(), so it will emit code to save and restore them.

This should fix the crashes reported on -current with some C++ programs,
particularly those that throw exceptions over multiple function
boundaries.

Reported by:	stefanf
MFC after:	3 days
2013-01-10 23:36:02 +00:00
Xin LI
0840e960f9 MFV: one-true-awk 20121220.
MFC after:	1 month
2013-01-03 07:25:30 +00:00
Nathan Whitehorn
1971864966 Revert r241818 that updated dialog to 20120706. This turns out to horribly
break mixed form dialogs in conjunction with the FreeBSD termcap, making
the bsdinstall partition editor Add dialog, among other things, completely
nonfunctional. This restores dialog 20110707.
2012-12-30 04:22:34 +00:00
Gregory Neil Shapiro
14597e761a Update import info based on recent experiences and sendmail 8.14.6 import.
MFC after:	4 days
2012-12-29 20:38:57 +00:00
Gregory Neil Shapiro
ba00ec3d53 Merge sendmail 8.14.6 to HEAD
MFC after:	4 days
2012-12-29 20:30:46 +00:00
Pedro F. Giffuni
833966f999 gcc: avoid generating negative values to DW_AT_byte_size.
The previous change was actually a NOP because size is
unsigned and compilers are dumb.

Submitted by:	Christoph Mallon
MFC after:	1 week
2012-12-28 22:06:50 +00:00
Pedro F. Giffuni
b76bfc09c3 gcc: avoid generating negative values to DW_AT_byte_size.
There is a bug in gcc (GCC/35998) where dwarf reports
sizes of unsigned -1 (0xffffffff).

On NetBSD this generated a faulty CTF entry which then
caused a segfault in ctfmerge. The issue was worked
around in NetBSD's Dtrace but since the issue originated
in gcc, it seems reasonable to fix it here.

Upstream gcc has been slow to react to this issue and
the author that submitted the patch is not interested
in licensing the change to us, so I did an independent
workaround for the issue.

MFC after:	1 week
2012-12-28 19:02:28 +00:00
Andrew Turner
b8d52352a7 Fix the __glibcxx_min and __glibcxx_max macros for a signed wchar_t.
* The __glibcxx_max macro came from GCC svn r138078, the last GPLv2
  revision of this file.
* I wrote the updated __glibcxx_min macro.
2012-12-25 07:37:33 +00:00
Andrew Turner
0d526975ee Pull in r170096 from upstream clang trunk:
Initial support for FreeBSD on ARM.
2012-12-23 21:41:39 +00:00
Dimitry Andric
c80e6c4bec Upgrade our copy of llvm/clang to 3.2 release.
Release notes for llvm:
http://llvm.org/releases/3.2/docs/ReleaseNotes.html

Release notes for clang:
http://llvm.org/releases/3.2/tools/clang/docs/ReleaseNotes.html

MFC after:	2 weeks
2012-12-23 13:04:00 +00:00
Martin Matuska
3632bc4c71 MFV r244559:
Update contrib/xz to version 5.0.4

MFC after:	2 weeks
2012-12-22 21:32:12 +00:00
Dimitry Andric
64ea2f800e Fix a bug in ld --gc-sections: it strips out .note sections, while it
should never do so.  This can cause global constructors and destructors
to not be executed at run-time, resulting in crashes and other strange
behaviour.

Reported by:	rene
MFC after:	1 week
2012-12-22 20:46:46 +00:00
Dimitry Andric
d1ff5f1ee2 Pull in r170353 from upstream llvm trunk:
Fix another SROA crasher, PR14601.

  This was a silly oversight, we weren't pruning allocas which were used
  by variable-length memory intrinsics from the set that could be widened
  and promoted as integers. Fix that.

This should fix the following assertion failure:

  Assertion failed: (CanSROA), function visitUsers, file
  /usr/src/lib/clang/libllvmscalaropts/../../../contrib/llvm/lib/Transforms/Scalar/SROA.cpp,
  line 2395.

Reported by:	gerald
2012-12-22 20:16:21 +00:00
Brooks Davis
c6ec7d3183 Add NetBSD's mtree to the tree and install it as nmtree as the first step
towards replacing our mtree.

Sponsored by:	DARPA, AFRL
Thanks to:	cristos@NetBSD for reviewing and committing my patches
		wiz@NetBSD for fixing typos in my patches
2012-12-21 21:00:00 +00:00
Ed Maste
6b926c8f45 Support restrict qualifier in dwarf debug info
Newer clang/llvm emit DW_TAG_restrict_type, which wasn't handled by gdb.
Import support from Apple's gdb-1822:

|  2009-03-24  Jason Molenda  (jmolenda@apple.com)
|
|    * gdbtypes.c (make_cv_type): Rename this function to make_cvr_type to
|    also handle restrict qualifiers.
|    (check_typedef): Handle TYPE_RESTRICT.
|    * gdbtypes.h (TYPE_FLAG_RESTRICT, TYPE_RESTRICT): New.
|    * hpread.c (hpread_type_lookup): Update to use make_cvr_type.
|    * stabsread.c (read_type): Pass the restrict qualifiers along.
|    * parse.c (follow_types): Pass the restrict qualifiers along.
|    * dwarf2read.c (read_tag_const_type): Call make_cvr_type.
|    (read_tag_volatile_type): Same.
|    (read_tag_restrict_type): New function.
|    (read_type_die): Handle DW_TAG_restrict_type.

Obtained from: Apple
Sponsored by: ADARA Networks
2012-12-19 16:23:20 +00:00
Brooks Davis
8ccca1222d Replace our implementation of the vis(3) and unvis(3) APIs with
NetBSD's.  This output size limited versions of vis and unvis functions
as well as a set of vis variants that allow arbitrary characters to be
specified for encoding.

Finally, MIME Quoted-Printable encoding as described in RFC 2045 is
supported.
2012-12-18 16:37:24 +00:00
Andrew Turner
d131070105 Don't define CTORS_SECTION_ASM_OP and DTORS_SECTION_ASM_OP on arm when
built with clang. When these are defined the lists are defined similar to:

asm(".section .ctors");
STATIC func_ptr __CTOR_LIST__[1] = { (func_ptr) (-1) };
asm(".section .dtors");
STATIC func_ptr __DTOR_LIST__[1] = { (func_ptr) (-1) };

The problem is clang will move the two arrays out of the .ctors and .dtors
sections causing these sections to contain a single null address. By not
defining these macros we use the version of the code that places the arrays
is their sections by using __attribute__((section(".ctors"))) and similar
for .dtors.

Submitted by:	Daisuke Aoyama <aoyama AT peach.ne.jp>
2012-12-15 21:24:31 +00:00
Andrew Turner
384f99dea7 Recognise vfpv2 as a value for the ARM .fpu asm directive. Clang generates
these even when building soft floating-point code

Submitted by:	Daisuke Aoyama <aoyama AT peach.ne.jp>
2012-12-15 21:12:13 +00:00
Andrew Turner
2890206e6e Fix a comment in an asm block to work with compilers other than GCC 2012-12-15 21:06:14 +00:00
Robert Watson
f7d2299713 Merge OpenBSM 1.2-alpha3 from the vendor branch to 10-CURRENT; this version
included various upstreamed patches from the FreeBSD base to make OpenBSM
compile more easily with bmake, higher warning levels, clang, and several
other loose ends.

Obtained from:	TrustedBSD Project
2012-12-15 14:59:00 +00:00
Rui Paulo
07fb19177d Bump MAX_COLS to 512 to take advantage of wider terminals. 2012-12-13 06:45:45 +00:00
Erwin Lansing
cfd4d2c42e Update to 9.8.4-P1.
Security Fixes

   Prevents named from aborting with a require assertion failure
   on servers with DNS64 enabled.  These crashes might occur as a
   result of  specific queries that are received.

New Features

*  Elliptic Curve Digital Signature Algorithm keys and signatures in
   DNSSEC are now supported per RFC 6605. [RT #21918]

Feature Changes

*  Improves OpenSSL error logging [RT #29932]

*  nslookup now returns a nonzero exit code when it is unable to get
   an answer.  [RT #29492]

Other critical bug fixes are included.

Approved by:	delphij (mentor)
MFC after:	3 days
Security:	CVE-2012-5688
Sponsored by:	DK Hostmaster A/S
2012-12-07 12:39:58 +00:00
Eitan Adler
37a6031461 Clean up hardcoded ar(1) flags in the tree to use the global ARFLAGS in
share/mk/sys.mk instead.

This is part of a medium term project to permit deterministic builds of
FreeBSD.

Submitted by:	Erik Cederstrand <erik@cederstrand.dk>
Reviewed by:	imp, toolchain@
Approved by:	cperciva
MFC after:	2 weeks
2012-12-06 01:31:25 +00:00
Dimitry Andric
3861d79fd7 Upgrade our copy of llvm/clang to r168974, from upstream's release_32
branch.  This is effectively llvm/clang 3.2 RC2; the 3.2 release is
coming soon.
2012-12-03 19:24:08 +00:00
Xin LI
21fa654189 MFV: less v456. 2012-12-03 19:00:23 +00:00
Robert Watson
aa77200569 Merge OpenBSM 1.2-alpha2 from vendor branch to FreeBSD 10-CURRENT; the
primary new feature is auditdistd.

Obtained from:	TrustedBSD Project
Sponsored by:	The FreeBSD Foundation (auditdistd)
2012-12-01 11:58:08 +00:00
David Chisnall
fb6c5de628 Merge new libc++ into head. 2012-11-29 13:35:44 +00:00
Hajimu UMEMOTO
a944d3c61e cyrus-sasl 2.1.26 was released. In this version, the type of callback
functions was changed from "unsigned long" to "size_t".

Reviewed by:	gshapiro
MFC after:	3 days
2012-11-28 11:47:47 +00:00
Dimitry Andric
5f5f8832fb Pull in r168610 from upstream libc++:
When using libc++ headers on FreeBSD, in combination with -std=c++98,
  -ansi or -std=c++03, the long long type is not supported.  So in this
  case, several functions and types, like lldiv_t, strtoll(), are not
  declared.

This should make it possible to use the libc++ headers in c++98 mode.

Note: libc++ is originally designed as a c++0x or higher library, so you
should still take care when using it with c++98 or c++03.

Noted by:	Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>
MFC after:	1 week
2012-11-26 21:32:31 +00:00
Colin Percival
43f13bea35 MFS security patches which seem to have accidentally not reached HEAD:
Fix insufficient message length validation for EAP-TLS messages.

Fix Linux compatibility layer input validation error.

Security:	FreeBSD-SA-12:07.hostapd
Security:	FreeBSD-SA-12:08.linux
Security:	CVE-2012-4445, CVE-2012-4576
With hat:	so@
2012-11-23 01:48:31 +00:00
Simon J. Gerraty
59a02420d8 Merge bmake-20121111
Also pay attention to MK_SHARED_TOOLCHAIN.

Approved by:	marcel (mentor)
2012-11-16 01:37:25 +00:00
Marcel Moolenaar
701791c75b Add ATF update instructions and file exclude list.
Submitted by:	Garrett Cooper <yanegomi@gmail.com>
2012-11-15 04:51:37 +00:00
Marcel Moolenaar
8017b8a3c1 The *_STR* macros use strcmp() to check their arguments. Include string.h
to have this definition available.
Upstream commit: 1dc1884f778f88811583e6a54610a6d7e421ca63

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
2012-11-15 04:42:30 +00:00
Marcel Moolenaar
89e54125a4 Add support for DragonFly and FreeBSD.
Upstreamed:
    http://code.google.com/p/kyua/issues/detail?id=45

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
2012-11-15 04:32:55 +00:00
Marcel Moolenaar
112988e702 Fix typos in description for exp{err,out}_mismatch_head.
Upstreamed:
    http://code.google.com/p/kyua/issues/detail?id=44

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
2012-11-15 04:29:12 +00:00
Marcel Moolenaar
a4fb74f1ac Remove redundant text describing the cleanup routine.
Upstreamed:
    http://code.google.com/p/kyua/issues/detail?id=43

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
2012-11-15 04:24:17 +00:00
Edwin Groothuis
f09b8c49d8 Merge of vendor import of 242999, tzdata2012j
- Libya went to Standard Time on 10 November 2012
2012-11-13 21:10:50 +00:00
David Chisnall
1e0896ace6 Import new version of libc++ into base. 2012-11-13 03:27:43 +00:00
Ed Maste
c73d086b04 Do not unwind past a zero PC frame.
This improves GDB usability when debugging code compiled with
optimization.

Upstream GDB revision f0031b6d3ae9b164b3747986ab898190bd4dcf8c (prior
to GDB's switch to GPLv3), with frame_debug_got_null_frame expanded
inline.

| 2004-12-12  Andrew Cagney  <cagney@gnu.org>
|
| * frame.c (get_prev_frame): When unwinding normal frames, check
| that the PC isn't zero.

Sponsored by:	ADARA Networks
MFC After:	1 month
2012-11-13 03:05:28 +00:00
Ed Maste
b4b74d6100 Set optimized_out instead of reporting an error.
This provides a better display when debugging code compiled with
optimization on.

GDB git revision e8395b4efd184f745070afb953f451f99e922be7 (prior to GDB's
switch to GPLv3), modified for the interfaces provided by GDB 6.1.1.

2005-02-28  Daniel Jacobowitz  <dan@codesourcery.com>

 * dwarf2loc.c (loclist_read_variable): Set optimized_out
 instead of reporting an error.
 * valprint.c (value_check_printable): New function.
 (common_val_print): New function.  Use value_check_printable.
 (value_print): Use value_check_printable.
 * value.h (common_val_print): Add prototype.
 * c-valprint.c (c_val_print): Use common_val_print.
 * cp-valprint.c (cp_print_value_fields): Likewise.
 (cp_print_hpacc_virtual_table_entries): Likewise.
 * f-valprint.c (f_val_print): Likewise.
 * jv-valprint.c (java_value_print, java_print_value_fields):
 Likewise.
 * scm-valprint.c (scm_value_print): Likewise.
 * stack.c (print_frame_args): Likewise.
 * varobj.c (c_value_of_variable): Likewise.
 * p-valprint.c (pascal_val_print, pascal_value_print): Likewise.
 (pascal_object_print_value_fields): Likewise.  Update call to
 pascal_object_print_static_field.
 (pascal_object_print_static_field): Remove TYPE argument.  Use
 common_val_print.

Sponsored by:	ADARA Networks
MFC after:	1 month
2012-11-13 01:21:17 +00:00
Edwin Groothuis
e10f650296 Merge of vendor import of 242925, tzdata2012i
Update to tzdata2012i:
- Cuba is changing back to Standard Time on 4 November 2012.
2012-11-12 20:44:59 +00:00
Rui Paulo
2c141bfc43 Add "pid" to the help menu (sort keys section). 2012-11-11 08:22:58 +00:00
Jason Evans
82872ac086 Import jemalloc 3.2.0. 2012-11-10 01:46:13 +00:00
Dimitry Andric
39d9149396 Reduce LLVM's default stack alignment for i386 from 16 to 4 bytes, as
the FreeBSD ABI requires.  This is essentially a revert of upstream llvm
commit r126226, and it will be reverted by upstream too.

MFC after:	1 week
2012-11-09 18:56:27 +00:00
Xin LI
4cc5fc9a0c MFV: less v453. 2012-11-04 20:52:26 +00:00
Dimitry Andric
762496516b Pull in r165377 from upstream llvm trunk:
X86: fcmov doesn't handle all possible EFLAGS, fall back to a branch
  for the others.

  Otherwise it will try to use SSE patterns and fail horribly if sse is
  disabled.

  Fixes PR14035.

This should fix the following assertion failure:

  Assertion failed: (Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP
  register!"), function getFPReg, file
  contrib/llvm/lib/Target/X86/X86FloatingPoint.cpp, line 330.

which can show up when compiling contrib/compiler-rt, using -march=i686
through -march=pentium3 (CPU's which do support fcmov, but don't support
SSE2).

MFC after:	1 week
2012-10-30 22:09:53 +00:00
Edwin Groothuis
2029f58919 Merge of vendor import of tzdata2012h
- Bahia no longer has DST.
- Tocantins has DST.
- Israel has new DST rules next year.
- Jordan stays on DST this winter.
2012-10-28 09:14:42 +00:00
Alexander Kabaev
31e8efde08 Follow clang lead and include mm_malloc.h only in hosted configurations.
This makes the use of intrinsics easier in kernel environment, according
to the submitter.

Requested by: jmg
2012-10-27 17:39:36 +00:00
Simon J. Gerraty
93036677b5 Merge bmake-20121010
Approved by:	marcel (mentor)
2012-10-25 23:18:05 +00:00
Ed Schouten
77d6b25fab Pull in r166498 from upstream clang trunk:
Add a new warning -Wmissing-variable-declarations, to warn about variables
defined without a previous declaration.  This is similar to
-Wmissing-prototypes, but for variables instead of functions.
2012-10-25 10:13:58 +00:00
Dimitry Andric
04a978f91b Pull in r165367 from upstream llvm trunk:
Make sure always-inline functions get inlined. <rdar://problem/12423986>

  Without this change, when the estimated cost for inlining a function with
  an "alwaysinline" attribute was lower than the inlining threshold, the
  getInlineCost function was returning that estimated cost rather than the
  special InlineCost::AlwaysInlineCost value. That is fine in the normal
  inlining case, but it can fail when the inliner considers the opportunity
  cost of inlining into an internal or linkonce-odr function. It may decide
  not to inline the always-inline function in that case. The fix here is just
  to make getInlineCost always return the special value for always-inline
  functions. I ran into this building clang with libc++. Tablegen failed to
  link because of an always-inline function that was not inlined. I have been
  unable to reduce the testcase down to a reasonable size.

This should fix the link errors that were reported when atf-run was
compiled with clang -stdlib=libc++.  In this case, at -O3 optimization,
some calls to basic_ios::clear() were not inlined, even when the
function was marked __always_inline__.

Reported by:	Jan Beich <jbeich@tormail.org>
MFC after:	1 week
2012-10-24 16:39:49 +00:00
Dimitry Andric
387c85f1ca Fix a number of other clang warnings in libstdc++, which could appear
when building other C++ software with it.  Also fix one actual bug in
libsupc++, which was exposed by such a warning.  This latter fix is the
only functional change.

MFC after:	1 week
2012-10-23 18:45:32 +00:00
Dimitry Andric
c9c047798c Fix two clang warnings in the recent atf import. These have also been
sent upstream.

Tested by:	Garrett Cooper <yanegomi@gmail.com>
2012-10-23 18:38:04 +00:00
Dimitry Andric
a23701e59d Fix several clang warnings in libstdc++, which were exposed by the
recent atf import.  These changes are purely cosmetic, no functional
change.

MFC after:	1 week
2012-10-23 18:36:07 +00:00
Dimitry Andric
d3c53822e7 Fix two -Wsystem-header warnings in libc++ that were exposed by the new
ATF import.  These have also been sent upstream.

MFC after:	1 month
2012-10-22 19:06:00 +00:00
Xin LI
52dba105d2 MFV: netcat from OpenBSD 5.2.
MFC after:	1 month
2012-10-22 18:56:31 +00:00
Dimitry Andric
936e943916 Import libc++ trunk r165949. Among other improvements and bug fixes,
this has many visibility problems fixed, which should help with
compiling certain ports that exercise C++11 mode (i.e. Firefox).

Also, belatedly add the LICENSE.TXT and accompanying CREDITS.TXT files,
which are referred to in all the source files.

MFC after:	1 month
2012-10-22 18:25:04 +00:00
Dimitry Andric
bf3d102133 Pull in r165878 from upstream llvm trunk:
X86: Disable long nops for all cpus prior to pentiumpro/i686.

This is the safest approach for now.  If you think long nops matter a
lot for performance, compile with -march=i686 or higher. :)

MFC after:	3 days
2012-10-22 17:47:37 +00:00
Edwin Groothuis
747585762b MFV of r241867
Merge of tzdata2012g into head:

- Fix end of DST in Gaza and Hebron
- Western Samoa: DST start at 30 Septembet 2012 and finished at 7 April 2013.
2012-10-22 10:20:11 +00:00
Nathan Whitehorn
2a664c03e5 Update dialog to 20120706: includes minor useability enhancements and
fixes for warnings encountered with clang.
2012-10-21 18:25:12 +00:00
Ulrich Spörlein
0625a57d35 strcmp(3) will suffice here, also follow the style of the remaining file more closely.
Prodded by:	ed
2012-10-20 10:16:55 +00:00
Ulrich Spörlein
cc4842a1c7 Apply local patches to mandoc and connect it to the build.
- adds a couple more library strings used in the tree
- changes some more to the current groff spelling
- changes page footer to match groff style
2012-10-20 10:06:38 +00:00
Ulrich Spörlein
e4d7d10517 Merge mandoc from vendor into contrib and provide the necessary Makefile glue.
It's not yet connected to the build.
2012-10-19 22:21:01 +00:00
Brooks Davis
4c0d7cdf5d Replace our version of the pwcache(3) API with NetBSD's implementation.
This adds two features:
 * uid_from_user() and gid_from_group() as the reverse of user_from_uid()
   and groups_from_gid().
 * pwcache_userdb() and pwcache_groupdb() which allow alternative lookup
   functions to be used.  For example lookups from passwd and group
   databases in a non-standard location.
2012-10-19 12:44:22 +00:00
Gleb Smirnoff
bc17db9558 Looks like support.h is really not needed here. 2012-10-18 13:46:26 +00:00
Maksim Yevmenkin
8651c115b8 put another bandaid on the build until i figure out bsnmp headers 2012-10-18 00:20:02 +00:00