Commit Graph

5698 Commits

Author SHA1 Message Date
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