Commit Graph

27 Commits

Author SHA1 Message Date
Dimitry Andric
15ad7a7c39 Pull in r209785 from upstream libc++ trunk (by Marshall Clow):
Fix a problem exposed by r208825, which caused bind (and other bits of
  libc++) to stop working. And tests

This fix is needed to support clang 3.5.0 and higher, which are more
strict about forming pointer-to-function types with cv-qualifiers or
ref-qualifiers.  See also the upstream PR <http://llvm.org/PR19742> and
<http://llvm.org/viewvc/llvm-project?rev=208825&view=rev>

Reported by:	amdmi3
MFC after:	3 days
2014-12-01 15:02:49 +00:00
Baptiste Daroussin
e1f7d54595 Do not define bad_array_new_length::bad_array_new_length in libc++ anymore
when used in combinaison with libcxxrt since it is now defined there already.
This fixes building world
2014-10-21 21:49:06 +00:00
Baptiste Daroussin
78433c77c6 Import patch from libc++ r197313 which allows using libc++ headers with gcc
Differential Revision:	https://reviews.freebsd.org/D942
Reviewed by:	imp
2014-10-13 22:30:08 +00:00
Dimitry Andric
33b804ae98 In r260015, I renamed several identifiers to avoid -Wsystem-header
warnings.  In r261283, I imported libc++ 3.4 release, but this contained
one identifier that had not been renamed yet, leading to a compilation
error when using -std=c++1y.  Fix the compilation error by correctly
renaming the identifier.

Reported by:	rcarter@pinyon.org
PR:		base/192139
MFC after:	3 days
2014-08-23 15:54:22 +00:00
Dimitry Andric
f48026fc69 Pull in r214736 from upstream libc++ trunk (by Marshall Clow):
Fix PR#20520 - predicate called too many times in list::remove_if.
  Add tests for list, forward_list, and the std::remove_if algorithm

This fixes an issue where std::list<>::remove_if() and remove() could
erroneously visit elements twice.

Reported by:	Dominic Fandrey <kamikaze@bsdforen.de>
PR:		192303
MFC after:	3 days
2014-08-08 21:27:33 +00:00
Dimitry Andric
a0492a1142 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
MFC after:	3 days
2014-03-13 23:09:48 +00:00
Dimitry Andric
ed6e732211 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
MFC after:	3 days
2014-03-05 20:01:04 +00:00
Dimitry Andric
eed07a2ea1 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
MFC after:	3 weeks
X-MFC-With:	r261283
2014-02-12 18:14:49 +00:00
Dimitry Andric
d45679747c 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
2014-02-07 21:17:20 +00:00
Eitan Adler
86a7dfc3e0 HEAD is not buildable for the past day. Commit a 'quick fix' in order to permit
buildworld to complete.

Reviewed by:	theraven
2014-02-07 18:10:34 +00:00
Dimitry Andric
4f7ab58ee6 Import libc++ 3.4 release. This contains a lot of bugfixes, and some
preliminary support for C++1y.

MFC after:	3 weeks
2014-01-30 07:44:22 +00:00
Dimitry Andric
17c43f4276 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.

MFC after:	3 days
2013-12-28 20:54:08 +00:00
Bernhard Froehlich
ac64499012 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
David Chisnall
4bab9fd964 Import new libcxxrt / libc++. This brings some bug fixes, including a potential race condition for static initialisers. 2013-07-10 16:28:24 +00:00
Dimitry Andric
9448dd00b0 Fix warnings from newer clang versions about constexpr member functions
not being implicitly const in libc++'s <chrono> header.  The warnings
have been introduced because of new language rules recently adopted by
the C++ WG.  More info:

<http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2013/n3598.html>

MFC after:	3 days
2013-05-28 20:11:28 +00:00
Dimitry Andric
1bf9f7c1c5 Merge libc++ trunk r180598. Contains several minor cleanups and bug
fixes, no major changes.

MFC after:	2 weeks
2013-04-27 22:47:52 +00:00
David Chisnall
cfdf2879c9 Import new libc++ to head. Various small fixes and cleanups.
MFC after:	2 weeks
2013-02-07 15:45:28 +00:00
David Chisnall
fb6c5de628 Merge new libc++ into head. 2012-11-29 13:35:44 +00:00
Dimitry Andric
5f5f8832fb Pull in r168610 from upstream libc++:
When using libc++ headers on FreeBSD, in combination with -std=c++98,
  -ansi or -std=c++03, the long long type is not supported.  So in this
  case, several functions and types, like lldiv_t, strtoll(), are not
  declared.

This should make it possible to use the libc++ headers in c++98 mode.

Note: libc++ is originally designed as a c++0x or higher library, so you
should still take care when using it with c++98 or c++03.

Noted by:	Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>
MFC after:	1 week
2012-11-26 21:32:31 +00:00
David Chisnall
1e0896ace6 Import new version of libc++ into base. 2012-11-13 03:27:43 +00:00
Dimitry Andric
d3c53822e7 Fix two -Wsystem-header warnings in libc++ that were exposed by the new
ATF import.  These have also been sent upstream.

MFC after:	1 month
2012-10-22 19:06:00 +00:00
Dimitry Andric
936e943916 Import libc++ trunk r165949. Among other improvements and bug fixes,
this has many visibility problems fixed, which should help with
compiling certain ports that exercise C++11 mode (i.e. Firefox).

Also, belatedly add the LICENSE.TXT and accompanying CREDITS.TXT files,
which are referred to in all the source files.

MFC after:	1 month
2012-10-22 18:25:04 +00:00
Dimitry Andric
e3726a671a Fix dangling else in libc++'s __bit_reference header. This has also
been sent upstream.

MFC after:	3 days
2012-06-01 06:55:01 +00:00
David Chisnall
b03f91a837 Import new version of libc++. Among other improvements, this comes with an
<atomic> header that works with clang 3.1 (and, importantly, the pre-3.1
snapshot currently in head)
2012-05-03 17:44:07 +00:00
David Chisnall
5cd6937330 Import a slightly newer libc++, with some bugs fixed that were found by running
the test suite on FreeBSD.

Approved by:	dim (mentor)
2012-03-14 14:40:22 +00:00
David Chisnall
94e3ee44c3 Import new versions of libcxxrt and libc++.
Please tests any C++ code you care about with -stdlib=libc++!

Approved by:	dim (mentor)
2012-03-14 00:09:36 +00:00
David Chisnall
7a98470824 Import libc++ / libcxxrt into base. Not build by default yet (use
MK_LIBCPLUSPLUS=yes to enable).  This is a work-in-progress.  It works for
me, but is not guaranteed to work for anyone else and may eat your dog.

To build C++ using libc++, add -stdlib=libc++ to your CXX and LD flags.

Bug reports welcome, bug fixes even more welcome...

Approved by:	dim (mentor)
2011-11-25 20:59:04 +00:00