This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Only build personality routine for SymbianOS.


The attached patch merged the following change from csl-arm-branch.
http://gcc.gnu.org/ml/gcc-patches/2005-03/msg00978.html

Arm SymbianOS provides it own C++ runtime library. 
On most targets the PR is tied to a specific c++ library implementation.
However because of the way Arm exception handling works it's tied to a 
particular compiler, but nbot C++ library specific.
We need to build and supply the g++ unwinding personality routine, but not the 
rest of libsupc++.

The attached patch adds logic to build just this bit of libsupc++.

Tested on arm-none-eabi and arm-none-symbianelf.
Ok?

2006-01-18  Paul Brook  <paul@codesourcery.com>

	Merge from csl-arm-branch
	2005-03-10  Julian Brown  <julian@codesourcery.com>
	* configure.ac (LIBSUPCXX_PRONLY): New AM_CONDITIONAL: yes if we are
	compiling for SymbianOS on ARM.
	* include/Makefile.am: Don't install C++ headers if LIBSUPCXX_PRONLY
	is true.
	* libsupc++/Makefile.am: Include only eh_personality.cc in libsupc++
	if LIBSUPCXX_PRONLY is true.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* include/Makefile.in: Regenerate.
	* libmath/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
Index: libstdc++-v3/include/Makefile.am
===================================================================
--- libstdc++-v3/include/Makefile.am	(revision 109897)
+++ libstdc++-v3/include/Makefile.am	(working copy)
@@ -910,8 +910,14 @@ ${pch_input}: ${allstamped} ${host_build
 if GLIBCXX_HOSTED
 install-data-local: install-headers ${pch_install}
 else
+if LIBSUPCXX_PRONLY
+# Don't install any headers if we're only putting eh_personality in
+# libsupc++ (e.g. on SymbianOS)
+install-data-local:
+else
 install-data-local: install-freestanding-headers
 endif
+endif
 
 # This is a subset of the full install-headers rule.  We only need <cstddef>,
 # <limits>, <cstdlib>, <cstdarg>, <new>, <typeinfo>, <exception>, and any
Index: libstdc++-v3/libsupc++/Makefile.am
===================================================================
--- libstdc++-v3/libsupc++/Makefile.am	(revision 109897)
+++ libstdc++-v3/libsupc++/Makefile.am	(working copy)
@@ -31,6 +31,11 @@ toolexeclib_LTLIBRARIES = libsupc++.la
 # 2) integrated libsupc++convenience.la that is to be a part of libstdc++.a
 noinst_LTLIBRARIES = libsupc++convenience.la
 
+if LIBSUPCXX_PRONLY
+sources = \
+	eh_personality.cc
+
+else
 
 headers = \
 	exception new typeinfo cxxabi.h exception_defines.h
@@ -69,6 +74,7 @@ sources = \
 	tinfo2.cc \
 	vec.cc \
 	vterminate.cc
+endif
 
 libsupc___la_SOURCES = $(sources) $(c_sources)
 libsupc__convenience_la_SOURCES = $(sources) $(c_sources)
Index: libstdc++-v3/configure.ac
===================================================================
--- libstdc++-v3/configure.ac	(revision 109897)
+++ libstdc++-v3/configure.ac	(working copy)
@@ -296,13 +296,22 @@ AC_SUBST(CPU_DEFINES_SRCDIR)
 AC_SUBST(ABI_TWEAKS_SRCDIR)
 AC_SUBST(OS_INC_SRCDIR)
 
+# For SymbianOS, we use a highly cut-down libsupc++. This lets us
+# conditionalise libsupc++'s Makefile.am to include only the necessary sources.
+case "$target" in
+  *arm*-symbianelf)
+  LIBSUPCXX_PRONLY=yes;;
+  *);;
+esac
+AM_CONDITIONAL(LIBSUPCXX_PRONLY, test $LIBSUPCXX_PRONLY = yes)
+
 # Determine cross-compile flags and AM_CONDITIONALs.
 #AC_SUBST(GLIBCXX_IS_NATIVE)
 #AM_CONDITIONAL(CANADIAN, test $CANADIAN = yes)
 # from GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT:
 #AM_CONDITIONAL(GLIBCXX_BUILD_LIBMATH,  test $need_libmath = yes)
 GLIBCXX_EVALUATE_CONDITIONALS
- 
+
 AC_CACHE_SAVE
 
 if test ${multilib} = yes; then

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]