This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Fix __gxx_personality_v0 linking for SymbianOS [csl-arm-branch]
- From: Julian Brown <julian at codesourcery dot com>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Thu, 10 Mar 2005 16:16:38 +0000
- Subject: Re: [PATCH] Fix __gxx_personality_v0 linking for SymbianOS [csl-arm-branch]
- References: <422F854C.4050203@codesourcery.com> <200503092334.25414.paul@codesourcery.com>
Paul Brook wrote:
You might want to see if you can think up a better name for the conditional.
The changes aren't actually SymbianOS specific, though they are probably only
useful on arm eabi targets. On other targets the personality routine is tied
to a particular C++ library.
Ok for csl-arm-branch either way.
OK, I'll apply this version which renames the conditional to
LIBSUPCXX_PRONLY, but is otherwise identical.
ChangeLog:
* gcc/config.gcc: Disable shared libgcc for SymbianOS.
* gcc/config/arm/t-symbian (LIB2ADDEH): Include
config/arm/pr-support.c.
* libstdc++/configure.ac (LIBSUPCXX_PRONLY): New AM_CONDITIONAL: yes
if we are compiling for SymbianOS on ARM.
* libstdc++-v3/include/Makefile.am: Don't install C++ headers if
LIBSUPCXX_PRONLY is true.
* libstdc++-v3/libsupc++/Makefile.am: Only include eh_personality.cc
in libsupc++ if LIBSUPCXX_PRONLY is true.
* libstdc++-v3/Makefile.in: Regenerate.
* libstdc++-v3/configure: Regenerate.
* libstdc++-v3/include/Makefile.in: Regenerate.
* libstdc++-v3/libmath/Makefile.in: Regenerate.
* libstdc++-v3/libsupc++/Makefile.in: Regenerate.
* libstdc++-v3/po/Makefile.in: Regenerate.
* libstdc++-v3/src/Makefile.in: Regenerate.
* libstdc++-v3/testsuite/Makefile.in: Regenerate.
Index: gcc/config.gcc
===================================================================
RCS file: /home/gcc/repos/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.405.4.22
diff -c -p -r1.405.4.22 config.gcc
*** gcc/config.gcc 30 Dec 2004 22:33:23 -0000 1.405.4.22
--- gcc/config.gcc 9 Mar 2005 20:39:39 -0000
*************** arm*-*-eabi* | arm*-*-symbianelf* )
*** 710,716 ****
tm_file="${tm_file} arm/symbian.h"
# We do not include t-bpabi for Symbian OS because the system
# provides its own implementation of the BPABI functions.
! tmake_file="${tmake_file} t-slibgcc-elf-ver arm/t-symbian"
;;
esac
tm_file="${tm_file} arm/aout.h arm/arm.h"
--- 710,716 ----
tm_file="${tm_file} arm/symbian.h"
# We do not include t-bpabi for Symbian OS because the system
# provides its own implementation of the BPABI functions.
! tmake_file="${tmake_file} arm/t-symbian"
;;
esac
tm_file="${tm_file} arm/aout.h arm/arm.h"
Index: gcc/config/arm/t-symbian
===================================================================
RCS file: /home/gcc/repos/gcc/gcc/gcc/config/arm/t-symbian,v
retrieving revision 1.1.2.6
diff -c -p -r1.1.2.6 t-symbian
*** gcc/config/arm/t-symbian 30 Sep 2004 20:10:58 -0000 1.1.2.6
--- gcc/config/arm/t-symbian 9 Mar 2005 20:15:01 -0000
*************** LIB1ASMFUNCS += \
*** 13,19 ****
_fixsfsi _fixunssfsi
# Inlcude the gcc personality routine
! LIB2ADDEH = $(srcdir)/unwind-c.c
LIB2ADDEHDEP = unwind-arm.h
# Create a multilib for processors with VFP floating-point, and a
# multilib for those without -- using the soft-float ABI in both
--- 13,19 ----
_fixsfsi _fixunssfsi
# Inlcude the gcc personality routine
! LIB2ADDEH = $(srcdir)/unwind-c.c $(srcdir)/config/arm/pr-support.c
LIB2ADDEHDEP = unwind-arm.h
# Create a multilib for processors with VFP floating-point, and a
# multilib for those without -- using the soft-float ABI in both
Index: libstdc++-v3/configure.ac
===================================================================
RCS file: /home/gcc/repos/gcc/gcc/libstdc++-v3/configure.ac,v
retrieving revision 1.11.4.6
diff -c -p -r1.11.4.6 configure.ac
*** libstdc++-v3/configure.ac 30 Dec 2004 22:37:51 -0000 1.11.4.6
--- libstdc++-v3/configure.ac 10 Mar 2005 14:13:13 -0000
*************** AC_SUBST(ATOMIC_WORD_SRCDIR)
*** 278,290 ****
AC_SUBST(ABI_TWEAKS_SRCDIR)
AC_SUBST(OS_INC_SRCDIR)
# 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
--- 278,299 ----
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: libstdc++-v3/include/Makefile.am
===================================================================
RCS file: /home/gcc/repos/gcc/gcc/libstdc++-v3/include/Makefile.am,v
retrieving revision 1.71.4.5
diff -c -p -r1.71.4.5 Makefile.am
*** libstdc++-v3/include/Makefile.am 30 Dec 2004 22:37:53 -0000 1.71.4.5
--- libstdc++-v3/include/Makefile.am 10 Mar 2005 14:15:49 -0000
*************** ${pch_input}: ${allstamped} ${host_build
*** 556,562 ****
--- 556,568 ----
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>,
Index: libstdc++-v3/libsupc++/Makefile.am
===================================================================
RCS file: /home/gcc/repos/gcc/gcc/libstdc++-v3/libsupc++/Makefile.am,v
retrieving revision 1.48.4.3
diff -c -p -r1.48.4.3 Makefile.am
*** libstdc++-v3/libsupc++/Makefile.am 22 Sep 2004 15:40:32 -0000 1.48.4.3
--- libstdc++-v3/libsupc++/Makefile.am 10 Mar 2005 14:17:00 -0000
*************** toolexeclib_LTLIBRARIES = libsupc++.la
*** 30,35 ****
--- 30,40 ----
# 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
*************** sources = \
*** 68,73 ****
--- 73,79 ----
tinfo2.cc \
vec.cc \
vterminate.cc
+ endif
libsupc___la_SOURCES = $(sources) $(c_sources)
libsupc__convenience_la_SOURCES = $(sources) $(c_sources)