Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gcc Add an ifdef _GLIBCXX_COMPAT_ that removes...
details: https://anonhg.NetBSD.org/src/rev/092c3a39be52
branches: trunk
changeset: 450715:092c3a39be52
user: christos <christos%NetBSD.org@localhost>
date: Tue Apr 23 20:55:53 2019 +0000
description:
Add an ifdef _GLIBCXX_COMPAT_ that removes the versioned symbol nodes from
libstdc++ and enable it for now only for the random archives but not for the
shared object (although it does not break anything that I've tested to enable
it for the shared object too). Fixes static linking, which does not handle
multiple versioned symbols properly.
diffstat:
external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc | 4 ++++
external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc | 4 ++++
external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc | 6 ++++++
external/gpl3/gcc/dist/libstdc++-v3/src/c++98/istream.cc | 4 ++++
external/gpl3/gcc/lib/libstdc++-v3/Makefile | 4 +++-
5 files changed, 21 insertions(+), 1 deletions(-)
diffs (98 lines):
diff -r 0c791e61423e -r 092c3a39be52 external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc
--- a/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc Tue Apr 23 17:35:10 2019 +0000
+++ b/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc Tue Apr 23 20:55:53 2019 +0000
@@ -150,8 +150,12 @@
&& defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \
&& defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT)
+#ifdef _GLIBCXX_COMPAT_
#define _GLIBCXX_ASM_SYMVER(cur, old, version) \
asm (".symver " #cur "," #old "@@" #version);
+#else
+#define _GLIBCXX_ASM_SYMVER(cur, old, version)
+#endif
_GLIBCXX_ASM_SYMVER(_ZNSt9__atomic011atomic_flag5clearESt12memory_order, _ZNVSt9__atomic011atomic_flag5clearESt12memory_order, GLIBCXX_3.4.11)
diff -r 0c791e61423e -r 092c3a39be52 external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc
--- a/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc Tue Apr 23 17:35:10 2019 +0000
+++ b/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc Tue Apr 23 20:55:53 2019 +0000
@@ -35,8 +35,12 @@
# error "compatibility-thread-c++0x.cc must be compiled with -std=gnu++0x"
#endif
+#ifdef _GLIBCXX_COMPAT_
#define _GLIBCXX_ASM_SYMVER(cur, old, version) \
asm (".symver " #cur "," #old "@@@" #version);
+#else
+#define _GLIBCXX_ASM_SYMVER(cur, old, version)
+#endif
// XXX GLIBCXX_ABI Deprecated
// gcc-4.6.0
diff -r 0c791e61423e -r 092c3a39be52 external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc
--- a/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc Tue Apr 23 17:35:10 2019 +0000
+++ b/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc Tue Apr 23 20:55:53 2019 +0000
@@ -365,6 +365,7 @@
// In the future, GLIBCXX_ABI > 6 should remove all uses of
// _GLIBCXX_*_SYMVER macros in this file.
+#ifdef _GLIBCXX_COMPAT_
#define _GLIBCXX_3_4_SYMVER(XXname, name) \
extern "C" void \
_X##name() \
@@ -379,6 +380,11 @@
#define _GLIBCXX_ASM_SYMVER(cur, old, version) \
asm (".symver " #cur "," #old "@@" #version);
+#else
+#define _GLIBCXX_3_4_SYMVER(XXname, name)
+#define _GLIBCXX_3_4_5_SYMVER(XXname, name)
+#define _GLIBCXX_ASM_SYMVER(cur, old, version)
+#endif
#define _GLIBCXX_APPLY_SYMVER _GLIBCXX_3_4_SYMVER
#include <abi/compatibility.h>
diff -r 0c791e61423e -r 092c3a39be52 external/gpl3/gcc/dist/libstdc++-v3/src/c++98/istream.cc
--- a/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/istream.cc Tue Apr 23 17:35:10 2019 +0000
+++ b/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/istream.cc Tue Apr 23 20:55:53 2019 +0000
@@ -112,8 +112,10 @@
basic_istream<char>::
ignore(streamsize __n, int_type __delim)
{
+#ifdef _GLIBCXX_COMPAT_
if (traits_type::eq_int_type(__delim, traits_type::eof()))
return ignore(__n);
+#endif
_M_gcount = 0;
sentry __cerb(*this, true);
@@ -354,8 +356,10 @@
basic_istream<wchar_t>::
ignore(streamsize __n, int_type __delim)
{
+#ifdef _GLIBCXX_COMPAT_
if (traits_type::eq_int_type(__delim, traits_type::eof()))
return ignore(__n);
+#endif
_M_gcount = 0;
sentry __cerb(*this, true);
diff -r 0c791e61423e -r 092c3a39be52 external/gpl3/gcc/lib/libstdc++-v3/Makefile
--- a/external/gpl3/gcc/lib/libstdc++-v3/Makefile Tue Apr 23 17:35:10 2019 +0000
+++ b/external/gpl3/gcc/lib/libstdc++-v3/Makefile Tue Apr 23 20:55:53 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.46 2019/03/20 05:09:27 mrg Exp $
+# $NetBSD: Makefile,v 1.47 2019/04/23 20:55:53 christos Exp $
REQUIRETOOLS= yes
NOLINT= # defined
@@ -18,6 +18,8 @@
COPTS.random.cc+= ${${ACTIVE_CC} == "clang":? -mrdrnd :}
.endif
+CSHLIBFLAGS+= -D_GLIBCXX_COMPAT_
+
DIST= ${GCCDIST}
GNUVER= ${DIST}/libstdc++-v3/config/abi/pre/gnu.ver
SYMBOLS= libstdc++-symbols.ver
Home |
Main Index |
Thread Index |
Old Index