Commit Graph

5632 Commits

Author SHA1 Message Date
dim
c4c1c28548 MFC r267981:
Pull in r211627 from upstream llvm trunk (by Bill Schmidt):

  [PPC64] Fix PR20071 (fctiduz generated for targets lacking that
  instruction)

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

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

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

Requested by:	jhibbits

MFC r267982:

Add the llvm patch for r267981.

MFC r268003:

Fix breakage after r267981.

Pointy hat to:	dim
2014-06-30 20:26:30 +00:00
delphij
d1fedb7971 Fix multiple vulnerabilities in file(1) and libmagic(3).
Security:	FreeBSD-SA-14:16.file
Approved by:	so
2014-06-24 19:04:55 +00:00
dim
cf140f008f MFC r267704:
Pull in r211435 from upstream llvm trunk (by Benjamin Kramer):

  Legalizer: Add support for splitting insert_subvectors.

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

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

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

Reported by:	Evgeniy <iron@mail.ua>

MFC r267705:

Add the llvm patch for r267704.
2014-06-24 06:12:11 +00:00
gavin
e44b7f112f Merge r267482,r267483,r267486,r267577,r267671,r267672 from head:
Remove send-pr and fix up all references to it.  Replace it with a
  stub send-pr directing people towards the web site.
2014-06-22 16:48:21 +00:00
brueffer
6ea96d0826 MFC: r267478
MFp4: change 1191346

In print_header32_tok(), correct printing in the XML case.  This lead to
invalid XML files before.

PR:		176259
Submitted by:	zi
2014-06-17 08:56:16 +00:00
edwin
f631a2c600 MFC of 267473,tzdata2014e
Fix historical data for Egypt.
Better prediction for future Egypt / Morocco changes.
Update to Cocos / Cook islands.
Fix historical data for Russia.
2014-06-14 11:46:22 +00:00
delphij
e1c5226357 Fix incorrect error handling in PAM policy parser. [SA-14:13] 2014-06-03 19:02:18 +00:00
dim
357551c7e1 MFC r266674:
Pull in r209489 from upstream clang trunk (by Akira Hatanaka):

  Fix a bug in xmmintrin.h.

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

  <rdar://problem/16873717>
2014-05-28 06:38:42 +00:00
dim
a3e27ae6a9 MFC r265925:
Upgrade our copy of llvm/clang to 3.4.1 release.  This release contains
mostly fixes, for the following upstream bugs:

http://llvm.org/PR16365 http://llvm.org/PR17473 http://llvm.org/PR18000
http://llvm.org/PR18068 http://llvm.org/PR18102 http://llvm.org/PR18165
http://llvm.org/PR18260 http://llvm.org/PR18290 http://llvm.org/PR18316
http://llvm.org/PR18460 http://llvm.org/PR18473 http://llvm.org/PR18515
http://llvm.org/PR18526 http://llvm.org/PR18600 http://llvm.org/PR18762
http://llvm.org/PR18773 http://llvm.org/PR18860 http://llvm.org/PR18994
http://llvm.org/PR19007 http://llvm.org/PR19010 http://llvm.org/PR19033
http://llvm.org/PR19059 http://llvm.org/PR19144 http://llvm.org/PR19326
2014-05-26 20:45:44 +00:00
gshapiro
8878c3f644 MFC: Update for sendmail 8.14.9 import 2014-05-26 15:35:11 +00:00
gshapiro
c211ffddd1 MFC: Merge sendmail 8.14.9 to HEAD 2014-05-26 15:28:28 +00:00
gavin
d5a24169ed Merge r266111 from head:
Fix typo.  Note that although this file is under contrib, it has diverged
  sufficiently from upstream (including a full whitespace commit and large
  portions rewritten) that this change does not move us further from the
  upstream.

PR:		docs/186608
Submitted by:	Jamie Landeg-Jones <jamie@dyslexicfish.net>
2014-05-22 20:55:57 +00:00
delphij
b102c46490 MFC r265465:
Don't reply monlist request when it's not enabled.
2014-05-20 00:57:00 +00:00
ian
1202107523 MFC r256790:
Fix the VCVT instruction. It must round towards zero when converting from
  a floating-point to an integer value. This was not the case causing issues
  when printing certain values.
2014-05-18 19:28:15 +00:00
ian
60aa355ac4 MFC 264190:
Mark __fixdfdi/__aeabi_d2lz with COMPILER_RT_ABI so it uses the correct
  calling convention for __aeabi_* functions.
2014-05-17 21:35:26 +00:00
ian
1253f26158 MFC 263631, 263637, 263664, 263676, 263679, 263698, 263711,
Implement __flt_rounds for ARMv6 hard-float. The fpscr register stores the
  current rounding mode used by the VFP unit.

  Simplify how we build MACHINE_ARCH. There are 3 options that may be set
  however only arm, armeb, armv6, and soon armv6hf will be used.

  Add the llvm/clang patch for r263619.

  Reorder the pmap macros so "ARM_MMU_V6 + ARM_MMU_V7" is first. As they are
  identical this allows us to build for both v6 and v7 together.

  Add code for enabling second CPU core for A20 SoC.
  Enable SMP on Cubieboard2.

  Switch to freebsd.org emal address in copyright.
2014-05-17 18:53:36 +00:00
bdrewery
7b44e09267 MFC r265249,r265250,r265251:
- Add -J command/flag to filter by jail name/jid. This will automatically
      display the JID as well (the -j command/flag).
    - Add a hint for 'u' and 'J' command that '+' displays all.
    - Add J command to help.
2014-05-17 02:39:20 +00:00
ian
99db57bb75 MFC r261215, r261257
Merge from vendor branch importing dtc git
  rev 6a15eb2350426d285130e4c9d84c0bdb6575547a

  Don't build BSDL dtc if the GPL dtc is enabled.
2014-05-15 14:37:52 +00:00
edwin
361ea06a9b MFC of tzdata2014c
- Egypt will go into DST in 15 May 2014
2014-05-13 22:35:06 +00:00
rpaulo
7e66d0998d Revert bogus change in 265804 to configparser.c 2014-05-10 07:26:49 +00:00
rpaulo
d8b1412072 MFC r252440:
Enable the second and the third I2C controllers on Beaglebone-black.
2014-05-10 07:25:26 +00:00
pfg
f628476f62 MFC r265231:
gcc: fix strict alignment.

From the OpenBSD log:

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

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

Obtained from:	OpenBSD (CVS rev 1.4)
2014-05-09 01:30:15 +00:00
marius
02f351fb35 MFC: r265090
Merge r133175 from upstream:

2008-03-13  Dennis Czeremin  <dennis.czeremin@smiths-heimann.com>

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

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

Sponsored by:	Bally Wulff Games & Entertainment GmbH
2014-05-02 10:29:54 +00:00
delphij
110f39bda3 MFC r258195+r264361:
nc from OpenBSD 5.5.
2014-04-25 04:49:27 +00:00
jmmv
9ae7565292 MFC r263989: Add atf m4 files from the vendor branch. 2014-04-17 17:20:56 +00:00
dim
7c6a94336a MFC r264345:
Amend r263891, by making clang default to DWARF2 debug info format for
all FreeBSD versions, not just 10.x and earlier.  Apparently too many
people seem to have trouble with post-1993 formats.

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

Requested by:	many
2014-04-14 17:54:01 +00:00
rpaulo
760b289b96 MFC r263925
Enable all cryptocaps because net80211 can do software encryption.
2014-04-12 23:48:02 +00:00
bapt
87cf2668fd MFC: r263948
Convert an unused banner from skeleton.c into a comment.
It is added to every generated files and fix build at certain warning level with clang 3.4

Submitted by:	Thomas Dickey <dickey@his.com> (byacc upstream)
Spotted by:	glebius
2014-04-12 15:13:43 +00:00
dim
4ebc67638d MFC r264238:
For GNU as, add two missing modes for each of the fcomip and fucomip
instructions.  Partially obtained from OpenBSD by Pedro Giffuni, while I
added the fcomip variants.

Apparently this should help with compiling certain variants of WebKit.
2014-04-10 07:00:24 +00:00
pfg
f0fa402e84 MFC r264121;
gcc: define __block when block support is enabled

This mimics the behaviour in clang and lets us build cleanly
the libdispatch port on platforms where the base gcc is still
the default compiler.

Bump __FreeBSD_version for ports.

Tested by:	theraven
2014-04-07 01:55:54 +00:00
dim
cc435e800f MFC r263775:
Avoid "cc1: warning: is shorter than expected" when using GNU cpp in
combination with dtrace scripts, which have "#!/usr/sbin/dtrace -Cs"
shebang lines.  This is because dtrace positions the file pointer after
the shebang line, before passing the file to GNU cpp.

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

Suggested by:	avg
2014-04-02 06:17:57 +00:00
dim
962d0a5759 MFC r263891:
Make clang default to DWARF2 debug info format for FreeBSD 10.x and
earlier.  For head, this commit does not change anything, but it is
purely meant to be MFC'd.
2014-04-01 08:19:30 +00:00
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