Commit Graph

5652 Commits

Author SHA1 Message Date
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
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
pfg
f5cc643aac MFC r260361:
gcc: Fix optimization bug.

GCC-PR rtl-optimization/34628
	* combine.c (try_combine): Stop and undo after the first combination
	if an autoincrement side-effect on the first insn has effectively
	been lost.
2014-01-11 01:44:22 +00:00
wblock
a956d3e4f7 MFC r260358
Fix a cut and paste error.
2014-01-09 23:51:47 +00:00
pfg
e22a9135f1 MFC r259873:
gcc: small enhancements for the arm support.

fixes GCC-PR target/31152

Obtained from:	gcc 4.3 (rev. r118461, 125973: GPLv2)
2014-01-08 19:33:16 +00:00
pfg
daf195b13f MFC r259841
gcc:  Add ability to generate DWARF pubtypes section if
DEBUG_PUBTYPES_SECTION is defined.

Obtained from:	gcc 4.3 (rev. 118826; GPLv2)
2014-01-07 18:32:31 +00:00
dim
bc58f2ef55 MFC r260015:
In libc++'s type_traits header, avoid warnings (activated by our use of
-Wsystem-headers) about potential keyword compatibility problems, by
adding a __libcpp prefix to the applicable identifiers.

Upstream is still debating about this, but we need it now, to be able to
import clang 3.4.
2014-01-04 17:22:53 +00:00
pfg
9a82e50956 MFC r259655 (partial), r259944:
gcc: merge small upstream changes.

Fix for PR c++/29928

Backport from mainline:
2007-04-24  Hui-May Chang <hm.chang@apple.com>

* reload1.c (merge_assigned_reloads) : Do not merge a RELOAD_OTHER
instruction with a RELOAD_FOR_OPERAND_ADDRESS instruction.

Obtained from:	gcc 4.3 (rev. r124115, 124724: GPLv2)
2014-01-03 15:54:12 +00:00
pfg
f881b459a3 MFC r259525, r259526, r259529
gcc: small merges from upstream

fix ICE in rs6000 when using -fno-trapping-math.
Solves GCC-PR target/30485

Solve GCC issues:
PR middle-end/32602
PR middle-end/32603

Updates the to documentation and processing improvement.

Obtained from:	gcc 4.3 (rev. 120902, 120902, 119427, 126278, 126422;
		GPLv2)
2013-12-31 20:15:21 +00:00
pfg
63558da0f9 MFC r259005, r259092:
gcc: Add -flax-vector-conversions
gcc: new fvisibility-ms-compat option

These are useful for compatibility with newwer gcc and clang.

Obtained from:	gcc 4.3 (rev. 120572, 120688, 126088; GPLv2)
2013-12-30 03:39:46 +00:00
jmmv
2cc168fb9f Update atf to 0.18 and remove the code of the deprecated tools.
This is a MFC into stable/10 of:
- r258286 Update notes for imports of atf.
- r258289 MFV: Import atf-0.18.
- r258290 Drop all ATF tools code.

This is "make tinderbox" clean as run on ref10-amd64 with the default
WITHOUT_TESTS option.  A "make buildworld" with WITH_TESTS set now works
as well.
2013-12-29 02:57:10 +00:00
pfg
4eef328225 MFC r259666, r259696:
gcc: warnings from -Wformat-security

Obtained from:	Apple GCC 4.2 - 5646 (Radar 5764921)
2013-12-28 20:02:49 +00:00
dim
9191fc023f MFC r259888:
Pull in r183971 from upstream llvm trunk:

  X86: cvtpi2ps is just an SSE instruction with MMX operands. It has no AVX
  equivalent.

  Give it the right register format so we can also emit it when AVX is enabled.

This should fix a "Cannot select: intrinsic %llvm.x86.sse.cvtpi2ps" fatal error
in clang while building the gnuradio port for amd64.

Reported by:	db
2013-12-28 01:56:04 +00:00
dim
7b0e1bcf7d MFC r259756:
Get rid of register keyword usage in gperf, it is totally obsolete for
C++, and this allows gperf to be compiled for C++11 without a warning
about it.
2013-12-28 00:03:15 +00:00
pfg
020ad1f282 gcc: Merge upstream changes.
Include types in error message for build_binary_op.

Mostly cosmetic changes, to reduce differences with Apple's gcc.

Obtained from:	gcc 4.3 (rev. 120611, 124839, 125239; GPLv2)
2013-12-27 16:06:08 +00:00
pfg
e9055f74fe MFC r258826, r259555, r 259558:
libcpp: Merge fixes from upstream
Fixes:
GCC preprocessor/29966:
GCC preprocessor/28709:
GCC c/31924
GCC preprocessor/14331

gcc: add Apple-compatible -Wnewline-eof

Obtained from:	gcc per-4.3 (rev. 121340, 124356, 124358, 124730,
				  125212, 125255 ; GPLv2)
		Apple Inc. (Apple GCC 4.2 - 5531)
2013-12-25 21:59:56 +00:00
dim
d51fec8133 MFC r259724:
Apply upstream commit 33312fd828e59c78ae4ee30fd70d0ca109748cf0 (by
zoulasc) to contrib/file:

  don't write a char to a pointer.
2013-12-25 00:48:08 +00:00
pfg
68205669ab MFC r258017, r258429, r258748, r258817:
Merge updates from FSF pre4.3 GCC inspired on Apple's gcc:

  Updates to libiberty and mangling.
  New align attribute.
  Merge Apple updates to libstdc++.
2013-12-21 18:47:00 +00:00
dim
8f82fe8c1f MFC r259498:
Pull in r197399 from upstream clang trunk:

  Add bit_FXSAVE as an alias for bit_FXSR, for gcc compat.
2013-12-20 20:14:54 +00:00
edwin
d0ef96797a MFC of 259626, tzdata2013i
Removed support for solar-time-based time zones
Jordan stays at summer time this year.
Fix historical data for Cuba
2013-12-19 23:29:34 +00:00
peter
2839fafa81 MF9: Don't fail to build if MALLOC_PRODUCTION is defined in make.conf 2013-12-19 21:03:08 +00:00
pfg
979b5f4974 MFC r258731:
gcc: Make use of TREE_OVERFLOW_P.

While it was brought in r258179 only to fix a build issue,
bringing the rest of the change has the advantage of fixing
GCC/19978.

Obtained from:	gcc 4.3 (rev. 120505; GPLv2)
2013-12-19 02:39:11 +00:00
pfg
43e2502361 MFC r258651, r258943:
gcc: Altivec register adjustments from Apple.
gcc: On rs6000 update sp_offset depending only on size.

Tested by:		Justin Hibbits
Obtained from:		gcc pre-4.3 (rev. 124763, 125116; GPLv2)
2013-12-19 02:32:07 +00:00
pfg
6f93e9ad10 MFC r258428, r258445
gcc: another round of merges from the gcc pre-43 branch.

Bring The following revisions from the gcc43 branch[1]:

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

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

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

Fix crosscompilation (r258445 by andreast)
Reference:
[1] http://gcc.gnu.org/viewcvs/gcc/trunk/?pathrev=126700

Obtained from:	gcc pre4.3 (GPLv2) branch
MFC after:	3 weeks
2013-12-18 19:07:29 +00:00
pfg
45fa9cf452 MFC r258530;
libcpp: Keep a record of changes from upstream GCC (pre-43).
2013-12-15 04:27:49 +00:00
pfg
81b5297878 MFC rr258501, r258507;
gcc: Bring updates from Google's enhanced gcc-4.2.1.

Google released and enhanced version of gcc-4.2.1 plus their local
patches for Android[1].

The patches are owned by Google and the license hasn't been changed
from  the original GPLv2. We are only bringing a subset of the
available patches that may be helpful in FreeBSD, in other words,
changes specific to android are not included.

From the README.google file[1].

Patches applied to google_vendor_src_branch/gcc/gcc-4.2.1:

gcc/Makefile.in
gcc/c-common.c
gcc/c-common.h
gcc/c-opts.c
gcc/c-typeck.c
gcc/cp/typeck.c
gcc/doc/invoke.texi
gcc/flags.h
gcc/opts.c
gcc/tree-flow.h
gcc/tree-ssa-alias-warnings.c
gcc/tree-ssa-alias.c

 Backport of -Wstrict-aliasing from mainline.
  Silvius Rus <rus@google.com>

gcc/coverage.c:
  Patch coverage_checksum_string for PR 25351.
  Seongbae Park <spark@google.com>
  Not yet submitted to FSF.

gcc/c-opts.c
gcc/c-ppoutput.c
gcc/c.opt
gcc/doc/cppopts.texi
libcpp/Makefile.in
libcpp/directives-only.c
libcpp/directives.c
libcpp/files.c
libcpp/include/cpplib.h
libcpp/init.c
libcpp/internal.h
libcpp/macro.c
  Support for -fdirectives-only.
  Ollie Wild <aaw@google.com>.
  Submitted to FSF but not yet approved.

libstdc++-v3/include/ext/hashtable.h
  http://b/742065
  http://b/629994
  Reduce min size of hashtable for hash_map, hash_set from 53 to 5

libstdc++-v3/include/ext/hashtable.h
  http://b/629994
  Do not iterate over buckets if hashtable is empty.

gcc/common.opt
gcc/doc/invoke.texi
gcc/flags.h
gcc/gimplify.c
gcc/opts.c
  Add Saito's patch for -finstrument-functions-exclude-* options.

gcc/common.opt
gcc/doc/invoke.texi
gcc/final.c
gcc/flags.h
gcc/opts.c
gcc/testsuite/gcc.dg/Wframe-larger-than.c
  Add a new flag -Wframe-larger-than- which enables a new warning
  when a frame size of a function is larger than specified.
  This patch hasn't been integrated into gcc mainline yet.

gcc/tree-vrp.c
  Add a hack to avoid using ivopts information for pointers starting
  at constant values.

Reference:

[1]
https://android.googlesource.com/toolchain/gcc/+/master/gcc-4.2.1/

Obtained from:	Google Inc.
2013-12-15 03:47:31 +00:00
pfg
39d7d288c5 MFV r258571:
Removes strict-aliasing warnings from newer GCC in tcpdump.

Corresponds to MFC r258573, but for some reason our new pre-commit hooks
will not let us merge it from there.
2013-12-13 19:32:02 +00:00
pfg
c659dd08b2 MFC r258115 (partial);
gperf: bring a small update from Apple Developers tools 4.4

From [1]

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

We are not merging the size_type.patch as it raises some
(apparently) bogus warnings and is not really used.

[1] http://opensource.apple.com/source/gperf/gperf-9/patches/
2013-12-13 18:23:14 +00:00
pfg
b8648b775a MFC r258712;
libcpp: fix an underflow.

Similar fix seen in Apple's gcc42.

Obtained from:	OpenBSD (Rev 1.2)
MFC after:	2 weeks
2013-12-12 19:01:50 +00:00
pfg
4bda5ad442 MFC r258081, r258138, r258143, r258179, r258157, r258204, 258205,
r258206, r258207, r258321

This is a series of commits inspired on Google's gcc-4.2.1 for
Android that were taken from the gcc pre-4.3 under the GPLv2.

gcc: Backport fixes for -W parentheses in C++
	This fixes GCC 19564.
gcc: merge rs6000 change from FSF pre-gcc43
	Don't set MASK_PPC_GFXOPT for 8540 or 8548.
Merge vrp-tree fix from gcc-4.3
	Fix missed conversion from / to >> (GCC PR32521)
Merge in GCCr120505 to include definition of TREE_OVERFLOW_P
gcc: warn about integer overflow in constant expressions in the C++ frontend.
gcc: Add a new option -Wvla to warn variable length array.
libcpp: preprocessor speedup patches from upstream gcc.
gcc: add femit-struct-debug support to reduce Reduce dwarf debug size
gcc: Fix postreload-gcse treatment of call-clobbered registers.
gcc: Record some previous commits in the ChangeLog.gcc43 file.
2013-12-12 18:15:32 +00:00
mdf
cf9afebc6a MFC r258658:
Fix a segfault / internal compiler error.

Among other causes, when gcc throws a warning before parsing any tokens,
the cur_token pointer is at the beginning of malloc'd memory.
Dereferencing cur_token[-1] can cause a segfault.

Code taken from OpenBSD
http://www.openbsd.org/cgi-bin/cvsweb/src/gnu/gcc/libcpp/errors.c
which was a more complete fix than the one I originally coded.
2013-12-12 02:03:42 +00:00
dim
4c7f14937f MFC r259111:
Use correct casts in gcc's emmintrin.h for the first arguments of the
following builtin functions:

* __builtin_ia32_pslldi128() takes __v4si instead of __v8hi
* __builtin_ia32_psllqi128() takes __v2di instead of __v8hi
* __builtin_ia32_psradi128() takes __v4si instead of __v8hi

This should fix the following errors when building the LINT kernel with
gcc:

sys/crypto/aesni/aesni_wrap.c:191: error: incompatible type for argument 1 of
'__builtin_ia32_psradi128'
sys/crypto/aesni/aesni_wrap.c:195: error: incompatible type for argument 1 of
'__builtin_ia32_pslldi128'
2013-12-11 07:43:30 +00:00
dim
d6c28b7c7e MFC r259100:
Pull in r196658 from upstream clang trunk:

  CodeGen: Don't emit linkage on thunks that aren't emitted because they're
  vararg.

  This can happen when we're trying to emit a thunk with available_externally
  linkage with optimization enabled but bail because it doesn't make sense for
  vararg functions.

  [LLVM] PR18098.

This should fix clang "Broken module found, compilation aborted" errors when
building the qt4-based dvbcut port.

Reported by:	se
2013-12-11 07:34:34 +00:00
dim
f972f6b92d MFC r259053:
Pull in r196590 from upstream clang trunk (by rdivacky):

  Move the body of GCCInstallationDetector ctor into an init() function
  and call it from its only user. The linux toolchain. This saves quite
  a lot of directory searching on other platforms.

See http://docs.freebsd.org/cgi/mid.cgi?51E6FAF5.3080802 for the
original discussion.  With this fix, the search for gcc installations is
completely eliminated on FreeBSD.

Reported by:	Kurt Lidl <lidl@pix.net>
2013-12-10 07:25:25 +00:00
kib
34987b9cca MFC r258663:
Use sysctl KERN_PROC_SIGTRAMP to retrieve the signal trampoline
location for the native amd64 ABI.  This fixes unwinding over the
signal frame after trampoline was moved to the shared page.

Approved by:	re (gjb)
2013-12-03 19:42:46 +00:00
dim
3dff623eb7 MFC r258620:
Pull in r195558 from upstream clang trunk:

  Fix a SSE2 intrinsics typo

  Full discourse at:

   http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131104/092514.html
   http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-November/068124.html

  Patch by Dimitry Andric and Alexey Dokuchaev!

Reported by:	danfe
Approved by:	re (gjb)
2013-11-29 18:06:02 +00:00
brooks
c545463f87 MFC r258437:
Sync with NetBSD.  The functional change is to make the output when
comparing a directory to an mtree file more compatible with fmtree when
FreeBSD 9 compatiblity mode is on.  This output is clearly intended for
humans not computers, but some tools such as mergemaster's -U option rely
on it.

Approved by:	re (glebius)
2013-11-26 16:12:40 +00:00
dim
0d569e265d MFC r258350:
Pull in r191896 from upstream llvm trunk:

  CaptureTracking: Plug a loophole in the "too many uses" heuristic.

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

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

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

Reported by:	mandree
Approved by:	re (gjb)
2013-11-25 22:56:46 +00:00
emaste
79f55b7049 MFC r258426: libexecinfo: Include terminating null in byte count
Otherwise, a formatted string with a strlen equal to the remaining
  buffer space would have the last character omitted (because vsnprintf
  always null-terminates), and later the assert in backtrace_symbols_fmt
  would fail.

Sponsored by:	DARPA, AFRL
Approved by:	re (gjb)
2013-11-25 15:54:18 +00:00
gjb
cc8b081ade MFC r257999 (peter):
Merge nvi-2.1.1 -> 2.1.2

Approved by:	re (???)

Sponsored by:	The FreeBSD Foundation
2013-11-16 19:22:13 +00:00
glebius
bb108535ba Merge r257888, r258049 from head:
- Use system libiconv, instead of trying to dlopen() it.
  - Just disable recoding support in libsmb if built WITHOUT_ICONV.

PR:		183153
Approved by:	re (kib)
2013-11-14 09:25:29 +00:00
edwin
46533baffa MFC of 257681
tzdata2013f
- Jordan goes to winter time on the last Friday in October.
- Tocantins in Brazil will not go into summer time in October.
- Indonesian time zones renames.
- Lots of cleanups in with regarding to links and historical data.

tzdata2013h
- Libya didn't go back to DST.
- Fix Morocco 2038 issue.
- Brazil/Acre and ?Western Amazonas are chaning timezones.

Approved by:	re (Gleb)
2013-11-05 10:58:38 +00:00
smh
7fcf8773f4 MFC r257109:
Add clang-CC and CC to list of hints allowing clang to identify its operating
mode as c++ instead of defaulting to c for the binary names CC and clang-CC.

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

PR:		bin/182442
Approved by:	re (glebius)
2013-10-29 11:36:31 +00:00
cperciva
6fe3b99530 MFC r257129:
Remove time and date stamps from svn* binaries, in order to make the
  builds reproducible.

Approved by:	re (glebius)
2013-10-28 22:49:11 +00:00
brooks
caa64dbe94 MFC r256687:
Upgrade to the latest version of mtree from NetBSD.  This revision
re-removes the printing of size for non-regular files, supports
type-less root (.) entries as seen in a couple ports, and corrects a bug
in -N that caused expanded Subversion $FreeBSD$ strings in comments to
be processed as /etc/group entries.

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

Approved by:	re (glebius)
2013-10-23 17:59:17 +00:00
gjb
cfff9c715e - Remove debugging from GENERIC* kernel configurations
- Enable MALLOC_PRODUCTION
- Default dumpdev=NO
- Remove UPDATING entry regarding debugging features
- Bump __FreeBSD_version to 1000500

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2013-10-10 17:59:44 +00:00
dim
2094cd3103 Add support for assembling and disassembling Intel Random Number
Generator extensions (e.g. the 'rdrand' mnemonic) to our copy of
binutils.

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

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

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

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

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

  Based on a patch by Benno Rice!

This will help to develop EFI support.

Approved by:	re (kib)
Verified by:	benno
MFC after:	1 week
2013-10-03 20:38:57 +00:00