mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-19 19:04:11 +08:00
allocator: New.
2004-03-13 Benjamin Kosnik <bkoz@redhat.com> * config/allocator: New. * config/allocator/bitmap_allocator_base.h: New. * config/allocator/malloc_allocator_base.h: New. * config/allocator/mt_allocator_base.h: New. * config/allocator/new_allocator_base.h: New. * include/bits/allocator.h: Include c++allocator.h. * acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): New. * aclocal.m4: Regenerate. * configure.ac: Use GLIBCXX_ENABLE_ALLOCATOR. * configure: Regenerate. * include/Makefile.am (host_headers_extra): Add c++allocator.h. * include/Makefile.in: Regenerate. * docs/html/configopts.html: Add enable-libstdcxx-allocator. From-SVN: r79435
This commit is contained in:
parent
992ab1225d
commit
8b0d605196
@ -1,3 +1,19 @@
|
||||
2004-03-13 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* config/allocator: New.
|
||||
* config/allocator/bitmap_allocator_base.h: New.
|
||||
* config/allocator/malloc_allocator_base.h: New.
|
||||
* config/allocator/mt_allocator_base.h: New.
|
||||
* config/allocator/new_allocator_base.h: New.
|
||||
* include/bits/allocator.h: Include c++allocator.h.
|
||||
* acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): New.
|
||||
* aclocal.m4: Regenerate.
|
||||
* configure.ac: Use GLIBCXX_ENABLE_ALLOCATOR.
|
||||
* configure: Regenerate.
|
||||
* include/Makefile.am (host_headers_extra): Add c++allocator.h.
|
||||
* include/Makefile.in: Regenerate.
|
||||
* docs/html/configopts.html: Add enable-libstdcxx-allocator.
|
||||
|
||||
2004-03-12 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* include/bits/allocator.h: Revert.
|
||||
|
@ -87,6 +87,8 @@ GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCATOR_H = @ALLOCATOR_H@
|
||||
ALLOCATOR_NAME = @ALLOCATOR_NAME@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
|
@ -1170,6 +1170,79 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
|
||||
])
|
||||
|
||||
|
||||
dnl
|
||||
dnl Check for which std::allocator base class to use. The choice is
|
||||
dnl mapped from a subdirectory of include/ext.
|
||||
dnl
|
||||
dnl Default is new.
|
||||
dnl
|
||||
AC_DEFUN([GLIBCXX_ENABLE_ALLOCATOR], [
|
||||
AC_MSG_CHECKING([for std::allocator base class to use])
|
||||
GLIBCXX_ENABLE(libstdcxx-allocator,auto,[=KIND],
|
||||
[use KIND for target std::allocator base],
|
||||
[permit new|malloc|mt|bitmap|yes|no|auto])
|
||||
# If they didn't use this option switch, or if they specified --enable
|
||||
# with no specific model, we'll have to look for one. If they
|
||||
# specified --disable (???), do likewise.
|
||||
if test $enable_libstdcxx_allocator = no || test $enable_libstdcxx_allocator = yes; then
|
||||
enable_libstdcxx_allocator=auto
|
||||
fi
|
||||
|
||||
# Either a known package, or "auto"
|
||||
enable_libstdcxx_allocator_flag=$enable_libstdcxx_allocator
|
||||
|
||||
# Probe for host-specific support if no specific model is specified.
|
||||
# Default to "new".
|
||||
if test $enable_libstdcxx_allocator_flag = auto; then
|
||||
case ${target_os} in
|
||||
freebsd*)
|
||||
enable_libstdcxx_allocator_flag=mt
|
||||
;;
|
||||
hpux11*)
|
||||
enable_libstdcxx_allocator_flag=mt
|
||||
;;
|
||||
irix6*)
|
||||
enable_libstdcxx_allocator_flag=mt
|
||||
;;
|
||||
linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
|
||||
enable_libstdcxx_allocator_flag=mt
|
||||
;;
|
||||
solaris*)
|
||||
enable_libstdcxx_allocator_flag=mt
|
||||
;;
|
||||
*)
|
||||
enable_libstdcxx_allocator_flag=new
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT($enable_libstdcxx_allocator_flag)
|
||||
|
||||
|
||||
# Set configure bits for specified locale package
|
||||
case ${enable_libstdcxx_allocator_flag} in
|
||||
bitmap)
|
||||
ALLOCATOR_H=config/allocator/bitmap_allocator_base.h
|
||||
ALLOCATOR_NAME=__gnu_cxx::bitmap_allocator
|
||||
;;
|
||||
malloc)
|
||||
ALLOCATOR_H=config/allocator/malloc_allocator_base.h
|
||||
ALLOCATOR_NAME=__gnu_cxx::malloc_allocator
|
||||
;;
|
||||
mt)
|
||||
ALLOCATOR_H=config/allocator/mt_allocator_base.h
|
||||
ALLOCATOR_NAME=__gnu_cxx::__mt_alloc
|
||||
;;
|
||||
new)
|
||||
ALLOCATOR_H=config/allocator/new_allocator_base.h
|
||||
ALLOCATOR_NAME=__gnu_cxx::new_allocator
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(ALLOCATOR_H)
|
||||
AC_SUBST(ALLOCATOR_NAME)
|
||||
])
|
||||
|
||||
|
||||
dnl
|
||||
dnl Check for whether the Boost-derived checks should be turned on.
|
||||
dnl
|
||||
|
37
libstdc++-v3/config/allocator/bitmap_allocator_base.h
Normal file
37
libstdc++-v3/config/allocator/bitmap_allocator_base.h
Normal file
@ -0,0 +1,37 @@
|
||||
// Base to std::allocator -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2004 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _CXX_ALLOCATOR_H
|
||||
#define _CXX_ALLOCATOR_H 1
|
||||
|
||||
// Define bitmap_allocator as the base class to std::allocator.
|
||||
#include <ext/bitmap_allocator.h>
|
||||
#define ___glibcxx_base_allocator __gnu_cxx::bitmap_allocator
|
||||
|
||||
#endif
|
37
libstdc++-v3/config/allocator/malloc_allocator_base.h
Normal file
37
libstdc++-v3/config/allocator/malloc_allocator_base.h
Normal file
@ -0,0 +1,37 @@
|
||||
// Base to std::allocator -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2004 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _CXX_ALLOCATOR_H
|
||||
#define _CXX_ALLOCATOR_H 1
|
||||
|
||||
// Define new_allocator as the base class to std::allocator.
|
||||
#include <ext/malloc_allocator.h>
|
||||
#define ___glibcxx_base_allocator __gnu_cxx::malloc_allocator
|
||||
|
||||
#endif
|
37
libstdc++-v3/config/allocator/mt_allocator_base.h
Normal file
37
libstdc++-v3/config/allocator/mt_allocator_base.h
Normal file
@ -0,0 +1,37 @@
|
||||
// Base to std::allocator -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2004 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _CXX_ALLOCATOR_H
|
||||
#define _CXX_ALLOCATOR_H 1
|
||||
|
||||
// Define mt_allocator as the base class to std::allocator.
|
||||
#include <ext/mt_allocator.h>
|
||||
#define ___glibcxx_base_allocator __gnu_cxx::__mt_alloc
|
||||
|
||||
#endif
|
37
libstdc++-v3/config/allocator/new_allocator_base.h
Normal file
37
libstdc++-v3/config/allocator/new_allocator_base.h
Normal file
@ -0,0 +1,37 @@
|
||||
// Base to std::allocator -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2004 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _CXX_ALLOCATOR_H
|
||||
#define _CXX_ALLOCATOR_H 1
|
||||
|
||||
// Define new_allocator as the base class to std::allocator.
|
||||
#include <ext/new_allocator.h>
|
||||
#define ___glibcxx_base_allocator __gnu_cxx::new_allocator
|
||||
|
||||
#endif
|
90
libstdc++-v3/configure
vendored
90
libstdc++-v3/configure
vendored
@ -309,7 +309,7 @@ ac_includes_default="\
|
||||
# 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 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 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 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_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@ -864,6 +864,9 @@ Optional Features:
|
||||
use MODEL for target locale package
|
||||
[default=auto]
|
||||
--enable-nls use Native Language Support (default)
|
||||
--enable-libstdcxx-allocator=KIND
|
||||
use KIND for target std::allocator base
|
||||
[default=auto]
|
||||
--enable-cheaders=KIND construct "C" headers for g++
|
||||
[default=$c_model]
|
||||
--enable-c-mbchar enable multibyte (wide) characters
|
||||
@ -4422,7 +4425,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
|
||||
case $host in
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '#line 4425 "configure"' > conftest.$ac_ext
|
||||
echo '#line 4428 "configure"' > conftest.$ac_ext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
@ -5036,7 +5039,7 @@ fi;
|
||||
#
|
||||
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
|
||||
cat > conftest.$ac_ext << EOF
|
||||
#line 5039 "configure"
|
||||
#line 5042 "configure"
|
||||
struct S { ~S(); };
|
||||
void bar();
|
||||
void foo()
|
||||
@ -6257,6 +6260,85 @@ _ACEOF
|
||||
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for std::allocator base class to use" >&5
|
||||
echo $ECHO_N "checking for std::allocator base class to use... $ECHO_C" >&6
|
||||
# Check whether --enable-libstdcxx-allocator or --disable-libstdcxx-allocator was given.
|
||||
if test "${enable_libstdcxx_allocator+set}" = set; then
|
||||
enableval="$enable_libstdcxx_allocator"
|
||||
|
||||
case "$enableval" in
|
||||
new|malloc|mt|bitmap|yes|no|auto) ;;
|
||||
*) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable libstdcxx-allocator" >&5
|
||||
echo "$as_me: error: Unknown argument to enable/disable libstdcxx-allocator" >&2;}
|
||||
{ (exit 1); exit 1; }; } ;;
|
||||
esac
|
||||
|
||||
else
|
||||
enable_libstdcxx_allocator=auto
|
||||
fi;
|
||||
|
||||
# If they didn't use this option switch, or if they specified --enable
|
||||
# with no specific model, we'll have to look for one. If they
|
||||
# specified --disable (???), do likewise.
|
||||
if test $enable_libstdcxx_allocator = no || test $enable_libstdcxx_allocator = yes; then
|
||||
enable_libstdcxx_allocator=auto
|
||||
fi
|
||||
|
||||
# Either a known package, or "auto"
|
||||
enable_libstdcxx_allocator_flag=$enable_libstdcxx_allocator
|
||||
|
||||
# Probe for host-specific support if no specific model is specified.
|
||||
# Default to "new".
|
||||
if test $enable_libstdcxx_allocator_flag = auto; then
|
||||
case ${target_os} in
|
||||
freebsd*)
|
||||
enable_libstdcxx_allocator_flag=mt
|
||||
;;
|
||||
hpux11*)
|
||||
enable_libstdcxx_allocator_flag=mt
|
||||
;;
|
||||
irix6*)
|
||||
enable_libstdcxx_allocator_flag=mt
|
||||
;;
|
||||
linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
|
||||
enable_libstdcxx_allocator_flag=mt
|
||||
;;
|
||||
solaris*)
|
||||
enable_libstdcxx_allocator_flag=mt
|
||||
;;
|
||||
*)
|
||||
enable_libstdcxx_allocator_flag=new
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $enable_libstdcxx_allocator_flag" >&5
|
||||
echo "${ECHO_T}$enable_libstdcxx_allocator_flag" >&6
|
||||
|
||||
|
||||
# Set configure bits for specified locale package
|
||||
case ${enable_libstdcxx_allocator_flag} in
|
||||
bitmap)
|
||||
ALLOCATOR_H=config/allocator/bitmap_allocator_base.h
|
||||
ALLOCATOR_NAME=__gnu_cxx::bitmap_allocator
|
||||
;;
|
||||
malloc)
|
||||
ALLOCATOR_H=config/allocator/malloc_allocator_base.h
|
||||
ALLOCATOR_NAME=__gnu_cxx::malloc_allocator
|
||||
;;
|
||||
mt)
|
||||
ALLOCATOR_H=config/allocator/mt_allocator_base.h
|
||||
ALLOCATOR_NAME=__gnu_cxx::__mt_alloc
|
||||
;;
|
||||
new)
|
||||
ALLOCATOR_H=config/allocator/new_allocator_base.h
|
||||
ALLOCATOR_NAME=__gnu_cxx::new_allocator
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --enable-cheaders or --disable-cheaders was given.
|
||||
if test "${enable_cheaders+set}" = set; then
|
||||
enableval="$enable_cheaders"
|
||||
@ -73754,6 +73836,8 @@ s,@CTIME_H@,$CTIME_H,;t t
|
||||
s,@CTIME_CC@,$CTIME_CC,;t t
|
||||
s,@CLOCALE_CC@,$CLOCALE_CC,;t t
|
||||
s,@CLOCALE_INTERNAL_H@,$CLOCALE_INTERNAL_H,;t t
|
||||
s,@ALLOCATOR_H@,$ALLOCATOR_H,;t t
|
||||
s,@ALLOCATOR_NAME@,$ALLOCATOR_NAME,;t t
|
||||
s,@C_INCLUDE_DIR@,$C_INCLUDE_DIR,;t t
|
||||
s,@GLIBCXX_C_HEADERS_C_TRUE@,$GLIBCXX_C_HEADERS_C_TRUE,;t t
|
||||
s,@GLIBCXX_C_HEADERS_C_FALSE@,$GLIBCXX_C_HEADERS_C_FALSE,;t t
|
||||
|
@ -84,6 +84,7 @@ GLIBCXX_ENABLE_PCH($is_hosted)
|
||||
# NB: C_MBCHAR must come early.
|
||||
GLIBCXX_ENABLE_CSTDIO
|
||||
GLIBCXX_ENABLE_CLOCALE
|
||||
GLIBCXX_ENABLE_ALLOCATOR
|
||||
GLIBCXX_ENABLE_CHEADERS($c_model) dnl c_model from configure.host
|
||||
GLIBCXX_ENABLE_C_MBCHAR([yes])
|
||||
GLIBCXX_ENABLE_C99([yes])
|
||||
|
@ -124,6 +124,23 @@ options</a></h1>
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt><code>--enable-libstdcxx-allocator </code></dt>
|
||||
<dd><p>This is an abbreviated form of
|
||||
<code>'--enable-libstdcxx-allocator=auto'</code> (described
|
||||
next). This option can change the library ABI.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt><code>--enable-libstdcxx-allocator=OPTION </code></dt>
|
||||
<dd><p>Select a target-specific underlying std::allocator. The
|
||||
choices are 'new' to specify a wrapper for new, 'malloc' to
|
||||
specify a wrapper for malloc, 'mt' for a fixed power of two allocator
|
||||
(More <a href="http://sources.redhat.com/glibc/">info</a>) or
|
||||
'bitmap' for a bitmap allocator. This option can change the
|
||||
library ABI.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt><code>--enable-cheaders=OPTION </code></dt>
|
||||
<dd><p>This allows the user to define what kind of C headers are
|
||||
used. Options are: c, c_std, and c_shadow. These correspond
|
||||
|
@ -351,6 +351,7 @@ host_headers_noinst = \
|
||||
host_headers_extra = \
|
||||
${host_builddir}/basic_file.h \
|
||||
${host_builddir}/c++config.h \
|
||||
${host_builddir}/c++allocator.h \
|
||||
${host_builddir}/c++io.h \
|
||||
${host_builddir}/c++locale.h \
|
||||
${host_builddir}/messages_members.h \
|
||||
@ -480,6 +481,7 @@ stamp-host: ${host_headers} ${host_headers_noinst} stamp-${host_alias}
|
||||
(cd ${host_builddir} ;\
|
||||
$(LN_S) ${host_headers} . || true ;\
|
||||
$(LN_S) ${glibcxx_srcdir}/$(BASIC_FILE_H) basic_file.h || true ;\
|
||||
$(LN_S) ${glibcxx_srcdir}/$(ALLOCATOR_H) c++allocator.h || true ;\
|
||||
$(LN_S) ${glibcxx_srcdir}/$(CSTDIO_H) c++io.h || true ;\
|
||||
$(LN_S) ${glibcxx_srcdir}/$(CLOCALE_H) c++locale.h || true ;\
|
||||
$(LN_S) ${glibcxx_srcdir}/$(CLOCALE_INTERNAL_H) . || true ;\
|
||||
|
@ -55,6 +55,8 @@ SOURCES =
|
||||
DIST_SOURCES =
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCATOR_H = @ALLOCATOR_H@
|
||||
ALLOCATOR_NAME = @ALLOCATOR_NAME@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
@ -559,6 +561,7 @@ host_headers_noinst = \
|
||||
host_headers_extra = \
|
||||
${host_builddir}/basic_file.h \
|
||||
${host_builddir}/c++config.h \
|
||||
${host_builddir}/c++allocator.h \
|
||||
${host_builddir}/c++io.h \
|
||||
${host_builddir}/c++locale.h \
|
||||
${host_builddir}/messages_members.h \
|
||||
@ -854,6 +857,7 @@ stamp-host: ${host_headers} ${host_headers_noinst} stamp-${host_alias}
|
||||
(cd ${host_builddir} ;\
|
||||
$(LN_S) ${host_headers} . || true ;\
|
||||
$(LN_S) ${glibcxx_srcdir}/$(BASIC_FILE_H) basic_file.h || true ;\
|
||||
$(LN_S) ${glibcxx_srcdir}/$(ALLOCATOR_H) c++allocator.h || true ;\
|
||||
$(LN_S) ${glibcxx_srcdir}/$(CSTDIO_H) c++io.h || true ;\
|
||||
$(LN_S) ${glibcxx_srcdir}/$(CLOCALE_H) c++locale.h || true ;\
|
||||
$(LN_S) ${glibcxx_srcdir}/$(CLOCALE_INTERNAL_H) . || true ;\
|
||||
|
@ -49,12 +49,7 @@
|
||||
#define _ALLOCATOR_H 1
|
||||
|
||||
// Define the base class to std::allocator.
|
||||
|
||||
#include <ext/new_allocator.h>
|
||||
#define __glibcxx_default_allocator __gnu_cxx::new_allocator
|
||||
|
||||
//#include <ext/mt_allocator.h>
|
||||
//#define __glibcxx_default_allocator __gnu_cxx::__mt_alloc
|
||||
#include <bits/c++allocator.h>
|
||||
|
||||
namespace std
|
||||
{
|
||||
@ -82,7 +77,7 @@ namespace std
|
||||
* (See @link Allocators allocators info @endlink for more.)
|
||||
*/
|
||||
template<typename _Tp>
|
||||
class allocator: public __glibcxx_default_allocator<_Tp>
|
||||
class allocator: public ___glibcxx_base_allocator<_Tp>
|
||||
{
|
||||
public:
|
||||
typedef size_t size_type;
|
||||
@ -100,7 +95,7 @@ namespace std
|
||||
allocator() throw() { }
|
||||
|
||||
allocator(const allocator& a) throw()
|
||||
: __glibcxx_default_allocator<_Tp>(a) { }
|
||||
: ___glibcxx_base_allocator<_Tp>(a) { }
|
||||
|
||||
template<typename _Tp1>
|
||||
allocator(const allocator<_Tp1>&) throw() { }
|
||||
@ -129,7 +124,7 @@ namespace std
|
||||
#endif
|
||||
|
||||
// Undefine.
|
||||
#undef __glibcxx_default_allocator
|
||||
#undef ___glibcxx_base_allocator
|
||||
} // namespace std
|
||||
|
||||
#endif
|
||||
|
@ -72,6 +72,8 @@ ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCATOR_H = @ALLOCATOR_H@
|
||||
ALLOCATOR_NAME = @ALLOCATOR_NAME@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
|
@ -90,6 +90,8 @@ ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCATOR_H = @ALLOCATOR_H@
|
||||
ALLOCATOR_NAME = @ALLOCATOR_NAME@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
|
@ -55,6 +55,8 @@ SOURCES =
|
||||
DIST_SOURCES =
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCATOR_H = @ALLOCATOR_H@
|
||||
ALLOCATOR_NAME = @ALLOCATOR_NAME@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
|
@ -83,6 +83,8 @@ CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
VPATH = $(top_srcdir)/src:$(top_srcdir)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCATOR_H = @ALLOCATOR_H@
|
||||
ALLOCATOR_NAME = @ALLOCATOR_NAME@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
|
@ -84,6 +84,8 @@ EXPECT = expect
|
||||
RUNTEST = runtest
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCATOR_H = @ALLOCATOR_H@
|
||||
ALLOCATOR_NAME = @ALLOCATOR_NAME@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
|
Loading…
Reference in New Issue
Block a user