/Network/Servers/hills/Volumes/capanna/gkeating/l

From-SVN: r107131
This commit is contained in:
Geoffrey Keating 2005-11-17 20:10:51 +00:00 committed by Geoffrey Keating
parent 035db16b87
commit f9314d012c
6 changed files with 68 additions and 19 deletions

View File

@ -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

View File

@ -0,0 +1 @@
__eprintf;

View File

@ -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"
;;

View File

@ -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

View File

@ -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'` \

View File

@ -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__ */