summaryrefslogtreecommitdiffstats
path: root/gnu/lib
diff options
context:
space:
mode:
authortheraven <theraven@FreeBSD.org>2012-03-31 14:25:12 +0000
committertheraven <theraven@FreeBSD.org>2012-03-31 14:25:12 +0000
commitedca5630e2155dae6a96f4405c04b2734759ff45 (patch)
tree55ef0efa787a1eb010ec165f376ee3c023cdc964 /gnu/lib
parent83cd4d31b1c7ac0db58af07e6267467e8f4aaddb (diff)
downloadFreeBSD-src-edca5630e2155dae6a96f4405c04b2734759ff45.zip
FreeBSD-src-edca5630e2155dae6a96f4405c04b2734759ff45.tar.gz
Make libsupc++ build as a shared library and make libstdc++ a filter library
for it. This allows people to swap out libsupc++ for libcxxrt easily, so we can begin the libstdc++ -> libc++ migration. Approved by: dim (mentor)
Diffstat (limited to 'gnu/lib')
-rw-r--r--gnu/lib/libstdc++/Makefile2
-rw-r--r--gnu/lib/libsupc++/Makefile7
-rw-r--r--gnu/lib/libsupc++/Version.map137
3 files changed, 144 insertions, 2 deletions
diff --git a/gnu/lib/libstdc++/Makefile b/gnu/lib/libstdc++/Makefile
index 56ca626..c373442 100644
--- a/gnu/lib/libstdc++/Makefile
+++ b/gnu/lib/libstdc++/Makefile
@@ -25,7 +25,7 @@ CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections \
PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections}
DPADD= ${LIBM}
-LDADD= -lm
+LDADD= -lm -Wl,-f,libsupc++.so.1
# libstdc++ sources
SRCS+= bitmap_allocator.cc pool_allocator.cc \
diff --git a/gnu/lib/libsupc++/Makefile b/gnu/lib/libsupc++/Makefile
index f2fe8837..a651989 100644
--- a/gnu/lib/libsupc++/Makefile
+++ b/gnu/lib/libsupc++/Makefile
@@ -7,8 +7,8 @@ SRCDIR= ${.CURDIR}/../../../contrib/libstdc++/libsupc++
.PATH: ${SRCDIR} ${GCCLIB}/libiberty
-# Static only.
LIB= supc++
+SHLIB_MAJOR=1
SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc eh_arm.cc \
eh_aux_runtime.cc eh_call.cc eh_catch.cc eh_exception.cc eh_globals.cc \
eh_personality.cc eh_term_handler.cc eh_terminate.cc eh_throw.cc \
@@ -36,4 +36,9 @@ unwind.h: ${GCCDIR}/unwind-generic.h
SRCS+= unwind.h
CLEANFILES+= unwind.h
+# Symbol versioning
+
+VERSION_MAP= ${.CURDIR}/Version.map
+
+
.include <bsd.lib.mk>
diff --git a/gnu/lib/libsupc++/Version.map b/gnu/lib/libsupc++/Version.map
new file mode 100644
index 0000000..12438ca
--- /dev/null
+++ b/gnu/lib/libsupc++/Version.map
@@ -0,0 +1,137 @@
+## Linker script for GNU versioning (GNU ld 2.13.91+ only.)
+##
+## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+## Free Software Foundation, Inc.
+##
+## 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+## USA.
+
+## $FreeBSD$
+
+
+# Symbols in the support library (libsupc++) have their own tag.
+CXXABI_1.3 {
+
+ global:
+ __cxa_allocate_exception;
+ __cxa_bad_cast;
+ __cxa_bad_typeid;
+ __cxa_begin_catch;
+ __cxa_begin_cleanup;
+ __cxa_call_unexpected;
+ __cxa_current_exception_type;
+ __cxa_demangle;
+ __cxa_end_catch;
+ __cxa_end_cleanup;
+ __cxa_free_exception;
+ __cxa_get_globals;
+ __cxa_get_globals_fast;
+ __cxa_guard_abort;
+ __cxa_guard_acquire;
+ __cxa_guard_release;
+ __cxa_pure_virtual;
+ __cxa_rethrow;
+ __cxa_throw;
+ __cxa_type_match;
+ __cxa_vec_cctor;
+ __cxa_vec_cleanup;
+ __cxa_vec_ctor;
+ __cxa_vec_delete2;
+ __cxa_vec_delete3;
+ __cxa_vec_delete;
+ __cxa_vec_dtor;
+ __cxa_vec_new2;
+ __cxa_vec_new3;
+ __cxa_vec_new;
+ __gxx_personality_v0;
+ __gxx_personality_sj0;
+ __dynamic_cast;
+
+ # *_type_info classes, ctor and dtor
+ _ZN10__cxxabiv117__array_type_info*;
+ _ZN10__cxxabiv117__class_type_info*;
+ _ZN10__cxxabiv116__enum_type_info*;
+ _ZN10__cxxabiv120__function_type_info*;
+ _ZN10__cxxabiv123__fundamental_type_info*;
+ _ZN10__cxxabiv117__pbase_type_info*;
+ _ZN10__cxxabiv129__pointer_to_member_type_info*;
+ _ZN10__cxxabiv119__pointer_type_info*;
+ _ZN10__cxxabiv120__si_class_type_info*;
+ _ZN10__cxxabiv121__vmi_class_type_info*;
+
+ # *_type_info classes, member functions
+ _ZNK10__cxxabiv117__class_type_info*;
+ _ZNK10__cxxabiv120__function_type_info*;
+ _ZNK10__cxxabiv117__pbase_type_info*;
+ _ZNK10__cxxabiv129__pointer_to_member_type_info*;
+ _ZNK10__cxxabiv119__pointer_type_info*;
+ _ZNK10__cxxabiv120__si_class_type_info*;
+ _ZNK10__cxxabiv121__vmi_class_type_info*;
+
+ # virtual table
+ _ZTVN10__cxxabiv117__array_type_infoE;
+ _ZTVN10__cxxabiv117__class_type_infoE;
+ _ZTVN10__cxxabiv116__enum_type_infoE;
+ _ZTVN10__cxxabiv120__function_type_infoE;
+ _ZTVN10__cxxabiv123__fundamental_type_infoE;
+ _ZTVN10__cxxabiv117__pbase_type_infoE;
+ _ZTVN10__cxxabiv129__pointer_to_member_type_infoE;
+ _ZTVN10__cxxabiv119__pointer_type_infoE;
+ _ZTVN10__cxxabiv120__si_class_type_infoE;
+ _ZTVN10__cxxabiv121__vmi_class_type_infoE;
+
+ # typeinfo structure (and some names)
+ _ZTI[a-fh-z];
+ _ZTIP[a-fh-z];
+ _ZTIPK[a-fh-z];
+ _ZTIN10__cxxabiv117__array_type_infoE;
+ _ZTIN10__cxxabiv117__class_type_infoE;
+ _ZTIN10__cxxabiv116__enum_type_infoE;
+ _ZTIN10__cxxabiv120__function_type_infoE;
+ _ZTIN10__cxxabiv123__fundamental_type_infoE;
+ _ZTIN10__cxxabiv117__pbase_type_infoE;
+ _ZTIN10__cxxabiv129__pointer_to_member_type_infoE;
+ _ZTIN10__cxxabiv119__pointer_type_infoE;
+ _ZTIN10__cxxabiv120__si_class_type_infoE;
+ _ZTIN10__cxxabiv121__vmi_class_type_infoE;
+
+ # typeinfo name
+ _ZTS[a-fh-z];
+ _ZTSP[a-fh-z];
+ _ZTSPK[a-fh-z];
+ _ZTSN10__cxxabiv117__array_type_infoE;
+ _ZTSN10__cxxabiv117__class_type_infoE;
+ _ZTSN10__cxxabiv116__enum_type_infoE;
+ _ZTSN10__cxxabiv120__function_type_infoE;
+ _ZTSN10__cxxabiv123__fundamental_type_infoE;
+ _ZTSN10__cxxabiv117__pbase_type_infoE;
+ _ZTSN10__cxxabiv129__pointer_to_member_type_infoE;
+ _ZTSN10__cxxabiv119__pointer_type_infoE;
+ _ZTSN10__cxxabiv120__si_class_type_infoE;
+ _ZTSN10__cxxabiv121__vmi_class_type_infoE;
+
+ # __gnu_cxx::_verbose_terminate_handler()
+ _ZN9__gnu_cxx27__verbose_terminate_handlerEv;
+
+ local:
+ *;
+};
+
+CXXABI_1.3.1 {
+
+ __cxa_get_exception_ptr;
+
+} CXXABI_1.3;
OpenPOWER on IntegriCloud