Commit Graph

5399 Commits

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