[v3] fix libstdc++/43863
Jonathan Wakely
jwakely.gcc@gmail.com
Wed Feb 9 23:22:00 GMT 2011
This moves the definition of the recursive_init_error destructor to a
separate file so that users who build the library with -fno-exceptions
and link to the static libstdc++.a are not forced to pull in the
exception class.
2011-02-09 Jonathan Wakely <jwakely.gcc@gmail.com>
PR libstdc++/43863
* libsupc++/guard.cc (recursive_init_error::~recursive_init_error):
Move to ...
* libsupc++/guard_error.cc: ... new file.
* libsupc++/Makefile.am: Update.
* libsupc++/Makefile.in: Regenerate.
Tested x86_64-linux, and bootstrapped with
--enable-cxxflags=-fno-exceptions, committed to trunk.
-------------- next part --------------
Index: libsupc++/guard.cc
===================================================================
--- libsupc++/guard.cc (revision 169984)
+++ libsupc++/guard.cc (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2002, 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2004, 2006, 2008, 2009, 2010, 2011
+// Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -134,11 +135,6 @@ __set_and_release (__cxxabiv1::__guard *
#endif /* __GTHREADS */
-namespace __gnu_cxx
-{
- recursive_init_error::~recursive_init_error() throw() { }
-}
-
//
// Here are C++ run-time routines for guarded initiailization of static
// variables. There are 4 scenarios under which these routines are called:
Index: libsupc++/guard_error.cc
===================================================================
--- libsupc++/guard_error.cc (revision 0)
+++ libsupc++/guard_error.cc (revision 0)
@@ -0,0 +1,31 @@
+// Copyright (C) 2011 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC 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 3, or (at your option)
+// any later version.
+
+// GCC 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.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+#include <bits/c++config.h>
+#include <cxxabi.h>
+
+namespace __gnu_cxx
+{
+ recursive_init_error::~recursive_init_error() throw() { }
+}
+
Index: libsupc++/Makefile.am
===================================================================
--- libsupc++/Makefile.am (revision 169984)
+++ libsupc++/Makefile.am (working copy)
@@ -75,6 +75,7 @@ sources = \
function_type_info.cc \
fundamental_type_info.cc \
guard.cc \
+ guard_error.cc \
hash_bytes.cc \
new_handler.cc \
new_op.cc \
More information about the Libstdc++
mailing list