vterminate.cc: Move to...
authorPhil Edwards <pme@gcc.gnu.org>
Thu, 26 Dec 2002 06:10:35 +0000 (06:10 +0000)
committerPhil Edwards <pme@gcc.gnu.org>
Thu, 26 Dec 2002 06:10:35 +0000 (06:10 +0000)
2002-12-25  Phil Edwards  <pme@gcc.gnu.org>

* src/vterminate.cc:  Move to...
* libsupc++/vterminate.cc:  ...here.  New file.  Replace fprintf with
writestr macro.  Slight reword to explanatory text.
* libsupc++/eh_terminate.cc (__cxxabiv1::__terminate_handler,
__cxxabiv1::__unexpected_handler):  Break definitions out to...
* libsupc++/eh_unex_handler.cc:  ...here (new file), and...
* libsupc++/eh_term_handler.cc:  ...here (new file).  Initialize
__terminate_handler with __gnu_cxx::__verbose_terminate_handler
instead of std::abort.

* libsupc++/Makefile.am (sources), src/Makefile.am (sources):  Update.
* libsupc++/Makefile.in, src/Makefile.in:  Regenerate.

From-SVN: r60505

libstdc++-v3/ChangeLog
libstdc++-v3/libsupc++/Makefile.am
libstdc++-v3/libsupc++/Makefile.in
libstdc++-v3/libsupc++/eh_term_handler.cc [new file with mode: 0644]
libstdc++-v3/libsupc++/eh_terminate.cc
libstdc++-v3/libsupc++/eh_unex_handler.cc [new file with mode: 0644]
libstdc++-v3/libsupc++/vterminate.cc [new file with mode: 0644]
libstdc++-v3/src/Makefile.am
libstdc++-v3/src/Makefile.in
libstdc++-v3/src/vterminate.cc [deleted file]

index d9e10319eb1d3679b4fed8292bbd475f2960d9d3..62ce94360328cb2313efa298dee04b0d347af104 100644 (file)
@@ -1,3 +1,18 @@
+2002-12-25  Phil Edwards  <pme@gcc.gnu.org>
+
+       * src/vterminate.cc:  Move to...
+       * libsupc++/vterminate.cc:  ...here.  New file.  Replace fprintf with
+       writestr macro.  Slight reword to explanatory text.
+       * libsupc++/eh_terminate.cc (__cxxabiv1::__terminate_handler,
+       __cxxabiv1::__unexpected_handler):  Break definitions out to...
+       * libsupc++/eh_unex_handler.cc:  ...here (new file), and...
+       * libsupc++/eh_term_handler.cc:  ...here (new file).  Initialize
+       __terminate_handler with __gnu_cxx::__verbose_terminate_handler
+       instead of std::abort.
+
+       * libsupc++/Makefile.am (sources), src/Makefile.am (sources):  Update.
+       * libsupc++/Makefile.in, src/Makefile.in:  Regenerate.
+
 2002-12-23  Danny Smith  <dannysmith@users.sourceforge.net>
 
        * config/io/basic_file_stdio.cc (__basic_file::_M_open_mode):
index a14e0b46a25b39df818950c600972ba03c2133e5..7fd2f58e39617b28604397e2b70ac6d5832e3cf4 100644 (file)
@@ -81,9 +81,11 @@ sources = \
        eh_exception.cc \
        eh_globals.cc \
        eh_personality.cc \
+       eh_term_handler.cc \
        eh_terminate.cc \
        eh_throw.cc \
        eh_type.cc \
+       eh_unex_handler.cc \
        guard.cc \
        new_handler.cc \
        new_op.cc \
@@ -93,7 +95,8 @@ sources = \
        pure.cc \
        tinfo.cc \
        tinfo2.cc \
-       vec.cc
+       vec.cc \
+       vterminate.cc
 
 libsupc___la_SOURCES = $(sources) $(c_sources)
 libsupc__convenience_la_SOURCES = $(sources) $(c_sources)
index 107fcfa3019712028ae33eab32c1a7842395b0f6..8e25f4d7863ae73dd68df114098cbb22cc074dff 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
 
 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
@@ -163,13 +163,11 @@ OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
 # These bits are all figured out from configure. Look in acinclude.m4
 # or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
 # NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
-CONFIG_CXXFLAGS = \
-       @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@
+CONFIG_CXXFLAGS =      @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@
 
 
 # Warning flags to use.
-WARN_CXXFLAGS = \
-       @WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
+WARN_CXXFLAGS =        @WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
 
 
 # Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
@@ -177,43 +175,16 @@ GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
 LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
 GCC_INCLUDES = -I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include
 
-INCLUDES = \
-       $(GCC_INCLUDES) $(GLIBCPP_INCLUDES) $(LIBSUPCXX_INCLUDES)
-
-
-headers = \
-       exception new typeinfo cxxabi.h exception_defines.h 
-
-
-c_sources = \
-       cxa_demangle.c \
-       dyn-string.c 
-
-
-sources = \
-       del_op.cc \
-       del_opnt.cc \
-       del_opv.cc \
-       del_opvnt.cc \
-       eh_alloc.cc \
-       eh_aux_runtime.cc \
-       eh_catch.cc \
-       eh_exception.cc \
-       eh_globals.cc \
-       eh_personality.cc \
-       eh_terminate.cc \
-       eh_throw.cc \
-       eh_type.cc \
-       guard.cc \
-       new_handler.cc \
-       new_op.cc \
-       new_opnt.cc \
-       new_opv.cc \
-       new_opvnt.cc \
-       pure.cc \
-       tinfo.cc \
-       tinfo2.cc \
-       vec.cc
+INCLUDES =     $(GCC_INCLUDES) $(GLIBCPP_INCLUDES) $(LIBSUPCXX_INCLUDES)
+
+
+headers =      exception new typeinfo cxxabi.h exception_defines.h 
+
+
+c_sources =    cxa_demangle.c  dyn-string.c 
+
+
+sources =      del_op.cc       del_opnt.cc     del_opv.cc      del_opvnt.cc    eh_alloc.cc     eh_aux_runtime.cc       eh_catch.cc     eh_exception.cc         eh_globals.cc   eh_personality.cc       eh_term_handler.cc      eh_terminate.cc         eh_throw.cc     eh_type.cc      eh_unex_handler.cc      guard.cc        new_handler.cc  new_op.cc       new_opnt.cc     new_opv.cc      new_opvnt.cc    pure.cc         tinfo.cc        tinfo2.cc       vec.cc  vterminate.cc
 
 
 libsupc___la_SOURCES = $(sources) $(c_sources)
@@ -227,15 +198,11 @@ LIBSUPCXX_CXXFLAGS = $(LIBSUPCXX_PICFLAGS)
 # Use special rules for pulling things out of libiberty.  These
 # objects should be compiled with the "C" compiler, not the C++
 # compiler, and also should not use the C++ includes.
-C_COMPILE = \
-       $(CC) $(DEFS) $(GCC_INCLUDES) \
-       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+C_COMPILE =    $(CC) $(DEFS) $(GCC_INCLUDES)   $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 
 
 # LTCOMPILE is copied from LTCXXCOMPILE below.
-LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared --mode=compile $(CC) \
-           $(DEFS) $(GCC_INCLUDES) $(LIBSUPCXX_PICFLAGS) \
-            $(AM_CPPFLAGS) $(CPPFLAGS) 
+LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared --mode=compile $(CC)          $(DEFS) $(GCC_INCLUDES) $(LIBSUPCXX_PICFLAGS)             $(AM_CPPFLAGS) $(CPPFLAGS) 
 
 
 # AM_CXXFLAGS needs to be in each subdirectory so that it can be
@@ -243,12 +210,7 @@ LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared --mode=compile $(CC) \
 # set this option because CONFIG_CXXFLAGS has to be after
 # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
 # as the occasion call for it. (ie, --enable-debug)
-AM_CXXFLAGS = \
-       -fno-implicit-templates \
-       $(LIBSUPCXX_CXXFLAGS) \
-       $(WARN_CXXFLAGS) \
-       $(OPTIMIZE_CXXFLAGS) \
-       $(CONFIG_CXXFLAGS) 
+AM_CXXFLAGS =          -fno-implicit-templates         $(LIBSUPCXX_CXXFLAGS)   $(WARN_CXXFLAGS)        $(OPTIMIZE_CXXFLAGS)    $(CONFIG_CXXFLAGS) 
 
 
 # libstdc++ libtool notes
@@ -272,9 +234,7 @@ AM_CXXFLAGS = \
 #
 # We have to put --tag disable-shared after --tag CXX lest things
 # CXX undo the affect of disable-shared.
-LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
-               --mode=compile $(CXX) $(INCLUDES) \
-              $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) 
+LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared                --mode=compile $(CXX) $(INCLUDES)             $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) 
 
 
 # 3) We'd have a problem when building the shared libstdc++ object if
@@ -283,9 +243,7 @@ LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
 # course is problematic at this point.  So, we get the top-level
 # directory to configure libstdc++-v3 to use gcc as the C++
 # compilation driver.
-CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared \
-          --mode=link $(CXX) \
-          @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared           --mode=link $(CXX)           @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
 
 CONFIG_HEADER = ../config.h
 CONFIG_CLEAN_FILES = 
@@ -300,16 +258,18 @@ 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 \
-guard.lo new_handler.lo new_op.lo new_opnt.lo new_opv.lo new_opvnt.lo \
-pure.lo tinfo.lo tinfo2.lo vec.lo cxa_demangle.lo dyn-string.lo
+eh_globals.lo eh_personality.lo eh_term_handler.lo eh_terminate.lo \
+eh_throw.lo eh_type.lo eh_unex_handler.lo guard.lo new_handler.lo \
+new_op.lo new_opnt.lo new_opv.lo new_opvnt.lo pure.lo tinfo.lo \
+tinfo2.lo vec.lo vterminate.lo cxa_demangle.lo dyn-string.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 guard.lo \
-new_handler.lo new_op.lo new_opnt.lo new_opv.lo new_opvnt.lo pure.lo \
-tinfo.lo tinfo2.lo vec.lo cxa_demangle.lo dyn-string.lo
+eh_personality.lo eh_term_handler.lo eh_terminate.lo eh_throw.lo \
+eh_type.lo eh_unex_handler.lo guard.lo new_handler.lo new_op.lo \
+new_opnt.lo new_opv.lo new_opvnt.lo pure.lo tinfo.lo tinfo2.lo vec.lo \
+vterminate.lo cxa_demangle.lo dyn-string.lo
 CXXFLAGS = @CXXFLAGS@
 CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
 CXXLD = $(CXX)
@@ -324,7 +284,7 @@ DIST_COMMON =  Makefile.am Makefile.in
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = gtar
+TAR = tar
 GZIP_ENV = --best
 SOURCES = $(libsupc__convenience_la_SOURCES) $(libsupc___la_SOURCES)
 OBJECTS = $(libsupc__convenience_la_OBJECTS) $(libsupc___la_OBJECTS)
@@ -448,7 +408,7 @@ TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
          awk '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
        test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
-         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+         || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags  $$unique $(LISP))
 
 mostlyclean-tags:
 
diff --git a/libstdc++-v3/libsupc++/eh_term_handler.cc b/libstdc++-v3/libsupc++/eh_term_handler.cc
new file mode 100644 (file)
index 0000000..ff7b7ed
--- /dev/null
@@ -0,0 +1,35 @@
+// -*- C++ -*- std::terminate handler
+// Copyright (C) 2002 Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// GNU CC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with GNU CC; see the file COPYING.  If not, write to
+// the Free Software Foundation, 59 Temple Place - Suite 330,
+// Boston, MA 02111-1307, USA. 
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include "unwind-cxx.h"
+
+/* The current installed user handler.  */
+std::terminate_handler __cxxabiv1::__terminate_handler =
+                                       __gnu_cxx::__verbose_terminate_handler;
+
index 58a6ea46b3441e2c19e278310f883eb4145978d5..e416c91307b9e1172e4d96d3bf4b28c2fceee2d2 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*- std::terminate, std::unexpected and friends.
-// Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 
+// Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
 // Free Software Foundation
 //
 // This file is part of GNU CC.
 
 using namespace __cxxabiv1;
 
-/* The current installed user handlers.  */
-std::terminate_handler __cxxabiv1::__terminate_handler = std::abort;
-std::unexpected_handler __cxxabiv1::__unexpected_handler = std::terminate;
-
 void
 __cxxabiv1::__terminate (std::terminate_handler handler)
 {
diff --git a/libstdc++-v3/libsupc++/eh_unex_handler.cc b/libstdc++-v3/libsupc++/eh_unex_handler.cc
new file mode 100644 (file)
index 0000000..2a4689d
--- /dev/null
@@ -0,0 +1,34 @@
+// -*- C++ -*- std::unexpected handler
+// Copyright (C) 2002 Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// GNU CC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with GNU CC; see the file COPYING.  If not, write to
+// the Free Software Foundation, 59 Temple Place - Suite 330,
+// Boston, MA 02111-1307, USA. 
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include "unwind-cxx.h"
+
+/* The current installed user handler.  */
+std::unexpected_handler __cxxabiv1::__unexpected_handler = std::terminate;
+
diff --git a/libstdc++-v3/libsupc++/vterminate.cc b/libstdc++-v3/libsupc++/vterminate.cc
new file mode 100644 (file)
index 0000000..a8718fc
--- /dev/null
@@ -0,0 +1,98 @@
+// Verbose terminate_handler -*- C++ -*-
+
+// Copyright (C) 2001, 2002 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <bits/c++config.h>
+#include <cstdlib>
+#include <exception>
+#include <exception_defines.h>
+#include <cxxabi.h>
+
+#ifdef _GLIBCPP_HAVE_UNISTD_H
+# include <unistd.h>
+# define writestr(str)  write(2, str, sizeof(str) - 1)
+#else
+# include <cstdio>
+# define writestr(str)  std::fputs(str, stderr)
+#endif
+
+using namespace std;
+using namespace abi;
+
+namespace __gnu_cxx
+{
+  /* A replacement for the standard terminate_handler which prints
+   more information about the terminating exception (if any) on
+   stderr.  */
+  void __verbose_terminate_handler()
+  {
+    // Make sure there was an exception; terminate is also called for an
+    // attempt to rethrow when there is no suitable exception.
+    type_info *t = __cxa_current_exception_type();
+    if (t)
+      {
+       char const *name = t->name();
+       // Note that "name" is the mangled name.
+       
+       {
+         int status = -1;
+         char *dem = 0;
+         
+         dem = __cxa_demangle(name, 0, 0, &status);
+
+         writestr("terminate called after throwing an instance of '");
+         if (status == 0)
+           writestr(dem);
+         else
+           writestr(name);
+         writestr("'\n");
+
+         if (status == 0)
+           free(dem);
+       }
+
+       // If the exception is derived from std::exception, we can give more
+       // information.
+       try { __throw_exception_again; }
+#ifdef __EXCEPTIONS
+       catch (exception &exc)
+         {
+           char const *w = exc.what();
+           writestr("  what():  ");
+           writestr(w);
+           writestr("\n");
+          }
+#endif
+       catch (...) { }
+      }
+    else
+      writestr("terminate called without an active exception\n");
+    
+    abort();
+  }
+} // namespace __gnu_cxx
index a015000f766dd8bffb0f5c825513b8c6a567e066..0cffb7fd3ec6109e03114cd58759430704ed6bdc 100644 (file)
@@ -143,7 +143,6 @@ sources = \
        string-inst.cc \
        strstream.cc \
        valarray-inst.cc \
-       vterminate.cc \
        wstring-inst.cc \
        ${target_sources} \
        ${target_sources_extra}
index e1fbad9e1f22b7dc5fc25da3d4c12c2202e46ed6..f6ad9cf4926d57c1290ab749dd9006277b481744 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
 
 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
@@ -145,7 +145,7 @@ glibcpp_builddir = @glibcpp_builddir@
 toolexecdir = @glibcpp_toolexecdir@
 toolexeclibdir = @glibcpp_toolexeclibdir@
 toolexeclib_LTLIBRARIES = libstdc++.la
-@GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE@version_arg = @GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE@-Wl,--version-script=libstdc++-symbol.ver
+@GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE@version_arg = -Wl,--version-script=libstdc++-symbol.ver
 @GLIBCPP_BUILD_VERSIONED_SHLIB_FALSE@version_arg = 
 
 # Compile flags that should be constant throughout the build, both for
@@ -154,13 +154,11 @@ OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
 
 # These bits are all figured out from configure. Look in acinclude.m4
 # or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
-CONFIG_CXXFLAGS = \
-       @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@
+CONFIG_CXXFLAGS =      @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@
 
 
 # Warning flags to use.
-WARN_CXXFLAGS = \
-       @WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
+WARN_CXXFLAGS =        @WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
 
 
 # Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
@@ -170,80 +168,33 @@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
 LIBIO_INCLUDES = @LIBIO_INCLUDES@
 TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
 
-INCLUDES = \
-       -nostdinc++ \
-       $(GLIBCPP_INCLUDES) \
-       $(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) \
-       $(TOPLEVEL_INCLUDES)
+INCLUDES =     -nostdinc++     $(GLIBCPP_INCLUDES)     $(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES)     $(TOPLEVEL_INCLUDES)
 
 
 # Source files linked in via configuration/make substitution for a
 # particular target.
-target_sources = \
-       codecvt_members.cc \
-       collate_members.cc \
-       ctype_members.cc \
-       messages_members.cc \
-       monetary_members.cc \
-       numeric_members.cc \
-       time_members.cc
+target_sources =       codecvt_members.cc      collate_members.cc      ctype_members.cc        messages_members.cc     monetary_members.cc     numeric_members.cc      time_members.cc
 
 
 # Source files linked in via configuration/make substitution for a
 # particular target, but with ad hoc naming rules.
-target_sources_extra = \
-       basic_file.cc \
-       c++locale.cc 
+target_sources_extra =         basic_file.cc   c++locale.cc 
 
 
 # Sources present in the src directory.
-sources = \
-       bitset.cc \
-       codecvt.cc \
-       complex_io.cc \
-       concept-inst.cc \
-       ctype.cc \
-       ext-inst.cc \
-       fstream.cc \
-       fstream-inst.cc \
-       functexcept.cc \
-       globals.cc \
-       io-inst.cc \
-       ios.cc \
-       istream-inst.cc \
-       limits.cc \
-       locale.cc \
-       locale-inst.cc \
-       localename.cc \
-       misc-inst.cc \
-       ostream-inst.cc \
-       sstream-inst.cc \
-       stdexcept.cc \
-       stl-inst.cc \
-       streambuf-inst.cc \
-       string-inst.cc \
-       strstream.cc \
-       valarray-inst.cc \
-       vterminate.cc \
-       wstring-inst.cc \
-       ${target_sources} \
-       ${target_sources_extra}
+sources =      bitset.cc       codecvt.cc      complex_io.cc   concept-inst.cc         ctype.cc        ext-inst.cc     fstream.cc      fstream-inst.cc         functexcept.cc  globals.cc      io-inst.cc      ios.cc  istream-inst.cc         limits.cc       locale.cc       locale-inst.cc  localename.cc   misc-inst.cc    ostream-inst.cc         sstream-inst.cc         stdexcept.cc    stl-inst.cc     streambuf-inst.cc       string-inst.cc  strstream.cc    valarray-inst.cc        wstring-inst.cc         ${target_sources}       ${target_sources_extra}
 
 
 VPATH = $(top_srcdir)/src:$(top_srcdir)
 
 libstdc___la_SOURCES = $(sources)
 
-libstdc___la_LIBADD = \
-       $(top_builddir)/libmath/libmath.la @libio_la@ \
-       $(top_builddir)/libsupc++/libsupc++convenience.la
+libstdc___la_LIBADD =          $(top_builddir)/libmath/libmath.la @libio_la@   $(top_builddir)/libsupc++/libsupc++convenience.la
 
 
 libstdc___la_DEPENDENCIES = libstdc++-symbol.ver $(libstdc___la_LIBADD)
 
-libstdc___la_LDFLAGS = \
-       -version-info @libtool_VERSION@ ${version_arg} \
-       -lm @LIBUNWIND_FLAG@ 
+libstdc___la_LDFLAGS =         -version-info @libtool_VERSION@ ${version_arg}  -lm @LIBUNWIND_FLAG@ 
 
 
 # Use special rules for the deprecated source files so that they find
@@ -254,13 +205,8 @@ GLIBCPP_INCLUDE_DIR = @glibcpp_builddir@/include
 # modified in a per-library or per-sub-library way.  Need to manually
 # set this option because CONFIG_CXXFLAGS has to be after
 # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
-# as the occasion call for it. (ie, --enable-debug)
-AM_CXXFLAGS = \
-       -fno-implicit-templates \
-       $(LIBSUPCXX_CXXFLAGS) \
-       $(WARN_CXXFLAGS) \
-       $(OPTIMIZE_CXXFLAGS) \
-       $(CONFIG_CXXFLAGS)  
+# as the occasion call for it. 
+AM_CXXFLAGS =          -fno-implicit-templates         $(LIBSUPCXX_CXXFLAGS)   $(WARN_CXXFLAGS)        $(OPTIMIZE_CXXFLAGS)    $(CONFIG_CXXFLAGS)  
 
 
 # libstdc++ libtool notes
@@ -281,8 +227,7 @@ AM_CXXFLAGS = \
 # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
 # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
 # attempt to infer which configuration to use
-LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
-              $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) 
+LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES)         $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) 
 
 
 # 3) We'd have a problem when building the shared libstdc++ object if
@@ -291,8 +236,7 @@ LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
 # course is problematic at this point.  So, we get the top-level
 # directory to configure libstdc++-v3 to use gcc as the C++
 # compilation driver.
-CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX) \
-         @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX)        @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
 
 
 debugdir = debug
@@ -310,8 +254,8 @@ concept-inst.lo ctype.lo ext-inst.lo fstream.lo fstream-inst.lo \
 functexcept.lo globals.lo io-inst.lo ios.lo istream-inst.lo limits.lo \
 locale.lo locale-inst.lo localename.lo misc-inst.lo ostream-inst.lo \
 sstream-inst.lo stdexcept.lo stl-inst.lo streambuf-inst.lo \
-string-inst.lo strstream.lo valarray-inst.lo vterminate.lo \
-wstring-inst.lo codecvt_members.lo collate_members.lo ctype_members.lo \
+string-inst.lo strstream.lo valarray-inst.lo wstring-inst.lo \
+codecvt_members.lo collate_members.lo ctype_members.lo \
 messages_members.lo monetary_members.lo numeric_members.lo \
 time_members.lo basic_file.lo c++locale.lo
 CXXFLAGS = @CXXFLAGS@
@@ -322,7 +266,7 @@ DIST_COMMON =  Makefile.am Makefile.in
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = gtar
+TAR = tar
 GZIP_ENV = --best
 SOURCES = $(libstdc___la_SOURCES)
 OBJECTS = $(libstdc___la_OBJECTS)
@@ -434,7 +378,7 @@ TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
          awk '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
        test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
-         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+         || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags  $$unique $(LISP))
 
 mostlyclean-tags:
 
diff --git a/libstdc++-v3/src/vterminate.cc b/libstdc++-v3/src/vterminate.cc
deleted file mode 100644 (file)
index 6e28575..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-// Verbose terminate_handler -*- C++ -*-
-
-// Copyright (C) 2001, 2002 Free Software Foundation
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#include <cstdlib>
-#include <cstdio>
-#include <exception>
-#include <exception_defines.h>
-#include <cxxabi.h>
-
-using namespace std;
-using namespace abi;
-
-namespace __gnu_cxx
-{
-  /* A replacement for the standard terminate_handler which prints
-   more information about the terminating exception (if any) on
-   stderr.  */
-  void __verbose_terminate_handler()
-  {
-    // Make sure there was an exception; terminate is also called for an
-    // attempt to rethrow when there is no suitable exception.
-    type_info *t = __cxa_current_exception_type();
-    if (t)
-      {
-       char const *name = t->name();
-       // Note that "name" is the mangled name.
-       
-       {
-         int status = -1;
-         char *dem = 0;
-         
-         dem = __cxa_demangle(name, 0, 0, &status);
-
-         fprintf(stderr, "terminate called after throwing a `%s'\n", 
-                 status == 0 ? dem : name);
-
-         if (status == 0)
-           free(dem);
-       }
-
-       // If the exception is derived from std::exception, we can give more
-       // information.
-       try { __throw_exception_again; }
-#ifdef __EXCEPTIONS
-       catch (exception &exc)
-         { fprintf(stderr, "  what(): %s\n", exc.what()); }
-#endif
-       catch (...) { }
-      }
-    else
-      fprintf(stderr, "terminate called without an active exception\n");
-    
-    abort();
-  }
-} // namespace __gnu_cxx