Commit graph

18 commits

Author SHA1 Message Date
Brooks Davis da77a1b4f0 libcxxrt: don't export nonexistant symbols
Remove version entries that we don't build.

Add an arm specific Version.map and for other targets run the files
through sed to handle int vs long in new and delete.

Ideally we'd use the SYMBOL_MAPS functionality to preprocess with cpp,
but it doesn't currently handle C++ symbols so be annoyingly duplicative
for now.

Differential Revision:	https://reviews.freebsd.org/D44325
2024-04-16 22:14:21 +01:00
Dimitry Andric ecf4106237 Merge libcxxrt master 03c83f5a57be8c5b1a29a68de5638744f17d28ba
Interesting fixes (* were already cherry-picked):
- 03c83f5 add __cxa_init_primary_exception (#23)
* 5d8a158 Fix two bugs in __cxa_end_cleanup()
* b00c6c5 Insert padding in __cxa_dependent_exception
* 45ca8b1 Insert padding in __cxa_exception struct for compatibility
* f2e5509 Fix unlock in two-word version and add missing comment.
- 6229590 Add an option for disabling emergency buffers. (#14)

MFC after:	2 weeks
2024-01-25 18:43:23 +01:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Dimitry Andric e91d723ad4 Merge libcxxrt master f96846efbfd508f66d91fcbbef5dd808947c7f6d.
Interesting fixes:
f96846e Fix std::size_t -> size_t to unbreak build against libc++ 6.0.0
6f4cfa2 Fix the uncaught exception count with rethrowing (PR 239265)
db54f53 Added C++14-specific operator delete (#47)

PR:		239265
MFC after:	3 days
2019-07-26 16:55:06 +00:00
Ed Maste 4d2a062671 libcxxrt: Move mangled symbols out of extern "C++" in Version.map
r260553 added a number of mangled C++ symbols to Version.map inside of
an existing `extern "C++"` block.

ld.bfd 2.17.50 treats `extern "C++"` permissively and will match both
mangled and demangled symbols against the strings in the version map
block.  ld.lld interprets `extern "C++"` strictly, and matches only
demangled symbols.

I believe lld's behaviour is correct.  Contemporary versions of ld.bfd
also behave as lld does, so move the mangled symbols out of the
`extern "C++"` block.

PR:		225128, 185663
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2018-01-23 22:41:13 +00:00
Alex Richardson 8974782e89 Export std::get_new_handler() from libcxxrt.so
When trying to build world for MIPS64 with clang I was getting
linker errors because of a missing reference to std::get_new_handler().
It turns out std::get_new_handler() was not listed in Version.map so it was
marked as a local symbol in libcxxrt.so.

Reviewed by:	theraven, brooks (mentor), emaste
Approved by:	trasz
Obtained from:	CheriBSD
Differential Revision:	https://reviews.freebsd.org/D11925
2017-11-03 12:52:59 +00:00
Dimitry Andric e3c4285520 Surround any unmangled C++ names in libcxxrt's version map with 'extern
"C++"', otherwise ld refuses to make the symbols global in the final
library.  This causes the __int128-related symbols to go missing when
the library is stripped during installation.

Helpful hints:	emaste
MFC after:	2 weeks
X-MFC-With:	r314061
2017-02-22 18:44:57 +00:00
Dimitry Andric 6fc1c2befc Add __int128-related symbols to libcxxrt's version map. Put these into
the same CXXABI verions as recent libstdc++.

Note that __int128 types are only available on arches where long long is
128 bit wide.

Noticed by:	harti
MFC after:	2 weeks
2017-02-21 21:48:45 +00:00
Ed Maste b689d9268f libcxxrt: correct mangled "typeinfo name" symbols in Version.map
r260553 added missing C++ typinfos to libcxxrt's version script.
It appears that a number of duplicate mangled symbols were added due to
a cut and paste error. Switch the second instances to _ZTS*,
typeinfo name for *.

Found by lld, which produces an error or warning for duplicate symbols.

Reviewed by:	dim
Approved by:	re (gjb)
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D7011
2016-06-29 11:48:42 +00:00
Dimitry Andric bb52ed3249 Add std::uncaught_exceptions() to libcxxrt (C++17, see N4152 and N4259).
This has also been submitted upstream.
2015-10-05 17:47:23 +00:00
Dimitry Andric e350ac5e37 Add __cxa_deleted_virtual to libcxxrt's version map.
This symbol can sometimes be emitted by clang++, and was not yet
exported from libcxxrt.  Attempt to be compatible with libsupc++ by
using the same CXXABI_1.3.6 symbol version.

Reported by:	yuri@rawbw.com
PR:		200863
Reviewed by:	emaste
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D2850
2015-06-23 17:54:24 +00:00
Baptiste Daroussin 726f4cd580 Add support for __cxa_throw_bad_array_new_length in libcxxrt
It is required for use with newer g++49

Differential Revision:	https://reviews.freebsd.org/D982
Reviewed by:	theraven
Approved by:	theraven
MFC after:	3 weeks
2014-10-21 10:19:45 +00:00
David Chisnall e23d53c461 Add missing C++11 typeinfos to the libcxxrt version script.
PR:		185663
MFC after:	1 week
2014-01-11 19:02:17 +00:00
Dimitry Andric ccf9b6362b Add several missing symbols to libcxxrt's symbol version map, and remove
a few duplicates.  This should fix building world with -stdlib=libc++
after r246028.

Submitted by:	Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>
MFC after:	1 week
X-MFC-With:	r246028
2013-02-03 20:40:41 +00:00
David Chisnall 4792733bb8 Fix some symbol version mismatches between libstdc++ and libsupc++/libcxxrt
that were causing the runtime and STL libraries to see different versions of
various classes and functions when libstdc++ is used as a filter.

Note: This changes the ABI for libcxxrt, but libcxxrt is currently only in
-STABLE for testing and is not used by anything unless explicitly enabled by
the end user.  No default compiler configurations use it.

libc++ will need to be recompiled after this change.  make buildworld will do
this automatically, but make in lib/libc++ will not necessarily work unless the
new libcxxrt is installed first.

PR:		kern/171610, stand/175453
Reviewed by:	kib
MFC after:	1 week
2013-01-28 11:12:49 +00:00
David Chisnall fe13239287 Clean up some symbol versions for libsupc++ / libcxxrt.
MFC after:	1 week
Reviewed by:	kan
2012-06-11 15:40:57 +00:00
David Chisnall c725650d64 Import new version of libcxxrt. Now works correctly with libobjc2 to implement
the unified exception model for Objective-C++.

Approved by:	dim (mentor)
2012-03-20 17:58:15 +00:00
David Chisnall 1e2a21d81c Add symbol versioning to libcxxrt.
Approved by:	dim (mentor)
2012-03-19 11:53:33 +00:00