* configure.ac: Set ABI_TWEAKS_SRCDIR.
* configure.host: Set abi_tweaks_dir. Check for atomicity.h when
setting atomicity_dir. Override type_cpu for arm based targets.
* include/Makefile.am (host_headers): Add cxxabi_tweaks.h.
* libsupc++/cxxabi.h: Include bits/cxxabi.h. Don't declare __guard.
* libsupc++/guard.cc: Use definitions from cxxabi_tweaks.h.
* libsupc++/vec.cc: Ditto.
* config/cpu/arm/cxxabi_tweaks.h: New file.
* config/cpu/generic/cxxabi_tweaks.h: New file.
* */Makefile.in: Regenerate.
* configure: Regenerate.
From-SVN: r84032
+2004-07-03 Paul Brook <paul@codesourcery.com>
+
+ * configure.ac: Set ABI_TWEAKS_SRCDIR.
+ * configure.host: Set abi_tweaks_dir. Check for atomicity.h when
+ setting atomicity_dir. Override type_cpu for arm based targets.
+ * include/Makefile.am (host_headers): Add cxxabi_tweaks.h.
+ * libsupc++/cxxabi.h: Include bits/cxxabi.h. Don't declare __guard.
+ * libsupc++/guard.cc: Use definitions from cxxabi_tweaks.h.
+ * libsupc++/vec.cc: Ditto.
+ * config/cpu/arm/cxxabi_tweaks.h: New file.
+ * config/cpu/generic/cxxabi_tweaks.h: New file.
+ * */Makefile.in: Regenerate.
+ * configure: Regenerate.
+
2004-07-02 Paolo Carlini <pcarlini@suse.de>
* include/bits/type_traits.h (_Is_normal_iterator): Move...
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
+ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@
ACLOCAL = @ACLOCAL@
ALLOCATOR_H = @ALLOCATOR_H@
ALLOCATOR_NAME = @ALLOCATOR_NAME@
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libtool_VERSION multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot glibcxx_builddir glibcxx_srcdir toplevel_srcdir CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LN_S AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOL CXXCPP CPPFLAGS enable_shared enable_static GLIBCXX_HOSTED_TRUE GLIBCXX_HOSTED_FALSE GLIBCXX_BUILD_PCH_TRUE GLIBCXX_BUILD_PCH_FALSE glibcxx_PCHFLAGS CSTDIO_H BASIC_FILE_H BASIC_FILE_CC CPP EGREP check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_H CCODECVT_H CMESSAGES_H CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_H CTIME_CC CLOCALE_CC CLOCALE_INTERNAL_H ALLOCATOR_H ALLOCATOR_NAME C_INCLUDE_DIR GLIBCXX_C_HEADERS_C_TRUE GLIBCXX_C_HEADERS_C_FALSE GLIBCXX_C_HEADERS_C_STD_TRUE GLIBCXX_C_HEADERS_C_STD_FALSE GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE glibcxx_thread_h DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE EXTRA_CXX_FLAGS WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS LIBICONV SYMVER_MAP port_specific_symbol_files GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE baseline_dir GLIBCXX_TEST_WCHAR_T_TRUE GLIBCXX_TEST_WCHAR_T_FALSE GLIBCXX_TEST_ABI_TRUE GLIBCXX_TEST_ABI_FALSE ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR OS_INC_SRCDIR glibcxx_prefixdir gxx_include_dir glibcxx_toolexecdir glibcxx_toolexeclibdir GLIBCXX_INCLUDES TOPLEVEL_INCLUDES OPTIMIZE_CXXFLAGS WARN_FLAGS LIBSUPCXX_PICFLAGS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libtool_VERSION multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot glibcxx_builddir glibcxx_srcdir toplevel_srcdir CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LN_S AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOL CXXCPP CPPFLAGS enable_shared enable_static GLIBCXX_HOSTED_TRUE GLIBCXX_HOSTED_FALSE GLIBCXX_BUILD_PCH_TRUE GLIBCXX_BUILD_PCH_FALSE glibcxx_PCHFLAGS CSTDIO_H BASIC_FILE_H BASIC_FILE_CC CPP EGREP check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_H CCODECVT_H CMESSAGES_H CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_H CTIME_CC CLOCALE_CC CLOCALE_INTERNAL_H ALLOCATOR_H ALLOCATOR_NAME C_INCLUDE_DIR GLIBCXX_C_HEADERS_C_TRUE GLIBCXX_C_HEADERS_C_FALSE GLIBCXX_C_HEADERS_C_STD_TRUE GLIBCXX_C_HEADERS_C_STD_FALSE GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE glibcxx_thread_h DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE EXTRA_CXX_FLAGS WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS LIBICONV SYMVER_MAP port_specific_symbol_files GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE baseline_dir GLIBCXX_TEST_WCHAR_T_TRUE GLIBCXX_TEST_WCHAR_T_FALSE GLIBCXX_TEST_ABI_TRUE GLIBCXX_TEST_ABI_FALSE ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR ABI_TWEAKS_SRCDIR OS_INC_SRCDIR glibcxx_prefixdir gxx_include_dir glibcxx_toolexecdir glibcxx_toolexeclibdir GLIBCXX_INCLUDES TOPLEVEL_INCLUDES OPTIMIZE_CXXFLAGS WARN_FLAGS LIBSUPCXX_PICFLAGS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi
- cd $ac_popdir
+ cd "$ac_popdir"
done
fi
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4385 "configure"' > conftest.$ac_ext
+ echo '#line 4375 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
#
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
cat > conftest.$ac_ext << EOF
-#line 4999 "configure"
+#line 4988 "configure"
struct S { ~S(); };
void bar();
void foo()
ATOMICITY_SRCDIR=config/${atomicity_dir}
ATOMIC_WORD_SRCDIR=config/${atomic_word_dir}
OS_INC_SRCDIR=config/${os_include_dir}
+ABI_TWEAKS_SRCDIR=config/${abi_tweaks_dir}
+
s,@GLIBCXX_TEST_ABI_FALSE@,$GLIBCXX_TEST_ABI_FALSE,;t t
s,@ATOMICITY_SRCDIR@,$ATOMICITY_SRCDIR,;t t
s,@ATOMIC_WORD_SRCDIR@,$ATOMIC_WORD_SRCDIR,;t t
+s,@ABI_TWEAKS_SRCDIR@,$ABI_TWEAKS_SRCDIR,;t t
s,@OS_INC_SRCDIR@,$OS_INC_SRCDIR,;t t
s,@glibcxx_prefixdir@,$glibcxx_prefixdir,;t t
s,@gxx_include_dir@,$gxx_include_dir,;t t
*) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
fi;;
esac
done` || { (exit 1); exit 1; }
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
sed "$ac_vpsub
ATOMICITY_SRCDIR=config/${atomicity_dir}
ATOMIC_WORD_SRCDIR=config/${atomic_word_dir}
OS_INC_SRCDIR=config/${os_include_dir}
+ABI_TWEAKS_SRCDIR=config/${abi_tweaks_dir}
AC_SUBST(ATOMICITY_SRCDIR)
AC_SUBST(ATOMIC_WORD_SRCDIR)
+AC_SUBST(ABI_TWEAKS_SRCDIR)
AC_SUBST(OS_INC_SRCDIR)
# Determine cross-compile flags and AM_CONDITIONALs.
sparc* | ultrasparc)
try_cpu=sparc
;;
+ arm* | xscale | ep9312)
+ try_cpu=arm
+ ;;
*)
- if test -f ${glibcxx_srcdir}/config/cpu/${host_cpu}/atomicity.h; then
+ if test -d ${glibcxx_srcdir}/config/cpu/${host_cpu}; then
try_cpu=${host_cpu}
else
try_cpu=generic
# default choices for those if they haven't been explicitly set
# already.
cpu_include_dir="cpu/${try_cpu}"
-atomicity_dir=$cpu_include_dir
abi_baseline_pair=${try_cpu}-${host_os}
+if test -f ${glibcxx_srcdir}/config/${cpu_include_dir}/atomicity.h ; then
+ atomicity_dir=$cpu_include_dir
+else
+ atomicity_dir="cpu/generic"
+fi
+
+if test -f ${glibcxx_srcdir}/config/${cpu_include_dir}/cxxabi_tweaks.h ; then
+ abi_tweaks_dir=$cpu_include_dir
+else
+ abi_tweaks_dir="cpu/generic"
+fi
# Set any OS-dependent bits.
# Set the os_include_dir.
${host_srcdir}/ctype_inline.h \
${host_srcdir}/ctype_noninline.h \
${host_srcdir}/os_defines.h \
- ${glibcxx_srcdir}/$(ATOMIC_WORD_SRCDIR)/atomic_word.h
+ ${glibcxx_srcdir}/$(ATOMIC_WORD_SRCDIR)/atomic_word.h \
+ ${glibcxx_srcdir}/$(ABI_TWEAKS_SRCDIR)/cxxabi_tweaks.h
# Non-installed host_header files.
host_headers_noinst = \
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@
ACLOCAL = @ACLOCAL@
ALLOCATOR_H = @ALLOCATOR_H@
ALLOCATOR_NAME = @ALLOCATOR_NAME@
${host_srcdir}/ctype_inline.h \
${host_srcdir}/ctype_noninline.h \
${host_srcdir}/os_defines.h \
- ${glibcxx_srcdir}/$(ATOMIC_WORD_SRCDIR)/atomic_word.h
+ ${glibcxx_srcdir}/$(ATOMIC_WORD_SRCDIR)/atomic_word.h \
+ ${glibcxx_srcdir}/$(ABI_TWEAKS_SRCDIR)/cxxabi_tweaks.h
# Non-installed host_header files.
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@
ACLOCAL = @ACLOCAL@
ALLOCATOR_H = @ALLOCATOR_H@
ALLOCATOR_NAME = @ALLOCATOR_NAME@
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@
ACLOCAL = @ACLOCAL@
ALLOCATOR_H = @ALLOCATOR_H@
ALLOCATOR_NAME = @ALLOCATOR_NAME@
#define _CXXABI_H 1
#include <stddef.h>
+#include <bits/cxxabi_tweaks.h>
#ifdef __cplusplus
namespace __cxxabiv1
size_t __padding_size, void (*__destructor) (void*),
void (*__dealloc) (void*, size_t));
-#ifdef __ARM_EABI__
- // The ARM EABI says this is a 32-bit type.
- typedef int __guard;
-#else
- // The ABI requires a 64-bit type.
- __extension__ typedef int __guard __attribute__((mode (__DI__)));
-#endif
-
int
__cxa_guard_acquire(__guard*);
extern "C"
int __cxa_guard_acquire (__guard *g)
{
-#ifdef __ARM_EABI__
- return !(*g & 1);
-#else
- return !*(char *)(g);
-#endif
+ return _GLIBCXX_GUARD_ACQUIRE (g);
}
extern "C"
void __cxa_guard_release (__guard *g)
{
-#ifdef __ARM_EABI__
- *g = 1;
-#else
- *(char *)g = 1;
-#endif
+ _GLIBCXX_GUARD_RELEASE (g);
}
extern "C"
{
base += padding_size;
reinterpret_cast <std::size_t *> (base)[-1] = element_count;
-#ifdef __ARM_EABI__
- // ARM EABI array cookies also contain the element size.
+#ifdef _GLIBCXX_ELTSIZE_IN_COOKIE
reinterpret_cast <std::size_t *> (base)[-2] = element_size;
#endif
}
{
base += padding_size;
reinterpret_cast<std::size_t *>(base)[-1] = element_count;
-#ifdef __ARM_EABI__
- // ARM EABI array cookies also contain the element size.
+#ifdef _GLIBCXX_ELTSIZE_IN_COOKIE
reinterpret_cast <std::size_t *> (base)[-2] = element_size;
#endif
}
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@
ACLOCAL = @ACLOCAL@
ALLOCATOR_H = @ALLOCATOR_H@
ALLOCATOR_NAME = @ALLOCATOR_NAME@
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
VPATH = $(top_srcdir)/src:$(top_srcdir)
+ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@
ACLOCAL = @ACLOCAL@
ALLOCATOR_H = @ALLOCATOR_H@
ALLOCATOR_NAME = @ALLOCATOR_NAME@
EXPECT = expect
RUNTEST = runtest
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@
ACLOCAL = @ACLOCAL@
ALLOCATOR_H = @ALLOCATOR_H@
ALLOCATOR_NAME = @ALLOCATOR_NAME@