Skip to content

Commit f1dedcd

Browse files
make sure all the compat symbols appear in the shared library.
_GLIBCXX_SHARED is only set for the shared library version so that in includes compat symbols that are not part of the static library. noticed when arm64 rust build with gcc14 failed due to a very strange "can't find symbol" problem (the symbol was present, but the one with a version attached was not, and that was wanted.)
1 parent 153f263 commit f1dedcd

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

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

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.59 2025/09/19 05:27:45 mrg Exp $
1+
# $NetBSD: Makefile,v 1.60 2025/10/14 07:19:46 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)