diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2022-03-04 18:23:10 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2022-03-05 20:33:36 +0000 |
commit | d3a757af21ac330d438aaf5f97fa47d2efed11ea (patch) | |
tree | 41788c80fd6011911472c5715ac5be4a6c72c3c2 | |
parent | dab41c9d9fabe86bdc65d97ba1c1e898488d4810 (diff) | |
download | gcc-d3a757af21ac330d438aaf5f97fa47d2efed11ea.zip gcc-d3a757af21ac330d438aaf5f97fa47d2efed11ea.tar.gz gcc-d3a757af21ac330d438aaf5f97fa47d2efed11ea.tar.bz2 |
libstdc++: Ensure __glibcxx_assert_fail has default visibility
This ensures there's no linker error if libstdc++ headers are included
following a pragma that sets hidden visibility.
Similarly for std::__terminate, which is always-inline so shouldn't
matter, but it's not wrong to do this anyway.
libstdc++-v3/ChangeLog:
* include/bits/c++config (__glibcxx_assert_fail): Add visibility
attribute.
(__terminate): Likewise.
-rw-r--r-- | libstdc++-v3/include/bits/c++config | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index c64b61b..6c134f1 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -305,6 +305,7 @@ namespace std // This allows the library to terminate without including all of <exception> // and without making the declaration of std::terminate visible to users. extern "C++" __attribute__ ((__noreturn__, __always_inline__)) + _GLIBCXX_VISIBILITY(default) inline void __terminate() _GLIBCXX_USE_NOEXCEPT { void terminate() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__noreturn__)); @@ -554,7 +555,7 @@ namespace std { // Avoid the use of assert, because we're trying to keep the <cassert> // include out of the mix. - extern "C++" _GLIBCXX_NORETURN + extern "C++" _GLIBCXX_NORETURN _GLIBCXX_VISIBILITY(default) void __glibcxx_assert_fail(const char* __file, int __line, const char* __function, const char* __condition) |