Skip to content

Commit fb2e577

Browse files
properly fix our libstdc++ build.
remove our local _GLIBCXX_COMPAT_ bits, and properly build like upstream does, for the static vs shared libraries. now we both aren't missing std::istream::ignore(long) or the old compat std::condition_variable::wait(std::unique_lock<std::mutex>&) that some of the rust binary bootstraps need. this makes rust build again on arm64, and (probably) fixes the same for sparc64 (that build won't finish for a bit more...)
1 parent 6b9b0f0 commit fb2e577

5 files changed

Lines changed: 4 additions & 23 deletions

File tree

external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,8 @@ _GLIBCXX_END_NAMESPACE_VERSION
150150
&& defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \
151151
&& defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT)
152152

153-
#ifdef _GLIBCXX_COMPAT_
154153
#define _GLIBCXX_ASM_SYMVER(cur, old, version) \
155154
asm (".symver " #cur "," #old "@@" #version);
156-
#else
157-
#define _GLIBCXX_ASM_SYMVER(cur, old, version)
158-
#endif
159155

160156
_GLIBCXX_ASM_SYMVER(_ZNSt9__atomic011atomic_flag5clearESt12memory_order, _ZNVSt9__atomic011atomic_flag5clearESt12memory_order, GLIBCXX_3.4.11)
161157

external/gpl3/gcc/dist/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,8 @@
3939
# error "compatibility-thread-c++0x.cc is not needed for gnu-versioned-namespace"
4040
#endif
4141

42-
#ifdef _GLIBCXX_COMPAT_
4342
#define _GLIBCXX_ASM_SYMVER(cur, old, version) \
4443
asm (".symver " #cur "," #old "@@@" #version);
45-
#else
46-
#define _GLIBCXX_ASM_SYMVER(cur, old, version)
47-
#endif
4844

4945
// XXX GLIBCXX_ABI Deprecated
5046
// gcc-4.6.0

external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,6 @@ _GLIBCXX_END_NAMESPACE_VERSION
381381
// In the future, GLIBCXX_ABI > 6 should remove all uses of
382382
// _GLIBCXX_*_SYMVER macros in this file.
383383

384-
#ifdef _GLIBCXX_COMPAT_
385384
#define _GLIBCXX_3_4_SYMVER(XXname, name) \
386385
extern "C" void \
387386
_X##name(...) \
@@ -396,11 +395,6 @@ _GLIBCXX_END_NAMESPACE_VERSION
396395

397396
#define _GLIBCXX_ASM_SYMVER(cur, old, version) \
398397
asm (".symver " #cur "," #old "@@" #version);
399-
#else
400-
#define _GLIBCXX_3_4_SYMVER(XXname, name)
401-
#define _GLIBCXX_3_4_5_SYMVER(XXname, name)
402-
#define _GLIBCXX_ASM_SYMVER(cur, old, version)
403-
#endif
404398

405399
#define _GLIBCXX_APPLY_SYMVER _GLIBCXX_3_4_SYMVER
406400
#include <abi/compatibility.h>

external/gpl3/gcc/dist/libstdc++-v3/src/c++98/istream.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
112112
basic_istream<char>::
113113
ignore(streamsize __n, int_type __delim)
114114
{
115-
#ifdef _GLIBCXX_COMPAT_
116115
{
117116
// If conversion to int_type changes the value then __delim does not
118117
// correspond to a value of type char_type, and so will never match
@@ -124,7 +123,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
124123
// Now we know that __delim is a valid char_type value, so it's safe
125124
// for the code below to use traits_type::find to search for it.
126125
}
127-
#endif
128126

129127
_M_gcount = 0;
130128
sentry __cerb(*this, true);
@@ -376,10 +374,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
376374
basic_istream<wchar_t>::
377375
ignore(streamsize __n, int_type __delim)
378376
{
379-
#ifdef _GLIBCXX_COMPAT_
380377
if (traits_type::eq_int_type(__delim, traits_type::eof()))
381378
return ignore(__n);
382-
#endif
383379

384380
_M_gcount = 0;
385381
sentry __cerb(*this, true);

external/gpl3/gcc/lib/libstdc++-v3/Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $NetBSD: Makefile,v 1.61 2025/10/14 09:17:05 mrg Exp $
1+
# $NetBSD: Makefile,v 1.62 2025/10/15 06:04:43 mrg Exp $
22

33
REQUIRETOOLS= yes
44
NOLINT= # defined
@@ -62,10 +62,9 @@ SRCS= ${LIBSUPCXXSRCS} ${LIBSTDCXXSRCS}
6262

6363
GCC_MACHINE_SUBDIR=${MACHINE_CPU:C/powerpc.*/rs6000/:C/x86_64/i386/}
6464

65-
# The compatibility files are built without -D_GLIBCXX_SHARED.
66-
.for s in ${SRCS:Ncompatibility.cc:Ncompatibility-debug_list.cc:Ncompatibility-debug_list-2.cc:Ncompatibility-atomic-c++0x.cc:Ncompatibility-c++0x.cc:Ncompatibility-chrono.cc:Ncompatibility-condvar.cc:Ncompatibility-thread-c++0x.cc}
67-
CSHLIBFLAGS.${s}+= -D_GLIBCXX_SHARED
68-
.endfor
65+
# Only the shared library is build with -D_GLIBCXX_SHARED, and the
66+
# static library shouldn't need to provide old symbols.
67+
CSHLIBFLAGS+= -D_GLIBCXX_SHARED
6968

7069
CXXFLAGS+= -fno-implicit-templates
7170
CPPFLAGS+= -I${DIST}/libstdc++-v3/include

0 commit comments

Comments
 (0)