Commit Graph

5600 Commits

Author SHA1 Message Date
dim
16ced98065 MFC r263774:
Revert r263694, and apply a better fix to squelch unnecessary warnings
from clang about possible keywords being treated as identifiers for the
remainder of the translation unit (a.k.a. -Wkeyword-compat), when using
libstdc++ in combination with -Wsystem-headers.  This will not only fix
devd, but any C++ program using libstdc++.
2014-03-29 11:33:52 +00:00
edwin
24df444399 MFC of 263901, tzdata2014b
- Update antartica.
 - Comments about historical data for Hawaii.
 - Update details for Crimea on 30 March
 - Move location data Simferopol.
2014-03-29 04:44:24 +00:00
dim
45ae227ed4 MFC r263312:
Pull in r196939 from upstream llvm trunk (by Reid Kleckner):

  Reland "Fix miscompile of MS inline assembly with stack realignment"

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

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

  Update to clang side tests will land shortly.

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

  Revert the backend fatal error from r196939

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

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

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

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

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

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

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

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

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

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

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

Reported by:	ashish
PR:		ports/183064

MFC r263313:

Pull in r203311 from upstream llvm trunk (by Arnold Schwaighofer):

  ISel: Make VSELECT selection terminate in cases where the condition type has to
  be split and the result type widened.

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

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

  Fixes PR18036.

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

Reported by:	mandree

MFC r263320:

Add separate patch files for all the customizations we have currently
applied to our copy of llvm/clang.  These can be applied in alphabetical
order to a pristine llvm/clang 3.4 release source tree, to result in the
same version used in FreeBSD.

This is intended to clearly document all the changes until now, which
mostly consist of cherry pickings from the respective upstream trunks,
plus a number of hand-written FreeBSD-specific ones.  Hopefully those
can eventually be cleaned up and sent upstream too.
2014-03-26 07:42:43 +00:00
dim
fb422e6d31 MFC r262613:
Merge the projects/clang-sparc64 branch back to head.  This brings in
several updates from the llvm and clang trunks to make the sparc64
backend fully functional.

Apart from one patch to sys/sparc64/include/pcpu.h which is still under
discussion, this makes it possible to let clang fully build world and
kernel for sparc64.

Any assistance with testing this on actual sparc64 hardware is greatly
appreciated, as there will unavoidably be bugs left.

Many thanks go to Roman Divacky for his upstream work on getting the
sparc64 backend into shape.

MFC r262985:

Repair a few minor mismerges from r262261 in the clang-sparc64 project
branch.  This is also to minimize differences with upstream.
2014-03-26 07:31:57 +00:00
emaste
f9534c5185 MFC r263289: Update NetBSD Foundation copyrights to 2-clause BSD
The NetBSD Foundation states "Third parties are encouraged to change the
  license on any files which have a 4-clause license contributed to the
  NetBSD Foundation to a 2-clause license."

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

Sponsored by:	The FreeBSD Foundation
2014-03-24 13:48:04 +00:00
gjb
b13aa3b9f7 MFC r263434:
Update commit template to include 'Relnotes:' tag, to
  help re@ track release notes candidates.

Sponsored by:	The FreeBSD Foundation
2014-03-23 02:29:28 +00:00
dim
9cedb8bb69 MFC 261991:
Upgrade our copy of llvm/clang to 3.4 release.  This version supports
all of the features in the current working draft of the upcoming C++
standard, provisionally named C++1y.

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

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

MFC 262121 (by emaste):

Update lldb for clang/llvm 3.4 import

This commit largely restores the lldb source to the upstream r196259
snapshot with the addition of threaded inferior support and a few bug
fixes.

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

Sponsored by:	DARPA, AFRL

MFC 262186 (by emaste):

Fix mismerge in r262121

A break statement was lost in the merge.  The error had no functional
impact, but restore it to reduce the diff against upstream.

MFC 262303:

Pull in r197521 from upstream clang trunk (by rdivacky):

  Use the integrated assembler by default on FreeBSD/ppc and ppc64.

Requested by:	jhibbits

MFC 262611:

Pull in r196874 from upstream llvm trunk:

  Fix a crash that occurs when PWD is invalid.

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

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

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

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

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

Reported by:	decke

MFC 262809:

Pull in r203007 from upstream clang trunk:

  Don't produce an alias between destructors with different calling conventions.

  Fixes pr19007.

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

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

Reported by:	multiple users on freebsd-current
PR:		bin/187103

MFC 263048:

Repair recognition of "CC" as an alias for the C++ compiler, since it
was silently broken by upstream for a Windows-specific use-case.

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

Reported by:	rakuco

MFC 263049:

Garbage collect the old way of adding the libstdc++ include directories
in clang's InitHeaderSearch.cpp.  This has been superseded by David
Chisnall's commit in r255321.

Moreover, if libc++ is used, the libstdc++ include directories should
not be in the search path at all.  These directories are now only used
if you pass -stdlib=libstdc++.
2014-03-21 17:53:59 +00:00
emaste
3b6e18f61d MFC r258005: Merge upstream LLVM r192118:
Formally added an explicit enum for DWARF TLS support. No functionality
  change.

Sponsored by:	DARPA, AFRL
2014-03-19 20:46:02 +00:00
emaste
75535b28ab MFC r258003: Merge upstream LLVM r182803:
[Mips] Add Mips specific dynamic table entry tags.

Sponsored by:	DARPA, AFRL
2014-03-19 19:31:21 +00:00
emaste
f9928d747c MFC r258897: Update LLDB to upstream r196322 snapshot
Upstream revisions of note:
  r196298 - Fix use of std::lower_bound
  r196322 - Fix log message for new invalidation checks

Sponsored by:	DARPA, AFRL
2014-03-19 13:24:47 +00:00
emaste
6bffb42503 MFC r258892: lldb: Threaded inferior support for FreeBSD
This is in the process of being submitted to the upstream LLDB
  repository.  The thread list functionality is modelled in part on
  GDBRemoteCommunicationClient.

  LLDB bug pr16696 and code review D2267

Sponsored by:	DARPA, AFRL
2014-03-19 13:19:56 +00:00
emaste
de2662087f MFC r258884: Update LLDB to upstream r196259 snapshot
Sponsored by:	DARPA, AFRL
2014-03-19 13:18:42 +00:00
emaste
7327a493ea MFC r258873: Workaround lldb issue with main module base address
On FreeBSD lldb sometimes reloads the the main module's (executable's)
  symbols at the wrong address.  Work around this for now by explicitly
  reloading at base_address=0 when it happens.

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

  http://llvm.org/bugs/show_bug.cgi?id=17880

Sponsored by:	DARPA, AFRL
2014-03-19 13:16:58 +00:00
emaste
0c69499498 MFC r258098: Merge upstream LLDB r194487:
Log failure to restore thread state in ThreadPlanCallFunction::DoTakedown

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

Sponsored by:	DARPA, AFRL
2014-03-19 13:15:16 +00:00
emaste
a7c13fdad5 MFC r258094: lldb: Correct a standalone debug file path
For a file /bin/ls with a .gnu_debuglink entry of "ls.debug" the path
  should be /usr/lib/debug/bin/ls.debug, not /usr/lib/debug/bin/ls.

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

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

Sponsored by:	DARPA, AFRL
2014-03-19 13:13:47 +00:00
emaste
958843c32b MFC r258054: Update LLDB to upstream r194122 snapshot
Inludes minor changes relative to upstream, for compatibility with
  FreeBSD's in-tree LLVM 3.3:

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

Sponsored by:	DARPA, AFRL
2014-03-19 13:11:35 +00:00
delphij
a44a1e412b MFC r262754: MFV r253848 (mm):
Update vendor/xz from v5.0 branch to post-5.0.5
2014-03-18 00:59:49 +00:00
dim
f674f353ee MFC r263120:
Pull in r201021 from upstream libc++ trunk:

  Fix for PR18735 - self-assignment for map/multimap gives incorrect
  results in C++03

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

Reported by:	rakuco
2014-03-17 20:42:45 +00:00
dim
fc82e35795 Pull in r192123 from upstream llvm trunk (by Benjamin Kramer):
X86: Fix type check. Just because an integer type is illegal doesn't
  mean it's i64.

  Fixes PR17495, where an i24 triggered this code. It's intended to
  optimize i64 loads on 32 bit x86.

Fixes "Cannot select" fatal errors when building the audio/jack port
with ALSA support turned on.

This is a direct commit to stable/9 and stable/10, since head already
has the commit as part of an upgrade to llvm/clang 3.4.

Reported by:	Radim Kolar <hsn@sendmail.cz> via http://llvm.org/bugs/
2014-03-16 16:33:25 +00:00
jhibbits
fdeb176830 MFC r261422
Make gas accept any PowerPC instruction by default.  This is a local change,
and will not be submitted upstream.

Discussed with:       nwhitehorn,rdivacky
2014-03-14 16:42:20 +00:00
glebius
f937dcf2bd Bulk sync of pf changes from head, in attempt to fixup broken build I
made in r263029.

Merge r257186,257215,257349,259736,261797.

These changesets split pfvar.h into several smaller headers and make
userland utilities to include only some of them.
2014-03-12 10:45:58 +00:00
edwin
6aa8774c6d MFC of 263041, tzdata2014a:
- Fix historical info about asia/Zion, Ukraine
- Fiji starts DST at 02:00 instead of 03:00
- Turkey will move to DST at 31 March this year.
2014-03-11 20:47:01 +00:00
bapt
f5e5e1abc3 MFC: r262398,r262399,r262410,r262975
Import libucl into head

UCL is heavily infused by nginx configuration as the example of a convenient
configuration system. However, UCL is fully compatible with JSON format and is
able to parse json files.

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

libucl has been developped and is maintained by vsevolod@
2014-03-11 13:06:09 +00:00
dim
e1a0ecea9b MFC r262805:
Pull in r199848 from upstream libc++ trunk:

  Const qualify __mem_fn call operator

  QOI improvement.

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

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

Reported by:	dumbbell
2014-03-09 21:02:23 +00:00
jmmv
fe643776c1 Import atf-0.20.
This is a MFC of r261897 and r262000 and should allow all of the atf
tests to pass.
2014-03-06 14:11:44 +00:00
jmmv
16411e2c80 MFC various fixes for the ATF tests.
- r260505 Allow tests to provide a Kyuafile when they relied on auto-generation.
- r260525 Respect the original layout of the atf-{c,c++} tests.
- r260526 Fix path to the process_helpers for the libatf-c++ tests.
- r260576 Generate and install pkg-config files for atf.
- r260577 Add atf pkg-config files from the vendor branch.
- r260584 Prevent misc_helpers from running as a test.
2014-03-06 13:20:38 +00:00
dim
22ca1336dc MFC r261283:
Import libc++ 3.4 release.  This contains a lot of bugfixes, and some
preliminary support for C++1y.

MFC r261604:

HEAD is not buildable for the past day.  Commit a 'quick fix' in order to permit
buildworld to complete.

Reviewed by:	theraven

MFC r261608:

Apply a cleaner solution for the sign warnings that can occur when
compiling libc++'s <locale> header with -Wsystem-headers on.

This has also been submitted upstream.

Reported by:	asomers

MFC r261801:

An ABI incompatibility crept into the libc++ 3.4 import in r261283.  It
was caused by upstream libc++ commit r194536, which aimed to make the
headers more standards-compliant, by making std::pair's copy constructor
trivial.  Unfortunately, this could cause certain C++ applications using
shared libraries built against the previous version of libc++ to crash.

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

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

Reported by:	stefanf
2014-03-05 19:30:36 +00:00
uqs
31ed6dadf0 MFH r261319,261345,261742 mdoc changes to stable/10 2014-03-01 14:44:55 +00:00
peter
92739d7a0b MFC r262324: serf 1.3.4 - improve SSL handling with svn-1.8.8 and other
speedups and quality of life fixes.
2014-02-22 18:55:49 +00:00
peter
7cfbe47f25 MFC r257129,257936,258084,258569,258602,262250,262251
svn-1.8.4, 1.8.5, 1.8.8 and self-contained private support libraries
2014-02-20 20:34:01 +00:00
kevlo
ecbaab7887 MFC r260444:
Rename definition of IEEE80211_FC1_WEP to IEEE80211_FC1_PROTECTED.

The origin of WEP comes from IEEE Std 802.11-1997 where it defines
whether the frame body of MAC frame has been encrypted using WEP
algorithm or not.
IEEE Std. 802.11-2007 changes WEP to Protected Frame, indicates
whether the frame is protected by a cryptographic encapsulation
algorithm.

Reviewed by:	adrian, rpaulo
2014-02-17 01:36:53 +00:00
dim
11ec5c94e7 MFC r261680:
Pull in r200899 from upstream clang trunk:

  Allow transformation of VariableArray to ConstantArray.

  In the following code:

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

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

  This change fixes PR18633.

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

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

Reported by:	ale
2014-02-12 07:51:14 +00:00
dim
bff25c3bef MFC r261609:
Pull in upstream libcxxrt commit 8006101, which makes its cxxabi.h file
compilable just by itself.

PR:		kern/184019
2014-02-10 20:25:40 +00:00
gshapiro
4487cc54ba MFC: Update for sendmail 8.14.8 import 2014-02-01 22:33:58 +00:00
gshapiro
f95fc3e2d9 MFC: Remove local FreeBSD workaround now that upstream project has a better fix. 2014-02-01 22:32:45 +00:00
gshapiro
048f3c3a11 MFC: Merge sendmail 8.14.8 2014-02-01 22:27:40 +00:00
gshapiro
9e0e0be832 MFC: Update link to vendor import instructions 2014-02-01 22:05:38 +00:00
pluknet
3135f7a6a5 MFC r261261: Restore the Nx macro.
PR:		186205
Submitted by:	naddy
2014-02-01 10:41:26 +00:00
pfg
c50ca945d8 MFC r261175:
binutils: add support for Intel SMAP-related instructions

Add support for stac/clac instructions to manipulate the flag
that controls the behaviour of Intel's Supervisor Mode Access
Prevention (SMAP) feature.

Tested by:	dim
Obtained from:	OpenBSD
2014-01-31 03:38:22 +00:00
pfg
0d230789fc MFC r261178:
gcc: Add support for -Wmissing-prototypes in C++

Support for warnings about missing prototypes in C++ was added by Apple
GCC (Radar 6261539).  Most of the code crept into r260311 so it felt
natural to make use of it.

Obtained from:	Apple GCC - 5646
2014-01-31 03:30:09 +00:00
dim
782dc633da MFC r261162:
Pull in r195679 from upstream llvm trunk:

  Don't use nopl in cpus that don't support it.

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

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

PR:		bin/185777
2014-01-28 08:07:19 +00:00
pfg
fe288f1b72 MFC r260311, r260831:
gcc: Add support for Apple's Block extension

Block objects [1] are a C-level syntactic and runtime feature. They
are similar to standard C functions, but in addition to executable
code they may also contain variable bindings to automatic (stack)
or managed (heap) memory. A block can therefore maintain a set of
state (data) that it can use to impact behavior when executed.

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

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

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

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

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

Obtained from:	Apple GCC 4.2
2014-01-26 19:49:54 +00:00
pfg
d2ee769b39 MFC r259531;
gcc: point to our address for bug reports.

As recommended by the FSF in gcc/version.c :

"If you distribute a modified version of GCC, please change
this to refer to a document giving instructions for reporting
bugs to you, not us."
2014-01-20 21:58:20 +00:00
pfg
81471e9f9b MFC r260332;
gcc: backport some fixes from llvm-gcc

llvm-gcc backported some patches from gcc trunk:

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

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

This fixes GCC-PR c++/31749

Obtained from:	llvm-gcc (rev. 75463; GPLv2)
2014-01-20 21:50:31 +00:00
pfg
1f607ed1d1 MFC r260014, r260099:
gcc: Add support for label attributes and "unavailable" attribute.

Apple GCC has extensions to support for both label attributes and
an "unavailable" attribute. These are critical for objc but are
also useful in regular C/C++.

Obtained from:	Apple GCC 4.2 - 5531
2014-01-20 19:37:38 +00:00
delphij
c152bbe479 MFC r260637:
Disable 'monitor' feature in ntpd by default.

Security:	FreeBSD-SA-14:02.ntpd
Approved by:	so
2014-01-14 19:04:33 +00:00
delphij
defa475beb MFC r260636:
Fix bsnmpd remote denial of service vulnerability.

Reported by:	dinoex
Submitted by:	harti
Security:	FreeBSD-SA-14:01.bsnmpd
Security:	CVE-2014-1452
2014-01-14 19:02:14 +00:00
jmmv
97eeccbbec MFC r260491: Use .cpp as the extension for temporary C++ files. 2014-01-12 22:17:56 +00:00
pfg
f630f6f40f MFC r260310:
libcpp: misc fixes from Apple's GCC.

Fixes some bugs detected by Apple:
  #error with unmatched quotes
  pragma mark

Obtained from:	Apple GCC 4.2 - 5553
2014-01-12 21:16:26 +00:00
pfg
d54137712a MFC r259920:
gcc: Implement -Wmost for compatibility with clang.

This is equivalent to -Wall -Wno-parentheses.

Obtained from:	Apple GCC 4.2 - 5531
2014-01-12 20:09:17 +00:00