tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: remove compat symbols from libstdc++
On Apr 24, 5:22am, mrg%eterna.com.au@localhost (matthew green) wrote:
-- Subject: re: remove compat symbols from libstdc++
| this does not match what upstream GCC 7 does, so i'm more inclined
| to think we have something else wrong than adopting your change.
|
| eg, i see this on netbsd-8 host:
|
| > nm /usr/pkg/gcc7/lib/libstdc++.a | grep compat
| compatibility.o:
| compatibility-debug_list.o:
| compatibility-debug_list-2.o:
| compatibility-c++0x.o:
| compatibility-atomic-c++0x.o:
| compatibility-thread-c++0x.o:
| compatibility-chrono.o:
| compatibility-condvar.o:
| 0000000000000000 t execute_native_thread_routine_compat
|
| so it sure seems like they're expected to exist. i think the patch
| has a missing part, too -- libsupc++/Makefile probably would want
| the same edit otherwise it will include these?
Ok, a different way is to just remove the @GLIBCXX_X.Y version nodes.
I've tested that my existing pkgsrc binaries and they seem to work
just fine.
christos
Index: src/c++11/compatibility-atomic-c++0x.cc
===================================================================
RCS file: /cvsroot/src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc,v
retrieving revision 1.1.1.4
diff -u -u -r1.1.1.4 compatibility-atomic-c++0x.cc
--- src/c++11/compatibility-atomic-c++0x.cc 19 Jan 2019 10:14:04 -0000 1.1.1.4
+++ src/c++11/compatibility-atomic-c++0x.cc 23 Apr 2019 20:12:06 -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)
Index: src/c++11/compatibility-thread-c++0x.cc
===================================================================
RCS file: /cvsroot/src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc,v
retrieving revision 1.1.1.4
diff -u -u -r1.1.1.4 compatibility-thread-c++0x.cc
--- src/c++11/compatibility-thread-c++0x.cc 19 Jan 2019 10:14:05 -0000 1.1.1.4
+++ src/c++11/compatibility-thread-c++0x.cc 23 Apr 2019 20:12:06 -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
Index: src/c++98/compatibility.cc
===================================================================
RCS file: /cvsroot/src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc,v
retrieving revision 1.3
diff -u -u -r1.3 compatibility.cc
--- src/c++98/compatibility.cc 19 Jan 2019 12:10:14 -0000 1.3
+++ src/c++98/compatibility.cc 23 Apr 2019 20:12:06 -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>
Index: src/c++98/istream.cc
===================================================================
RCS file: /cvsroot/src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/istream.cc,v
retrieving revision 1.1.1.4
diff -u -u -r1.1.1.4 istream.cc
--- src/c++98/istream.cc 19 Jan 2019 10:14:04 -0000 1.1.1.4
+++ src/c++98/istream.cc 23 Apr 2019 20:12:06 -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);
Home |
Main Index |
Thread Index |
Old Index