summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-17 20:10:51 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-17 20:10:51 +0000
commit069fa9335fb98c207811e6968223d8475f92909e (patch)
treebc4b46ef8b9c44b399604eb7e6a248cac56cfe0e
parente5846b502bea5f6dda2b47e493cabe793ca64672 (diff)
downloadppe42-gcc-069fa9335fb98c207811e6968223d8475f92909e.tar.gz
ppe42-gcc-069fa9335fb98c207811e6968223d8475f92909e.zip
/Network/Servers/hills/Volumes/capanna/gkeating/l
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107131 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog12
-rw-r--r--libstdc++-v3/config/os/bsd/darwin/ppc-extra.ver1
-rw-r--r--libstdc++-v3/configure.host3
-rw-r--r--libstdc++-v3/src/Makefile.am18
-rw-r--r--libstdc++-v3/src/Makefile.in28
-rw-r--r--libstdc++-v3/src/compatibility.cc25
6 files changed, 68 insertions, 19 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index f84cefddd91..f6ddc196f86 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,15 @@
+2005-11-17 Geoffrey Keating <geoffk@apple.com>
+
+ * config/os/bsd/darwin/ppc-extra.ver: New.
+ * src/Makefile.am (libstdc++-symbol.ver): Move outside conditionals,
+ and make dependent on port symbol files.
+ (libstdc++-symbol.explist): Use the generated .ver file, not
+ the template.
+ * src/compatibility.cc [APPLE] (__eprintf): New.
+ * src/Makefile.in: Regenerate.
+ * configure.host (powerpc*-*-darwin*): Define
+ port_specific_symbol_files.
+
2005-11-16 Nathan Sidwell <nathan@codesourcery.com>
* libsupc++/eh_arm.cc (__cxa_begin_cleanup): Remember a
diff --git a/libstdc++-v3/config/os/bsd/darwin/ppc-extra.ver b/libstdc++-v3/config/os/bsd/darwin/ppc-extra.ver
new file mode 100644
index 00000000000..ffe32b65658
--- /dev/null
+++ b/libstdc++-v3/config/os/bsd/darwin/ppc-extra.ver
@@ -0,0 +1 @@
+ __eprintf;
diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
index aecdebc55d1..de48517144b 100644
--- a/libstdc++-v3/configure.host
+++ b/libstdc++-v3/configure.host
@@ -282,6 +282,9 @@ case "${host}" in
abi_baseline_pair="mips-linux-gnu"
cpu_include_dir="cpu/mips"
;;
+ powerpc*-*-darwin*)
+ port_specific_symbol_files="\$(srcdir)/../config/os/bsd/darwin/ppc-extra.ver"
+ ;;
powerpc64-*-linux*)
abi_baseline_pair="powerpc64-linux-gnu"
;;
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index 105db3718c8..903930a8180 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -28,10 +28,11 @@ include $(top_srcdir)/fragment.am
toolexeclib_LTLIBRARIES = libstdc++.la
# Symbol versioning for shared libraries.
-if ENABLE_SYMVERS_GNU
-version_arg = -Wl,--version-script=libstdc++-symbol.ver
-version_dep = libstdc++-symbol.ver
-libstdc++-symbol.ver: ${glibcxx_srcdir}/$(SYMVER_MAP)
+# This could be conditional on
+# ENABLE_SYMVERS_GNU || ENABLE_SYMVERS_DARWIN_EXPORT
+# but automake doesn't support OR operations in conditionals.
+libstdc++-symbol.ver: ${glibcxx_srcdir}/$(SYMVER_MAP) \
+ $(port_specific_symbol_files)
cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
if test "x$(port_specific_symbol_files)" != x; then \
sed -n '1,/DO NOT DELETE/p' $@ > tmp.top; \
@@ -39,15 +40,19 @@ libstdc++-symbol.ver: ${glibcxx_srcdir}/$(SYMVER_MAP)
cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@; \
rm tmp.top tmp.bottom; \
fi
+
+if ENABLE_SYMVERS_GNU
+version_arg = -Wl,--version-script=libstdc++-symbol.ver
+version_dep = libstdc++-symbol.ver
else
if ENABLE_SYMVERS_DARWIN_EXPORT
version_arg = -Wl,-exported_symbols_list,libstdc++-symbol.explist
version_dep = libstdc++-symbol.explist
-libstdc++-symbol.explist : ${glibcxx_srcdir}/$(SYMVER_MAP) \
+libstdc++-symbol.explist : libstdc++-symbol.ver \
${glibcxx_srcdir}/scripts/make_exports.pl \
$(libstdc___la_OBJECTS) $(libstdc___la_LIBADD)
perl ${glibcxx_srcdir}/scripts/make_exports.pl \
- ${glibcxx_srcdir}/$(SYMVER_MAP) \
+ libstdc++-symbol.ver \
$(libstdc___la_OBJECTS:%.lo=.libs/%.o) \
`echo $(libstdc___la_LIBADD) | \
sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \
@@ -169,7 +174,6 @@ libstdc___la_DEPENDENCIES = ${version_dep} $(libstdc___la_LIBADD)
libstdc___la_LDFLAGS = \
-version-info $(libtool_VERSION) ${version_arg} -lm
-
# Use special rules for the deprecated source files so that they find
# deprecated include files.
GLIBCXX_INCLUDE_DIR=$(glibcxx_builddir)/include
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index 84207702b36..188f46ce07d 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -276,8 +276,6 @@ AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
toolexeclib_LTLIBRARIES = libstdc++.la
@ENABLE_SYMVERS_DARWIN_EXPORT_FALSE@@ENABLE_SYMVERS_GNU_FALSE@version_arg =
@ENABLE_SYMVERS_DARWIN_EXPORT_TRUE@@ENABLE_SYMVERS_GNU_FALSE@version_arg = -Wl,-exported_symbols_list,libstdc++-symbol.explist
-
-# Symbol versioning for shared libraries.
@ENABLE_SYMVERS_GNU_TRUE@version_arg = -Wl,--version-script=libstdc++-symbol.ver
@ENABLE_SYMVERS_DARWIN_EXPORT_FALSE@@ENABLE_SYMVERS_GNU_FALSE@version_dep =
@ENABLE_SYMVERS_DARWIN_EXPORT_TRUE@@ENABLE_SYMVERS_GNU_FALSE@version_dep = libstdc++-symbol.explist
@@ -668,19 +666,25 @@ uninstall-am: uninstall-info-am uninstall-toolexeclibLTLIBRARIES
tags uninstall uninstall-am uninstall-info-am \
uninstall-toolexeclibLTLIBRARIES
-@ENABLE_SYMVERS_GNU_TRUE@libstdc++-symbol.ver: ${glibcxx_srcdir}/$(SYMVER_MAP)
-@ENABLE_SYMVERS_GNU_TRUE@ cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
-@ENABLE_SYMVERS_GNU_TRUE@ if test "x$(port_specific_symbol_files)" != x; then \
-@ENABLE_SYMVERS_GNU_TRUE@ sed -n '1,/DO NOT DELETE/p' $@ > tmp.top; \
-@ENABLE_SYMVERS_GNU_TRUE@ sed -n '/DO NOT DELETE/,$$p' $@ > tmp.bottom; \
-@ENABLE_SYMVERS_GNU_TRUE@ cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@; \
-@ENABLE_SYMVERS_GNU_TRUE@ rm tmp.top tmp.bottom; \
-@ENABLE_SYMVERS_GNU_TRUE@ fi
-@ENABLE_SYMVERS_DARWIN_EXPORT_TRUE@@ENABLE_SYMVERS_GNU_FALSE@libstdc++-symbol.explist : ${glibcxx_srcdir}/$(SYMVER_MAP) \
+
+# Symbol versioning for shared libraries.
+# This could be conditional on
+# ENABLE_SYMVERS_GNU || ENABLE_SYMVERS_DARWIN_EXPORT
+# but automake doesn't support OR operations in conditionals.
+libstdc++-symbol.ver: ${glibcxx_srcdir}/$(SYMVER_MAP) \
+ $(port_specific_symbol_files)
+ cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
+ if test "x$(port_specific_symbol_files)" != x; then \
+ sed -n '1,/DO NOT DELETE/p' $@ > tmp.top; \
+ sed -n '/DO NOT DELETE/,$$p' $@ > tmp.bottom; \
+ cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@; \
+ rm tmp.top tmp.bottom; \
+ fi
+@ENABLE_SYMVERS_DARWIN_EXPORT_TRUE@@ENABLE_SYMVERS_GNU_FALSE@libstdc++-symbol.explist : libstdc++-symbol.ver \
@ENABLE_SYMVERS_DARWIN_EXPORT_TRUE@@ENABLE_SYMVERS_GNU_FALSE@ ${glibcxx_srcdir}/scripts/make_exports.pl \
@ENABLE_SYMVERS_DARWIN_EXPORT_TRUE@@ENABLE_SYMVERS_GNU_FALSE@ $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD)
@ENABLE_SYMVERS_DARWIN_EXPORT_TRUE@@ENABLE_SYMVERS_GNU_FALSE@ perl ${glibcxx_srcdir}/scripts/make_exports.pl \
-@ENABLE_SYMVERS_DARWIN_EXPORT_TRUE@@ENABLE_SYMVERS_GNU_FALSE@ ${glibcxx_srcdir}/$(SYMVER_MAP) \
+@ENABLE_SYMVERS_DARWIN_EXPORT_TRUE@@ENABLE_SYMVERS_GNU_FALSE@ libstdc++-symbol.ver \
@ENABLE_SYMVERS_DARWIN_EXPORT_TRUE@@ENABLE_SYMVERS_GNU_FALSE@ $(libstdc___la_OBJECTS:%.lo=.libs/%.o) \
@ENABLE_SYMVERS_DARWIN_EXPORT_TRUE@@ENABLE_SYMVERS_GNU_FALSE@ `echo $(libstdc___la_LIBADD) | \
@ENABLE_SYMVERS_DARWIN_EXPORT_TRUE@@ENABLE_SYMVERS_GNU_FALSE@ sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \
diff --git a/libstdc++-v3/src/compatibility.cc b/libstdc++-v3/src/compatibility.cc
index a43722f7722..613e8fbb8c6 100644
--- a/libstdc++-v3/src/compatibility.cc
+++ b/libstdc++-v3/src/compatibility.cc
@@ -361,3 +361,28 @@ namespace std
#undef _GLIBCXX_APPLY_SYMVER
#endif
+
+#ifdef __APPLE__
+#if (defined(__ppc__) || defined (__ppc64__)) && defined (PIC)
+/* __eprintf shouldn't have been made visible from libstdc++, or
+ anywhere, but on Mac OS X 10.4 it was defined in
+ libstdc++.6.0.3.dylib; so on that platform we have to keep defining
+ it to keep binary compatibility. We can't just put the libgcc
+ version in the export list, because that doesn't work; once a
+ symbol is marked as hidden, it stays that way. */
+
+#include <cstdio>
+#include <cstdlib>
+
+using namespace std;
+
+extern "C" void
+__eprintf (const char *string, const char *expression,
+ unsigned int line, const char *filename)
+{
+ fprintf (stderr, string, expression, line, filename);
+ fflush (stderr);
+ abort ();
+}
+#endif
+#endif /* __APPLE__ */
OpenPOWER on IntegriCloud