+2002-04-01 Phil Edwards <pme@gcc.gnu.org>
+
+ * config/linker-map.gnu: Export __verbose_terminate_handler.
+ * libsupc++/Makefile.am (sources): Add cxa_demangle.c, dyn-string.c.
+ Make new LTCOMPILE variable, use it in new special build rules.
+ * libsupc++/Makefile.in: Rebuild.
+ * src/vterminate.cc (__verbose_terminate_handler): Enable use of
+ runtime __cxa_demangle.
+
+ * docs/html/install.html: Update prereqs and instructions.
+ * docs/html/19_diagnostics/howto.html: Bring naming for
+ verbose_terminate_handler into line with reality.
+
2002-04-01 Benjamin Kosnik <bkoz@redhat.com>
libstdc++/3129
__gxx_personality_v0;
__dynamic_cast;
+ # __gnu_cxx::_verbose_terminate_handler()
+ _ZN9__gnu_cxx27__verbose_terminate_handlerEv;
+
local:
*;
};
int main()
{
- std::set_terminate (__gnu_cxx::verbose_terminate_handler);
+ std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
...
throw <em>anything</em>;
}</pre>
</p>
- <p>The <code> verbose_terminate_handler </code> function obtains the name
+ <p>The <code> __verbose_terminate_handler </code> function obtains the name
of the current exception, attempts to demangle it, and prints it to
stderr. If the exception is derived from <code> std::exception </code>
then the output from <code>what()</code> will be included.
int main (int argc)
{
- std::set_terminate (__gnu_cxx::verbose_terminate_handler);
+ std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
if (argc > 5)
throw BLARGH("argc is greater than 5!");
else
well as releases) of binutils
<a href="ftp://sources.redhat.com/pub/binutils">here</a>.
</p>
+
+ <p>If you are using a 3.1-series libstdc++ snapshot, then the
+ requirements are slightly more stringent: the compiler sources must
+ also be 3.1 or later (for both technical and licensing reasons), and
+ your binutils must be 2.11.95 or later if you want to use symbol
+ versioning in shared libraries.
+ </p>
<!-- Commented until some system-specific requirements appear.
<p>Finally, a few system-specific requirements:
<h2><a name="config">Configuring</a></h2>
<p>If you have never done this before, you should read the basic
<a href="http://gcc.gnu.org/install/">GCC Installation
- Instructions</a> first. Read <em>all of them</em>. Twice.
+ Instructions</a> first. Read <em>all of them</em>.
+ <strong>Twice.</strong>
</p>
<p>When building libstdc++-v3 you'll have to configure
the entire <em>gccsrcdir</em> directory. The full list of libstdc++-v3
<em>cpu-vendor-os</em>/bits/
ext/</pre>
</p>
+ <p>If you used the version-specific-libs configure option, then most of
+ the headers and library files will be moved under
+ <code>lib/gcc-lib/</code> instead.
+ </p>
<p>You can check the status of the build without installing it using
<pre>
make check</pre>
<li>GNU ld (default on Linux):<code> -Wl,--rpath,<em>destdir</em>/lib</code>
<li>IRIX ld:<code> -Wl,-rpath,<em>destdir</em>/lib</code>
<li>Solaris ld:<code> -Wl,-R<em>destdir</em>/lib</code>
- <li>More...?
+ <li>More...? Let us know!
</ul>
</ul>
</p>
## Makefile for the GNU C++ Support library.
##
-## Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+## Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
##
## Process this file with automake to produce Makefile.in.
##
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
# Cross compiler and multilib support.
+CC = @CC@
CXX = @glibcpp_CXX@
toolexecdir = @glibcpp_toolexecdir@
toolexeclibdir = @glibcpp_toolexeclibdir@
exception new typeinfo cxxabi.h exception_defines.h
sources = \
+ cxa_demangle.c \
del_op.cc \
del_opnt.cc \
del_opv.cc \
del_opvnt.cc \
+ dyn-string.c \
eh_alloc.cc \
eh_aux_runtime.cc \
eh_catch.cc \
LIBSUPCXX_CXXFLAGS = $(LIBSUPCXX_PICFLAGS)
+# Use special rules for pulling things out of libiberty.
+cxa_demangle.c:
+ rm -f $@
+ $(LN_S) $(toplevel_srcdir)/libiberty/cp-demangle.c $@
+cxa_demangle.lo: cxa_demangle.c
+ $(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+cxa_demangle.o: cxa_demangle.c
+ $(COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+dyn-string.c:
+ rm -f $@
+ $(LN_S) $(toplevel_srcdir)/libiberty/dyn-string.c $@
+dyn-string.lo: dyn-string.c
+ $(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+dyn-string.o: dyn-string.c
+ $(COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+
+# LTCOMPILE is copied from LTCXXCOMPILE below.
+LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared \
+ --mode=compile $(CC) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
+
+
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
# modified in a per-library or per-sub-library way. Need to manually
# set this option because CONFIG_CXXFLAGS has to be after
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
-CC = @CC@
CCODECVT_C = @CCODECVT_C@
CCODECVT_H = @CCODECVT_H@
CLOCALE_H = @CLOCALE_H@
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
# Cross compiler and multilib support.
+CC = @CC@
CXX = @glibcpp_CXX@
toolexecdir = @glibcpp_toolexecdir@
toolexeclibdir = @glibcpp_toolexeclibdir@
sources = \
+ cxa_demangle.c \
del_op.cc \
del_opnt.cc \
del_opv.cc \
del_opvnt.cc \
+ dyn-string.c \
eh_alloc.cc \
eh_aux_runtime.cc \
eh_catch.cc \
LIBSUPCXX_CXXFLAGS = $(LIBSUPCXX_PICFLAGS)
+# LTCOMPILE is copied from LTCXXCOMPILE below.
+LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared \
+ --mode=compile $(CC) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
+
+
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
# modified in a per-library or per-sub-library way. Need to manually
# set this option because CONFIG_CXXFLAGS has to be after
LIBS = @LIBS@
libsupc__convenience_la_LDFLAGS =
libsupc__convenience_la_LIBADD =
-libsupc__convenience_la_OBJECTS = del_op.lo del_opnt.lo del_opv.lo \
-del_opvnt.lo eh_alloc.lo eh_aux_runtime.lo eh_catch.lo eh_exception.lo \
-eh_globals.lo eh_personality.lo eh_terminate.lo eh_throw.lo eh_type.lo \
-new_handler.lo new_op.lo new_opnt.lo new_opv.lo new_opvnt.lo pure.lo \
-tinfo.lo tinfo2.lo vec.lo
+libsupc__convenience_la_OBJECTS = cxa_demangle.lo del_op.lo del_opnt.lo \
+del_opv.lo del_opvnt.lo dyn-string.lo eh_alloc.lo eh_aux_runtime.lo \
+eh_catch.lo eh_exception.lo eh_globals.lo eh_personality.lo \
+eh_terminate.lo eh_throw.lo eh_type.lo new_handler.lo new_op.lo \
+new_opnt.lo new_opv.lo new_opvnt.lo pure.lo tinfo.lo tinfo2.lo vec.lo
libsupc___la_LDFLAGS =
libsupc___la_LIBADD =
-libsupc___la_OBJECTS = del_op.lo del_opnt.lo del_opv.lo del_opvnt.lo \
-eh_alloc.lo eh_aux_runtime.lo eh_catch.lo eh_exception.lo eh_globals.lo \
-eh_personality.lo eh_terminate.lo eh_throw.lo eh_type.lo new_handler.lo \
-new_op.lo new_opnt.lo new_opv.lo new_opvnt.lo pure.lo tinfo.lo \
-tinfo2.lo vec.lo
+libsupc___la_OBJECTS = cxa_demangle.lo del_op.lo del_opnt.lo del_opv.lo \
+del_opvnt.lo dyn-string.lo eh_alloc.lo eh_aux_runtime.lo eh_catch.lo \
+eh_exception.lo eh_globals.lo eh_personality.lo eh_terminate.lo \
+eh_throw.lo eh_type.lo new_handler.lo new_op.lo new_opnt.lo new_opv.lo \
+new_opvnt.lo pure.lo tinfo.lo tinfo2.lo vec.lo
CXXFLAGS = @CXXFLAGS@
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
HEADERS = $(glibcppinstall_HEADERS)
DIST_COMMON = Makefile.am Makefile.in
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+# Use special rules for pulling things out of libiberty.
+cxa_demangle.c:
+ rm -f $@
+ $(LN_S) $(toplevel_srcdir)/libiberty/cp-demangle.c $@
+cxa_demangle.lo: cxa_demangle.c
+ $(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+cxa_demangle.o: cxa_demangle.c
+ $(COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+dyn-string.c:
+ rm -f $@
+ $(LN_S) $(toplevel_srcdir)/libiberty/dyn-string.c $@
+dyn-string.lo: dyn-string.c
+ $(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+dyn-string.o: dyn-string.c
+ $(COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+
# We have to have rules modified from the default to counteract SUN make
# prepending each of $(glibcppinstall_HEADERS) with VPATH below.
install-glibcppinstallHEADERS: $(glibcppinstall_HEADERS)
int status = -1;
char *dem = 0;
-#if 0
// Disabled until __cxa_demangle gets the runtime GPL exception.
dem = __cxa_demangle(name, 0, 0, &status);
-#endif
printf("terminate called after throwing a `%s'\n",
status == 0 ? dem : name);