PR libstdc++/19664 round 1

2006-07-20  Benjamin Kosnik  <bkoz@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
	
	PR libstdc++/19664 round 1
	* acinclude.m4 (GLIBCXX_ENABLE_VISIBILITY): Check it.
	* configure.ac: Use it.
	* configure: Regenerate.
	* docs/html/configopts.html: Document it.
	* include/Makefile.am: Slip in to c++config.
	* include/Makefile.in: Regenerate.
	* include/bits/c++config (_GLIBCXX_VISIBILITY): New.
	(_GLIBCXX_BEGIN_NAMESPACE): Use it.
	(_GLIBCXX_END_NAMESPACE): Use it.
	(_GLIBCXX_BEGIN_NESTED_NAMESPACE): Use it.
	(_GLIBCXX_END_NESTED_NAMESPACE): Use it.		
	* src/debug.cc: Mark __gnu_internal namespace with hidden
	visibility attribute.
	* src/ext-inst.cc: Same.
	* src/globals_io.cc: Same.
	* src/globals_locale.cc: Same.
	* src/ios_init.cc: Same.
	* src/locale.cc: Same.
	* src/mt_allocator.cc: Same.
	* src/pool_allocator.cc: Same.


Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r115632
This commit is contained in:
Benjamin Kosnik 2006-07-20 23:37:27 +00:00 committed by Benjamin Kosnik
parent 326d5132e4
commit 98e615b485
23 changed files with 241 additions and 24 deletions

View File

@ -1,3 +1,28 @@
2006-07-20 Benjamin Kosnik <bkoz@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR libstdc++/19664 round 1
* acinclude.m4 (GLIBCXX_ENABLE_VISIBILITY): Check it.
* configure.ac: Use it.
* configure: Regenerate.
* docs/html/configopts.html: Document it.
* include/Makefile.am: Slip in to c++config.
* include/Makefile.in: Regenerate.
* include/bits/c++config (_GLIBCXX_VISIBILITY): New.
(_GLIBCXX_BEGIN_NAMESPACE): Use it.
(_GLIBCXX_END_NAMESPACE): Use it.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE): Use it.
(_GLIBCXX_END_NESTED_NAMESPACE): Use it.
* src/debug.cc: Mark __gnu_internal namespace with hidden
visibility attribute.
* src/ext-inst.cc: Same.
* src/globals_io.cc: Same.
* src/globals_locale.cc: Same.
* src/ios_init.cc: Same.
* src/locale.cc: Same.
* src/mt_allocator.cc: Same.
* src/pool_allocator.cc: Same.
2006-07-16 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/28277 (partial: valarray bits)

View File

@ -139,6 +139,8 @@ ENABLE_SYMVERS_GNU_NAMESPACE_FALSE = @ENABLE_SYMVERS_GNU_NAMESPACE_FALSE@
ENABLE_SYMVERS_GNU_NAMESPACE_TRUE = @ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@
ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GLIBCXX_BUILD_DEBUG_FALSE = @GLIBCXX_BUILD_DEBUG_FALSE@

View File

@ -2100,6 +2100,38 @@ EOF
])
dnl
dnl Allow visibility attributes to be used on namespaces, objects, etc.
dnl
dnl --enable-visibility enables attempt to use visibility attributes.
dnl --disable-visibility turns off all use of visibility attributes.
dnl + Usage: GLIBCXX_ENABLE_VISIBILITY[(DEFAULT)]
dnl Where DEFAULT is 'yes'.
dnl
AC_DEFUN([GLIBCXX_ENABLE_VISIBILITY], [
GLIBCXX_ENABLE(visibility,$1,,[enables visibility safe usage])
if test x$enable_visibility = xyes ; then
dnl all hail libgfortran
dnl Check whether the target supports hidden visibility.
AC_CACHE_CHECK([whether the target supports hidden visibility],
have_attribute_visibility, [
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror"
AC_TRY_COMPILE([void __attribute__((visibility("hidden"))) foo(void) { }],
[], have_attribute_visibility=yes,
have_attribute_visibility=no)
CFLAGS="$save_CFLAGS"])
if test $have_attribute_visibility = no; then
enable_visibility=no
fi
fi
GLIBCXX_CONDITIONAL(ENABLE_VISIBILITY, test $enable_visibility = yes)
AC_MSG_NOTICE([visibility supported: $enable_visibility])
])
dnl
dnl Add version tags to symbols in shared library (or not), additionally
dnl marking other symbols as private/local (or not).

113
libstdc++-v3/configure vendored
View File

@ -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 install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar 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 CPP CPPFLAGS EGREP LIBTOOL CXXCPP 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 check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_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 DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE EXTRA_CXX_FLAGS glibcxx_thread_h WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS LIBICONV SYMVER_FILE port_specific_symbol_files ENABLE_SYMVERS_TRUE ENABLE_SYMVERS_FALSE ENABLE_SYMVERS_GNU_TRUE ENABLE_SYMVERS_GNU_FALSE ENABLE_SYMVERS_GNU_NAMESPACE_TRUE ENABLE_SYMVERS_GNU_NAMESPACE_FALSE ENABLE_SYMVERS_DARWIN_TRUE ENABLE_SYMVERS_DARWIN_FALSE GLIBCXX_LDBL_COMPAT_TRUE GLIBCXX_LDBL_COMPAT_FALSE baseline_dir ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR CPU_DEFINES_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_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 install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar 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 CPP CPPFLAGS EGREP LIBTOOL CXXCPP 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 check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_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 DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE EXTRA_CXX_FLAGS glibcxx_thread_h WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS LIBICONV SYMVER_FILE port_specific_symbol_files ENABLE_SYMVERS_TRUE ENABLE_SYMVERS_FALSE ENABLE_SYMVERS_GNU_TRUE ENABLE_SYMVERS_GNU_FALSE ENABLE_SYMVERS_GNU_NAMESPACE_TRUE ENABLE_SYMVERS_GNU_NAMESPACE_FALSE ENABLE_SYMVERS_DARWIN_TRUE ENABLE_SYMVERS_DARWIN_FALSE ENABLE_VISIBILITY_TRUE ENABLE_VISIBILITY_FALSE GLIBCXX_LDBL_COMPAT_TRUE GLIBCXX_LDBL_COMPAT_FALSE baseline_dir ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR CPU_DEFINES_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.
@ -891,6 +891,7 @@ Optional Features:
[default=yes]
--enable-symvers=STYLE enables symbol versioning of the shared library
[default=yes]
--enable-visibility enables visibility safe usage [default=yes]
--enable-version-specific-runtime-libs
Specify that runtime libraries should be installed
in a compiler-specific directory
@ -4732,7 +4733,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 4735 "configure"' > conftest.$ac_ext
echo '#line 4736 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -5352,7 +5353,7 @@ fi;
#
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
cat > conftest.$ac_ext << EOF
#line 5355 "configure"
#line 5356 "configure"
struct S { ~S(); };
void bar();
void foo()
@ -8008,7 +8009,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
cat > conftest.$ac_ext << EOF
#line 8011 "configure"
#line 8012 "configure"
int main()
{
// NB: _Atomic_word not necessarily int.
@ -109160,6 +109161,90 @@ echo "$as_me:$LINENO: result: $glibcxx_ptrdiff_t_is_i" >&5
echo "${ECHO_T}$glibcxx_ptrdiff_t_is_i" >&6
# Check whether --enable-visibility or --disable-visibility was given.
if test "${enable_visibility+set}" = set; then
enableval="$enable_visibility"
case "$enableval" in
yes|no) ;;
*) { { echo "$as_me:$LINENO: error: Argument to enable/disable visibility must be yes or no" >&5
echo "$as_me: error: Argument to enable/disable visibility must be yes or no" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
else
enable_visibility=yes
fi;
if test x$enable_visibility = xyes ; then
echo "$as_me:$LINENO: checking whether the target supports hidden visibility" >&5
echo $ECHO_N "checking whether the target supports hidden visibility... $ECHO_C" >&6
if test "${have_attribute_visibility+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
void __attribute__((visibility("hidden"))) foo(void) { }
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
have_attribute_visibility=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
have_attribute_visibility=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
fi
echo "$as_me:$LINENO: result: $have_attribute_visibility" >&5
echo "${ECHO_T}$have_attribute_visibility" >&6
if test $have_attribute_visibility = no; then
enable_visibility=no
fi
fi
{ echo "$as_me:$LINENO: visibility supported: $enable_visibility" >&5
echo "$as_me: visibility supported: $enable_visibility" >&6;}
ac_ldbl_compat=no
case "$target" in
powerpc*-*-*gnu* | \
@ -110101,6 +110186,17 @@ fi
if test $enable_visibility = yes; then
ENABLE_VISIBILITY_TRUE=
ENABLE_VISIBILITY_FALSE='#'
else
ENABLE_VISIBILITY_TRUE='#'
ENABLE_VISIBILITY_FALSE=
fi
if test $ac_ldbl_compat = yes; then
GLIBCXX_LDBL_COMPAT_TRUE=
GLIBCXX_LDBL_COMPAT_FALSE='#'
@ -110487,6 +110583,13 @@ echo "$as_me: error: conditional \"ENABLE_SYMVERS_DARWIN\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${ENABLE_VISIBILITY_TRUE}" && test -z "${ENABLE_VISIBILITY_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"ENABLE_VISIBILITY\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"ENABLE_VISIBILITY\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${GLIBCXX_LDBL_COMPAT_TRUE}" && test -z "${GLIBCXX_LDBL_COMPAT_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"GLIBCXX_LDBL_COMPAT\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@ -111168,6 +111271,8 @@ s,@ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@,$ENABLE_SYMVERS_GNU_NAMESPACE_TRUE,;t t
s,@ENABLE_SYMVERS_GNU_NAMESPACE_FALSE@,$ENABLE_SYMVERS_GNU_NAMESPACE_FALSE,;t t
s,@ENABLE_SYMVERS_DARWIN_TRUE@,$ENABLE_SYMVERS_DARWIN_TRUE,;t t
s,@ENABLE_SYMVERS_DARWIN_FALSE@,$ENABLE_SYMVERS_DARWIN_FALSE,;t t
s,@ENABLE_VISIBILITY_TRUE@,$ENABLE_VISIBILITY_TRUE,;t t
s,@ENABLE_VISIBILITY_FALSE@,$ENABLE_VISIBILITY_FALSE,;t t
s,@GLIBCXX_LDBL_COMPAT_TRUE@,$GLIBCXX_LDBL_COMPAT_TRUE,;t t
s,@GLIBCXX_LDBL_COMPAT_FALSE@,$GLIBCXX_LDBL_COMPAT_FALSE,;t t
s,@baseline_dir@,$baseline_dir,;t t

View File

@ -287,6 +287,7 @@ fi
# This depends on GLIBCXX CHECK_LINKER_FEATURES, but without it assumes no.
GLIBCXX_ENABLE_SYMVERS([yes])
GLIBCXX_ENABLE_VISIBILITY([yes])
ac_ldbl_compat=no
case "$target" in

View File

@ -293,6 +293,15 @@ options</a></h1>
</dd>
<dt><code>--enable-visibility </code></dt>
<dd><p> In 4.2 and later, enables or disables visibility attributes.
If enabled (as by default), and the compiler seems capable of
passing the simple sanity checks thrown at it, adjusts items
in namespace std, namespace std::tr1, and namespace __gnu_cxx
so that -fvisibility options work.
</p>
</dd>
<dt><code>--enable-libstdcxx-pch </code></dt>
<dd><p>In 3.4 and later, tries to turn on the generation of
stdc++.h.gch, a pre-compiled file including all the standard

View File

@ -983,19 +983,31 @@ else
stamp-namespace-version:
echo 0 > stamp-namespace-version
endif
if ENABLE_VISIBILITY
stamp-visibility:
echo 1 > stamp-visibility
else
stamp-visibility:
echo 0 > stamp-visibility
endif
${host_builddir}/c++config.h: ${CONFIG_HEADER} \
${glibcxx_srcdir}/include/bits/c++config \
stamp-${host_alias} \
${toplevel_srcdir}/gcc/DATESTAMP \
stamp-namespace-version
stamp-namespace-version \
stamp-visibility
@date=`cat ${toplevel_srcdir}/gcc/DATESTAMP` ;\
nsa_version=`cat stamp-namespace-version` ;\
visibility=`cat stamp-visibility` ;\
ldbl_compat='' ;\
grep "^[ ]*#[ ]*define[ ][ ]*_GLIBCXX_LONG_DOUBLE_COMPAT[ ][ ]*1[ ]*$$" \
${CONFIG_HEADER} > /dev/null 2>&1 \
&& ldbl_compat='s,^#undef _GLIBCXX_LONG_DOUBLE_COMPAT$$,#define _GLIBCXX_LONG_DOUBLE_COMPAT 1,' ;\
sed -e "s,define __GLIBCXX__,define __GLIBCXX__ $$date," \
-e "s,define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION, define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION $$nsa_version," \
-e "s,define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY, define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY $$visibility," \
-e "$$ldbl_compat" \
< ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \

View File

@ -107,6 +107,8 @@ ENABLE_SYMVERS_GNU_NAMESPACE_FALSE = @ENABLE_SYMVERS_GNU_NAMESPACE_FALSE@
ENABLE_SYMVERS_GNU_NAMESPACE_TRUE = @ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@
ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GLIBCXX_BUILD_DEBUG_FALSE = @GLIBCXX_BUILD_DEBUG_FALSE@
@ -1359,19 +1361,28 @@ stamp-host: ${host_headers} ${host_headers_noinst} stamp-${host_alias}
@ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@ echo 1 > stamp-namespace-version
@ENABLE_SYMVERS_GNU_NAMESPACE_FALSE@stamp-namespace-version:
@ENABLE_SYMVERS_GNU_NAMESPACE_FALSE@ echo 0 > stamp-namespace-version
@ENABLE_VISIBILITY_TRUE@stamp-visibility:
@ENABLE_VISIBILITY_TRUE@ echo 1 > stamp-visibility
@ENABLE_VISIBILITY_FALSE@stamp-visibility:
@ENABLE_VISIBILITY_FALSE@ echo 0 > stamp-visibility
${host_builddir}/c++config.h: ${CONFIG_HEADER} \
${glibcxx_srcdir}/include/bits/c++config \
stamp-${host_alias} \
${toplevel_srcdir}/gcc/DATESTAMP \
stamp-namespace-version
stamp-namespace-version \
stamp-visibility
@date=`cat ${toplevel_srcdir}/gcc/DATESTAMP` ;\
nsa_version=`cat stamp-namespace-version` ;\
visibility=`cat stamp-visibility` ;\
ldbl_compat='' ;\
grep "^[ ]*#[ ]*define[ ][ ]*_GLIBCXX_LONG_DOUBLE_COMPAT[ ][ ]*1[ ]*$$" \
${CONFIG_HEADER} > /dev/null 2>&1 \
&& ldbl_compat='s,^#undef _GLIBCXX_LONG_DOUBLE_COMPAT$$,#define _GLIBCXX_LONG_DOUBLE_COMPAT 1,' ;\
sed -e "s,define __GLIBCXX__,define __GLIBCXX__ $$date," \
-e "s,define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION, define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION $$nsa_version," \
-e "s,define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY, define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY $$visibility," \
-e "$$ldbl_compat" \
< ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \

View File

@ -40,6 +40,15 @@
// The current version of the C++ library in compressed ISO date format.
#define __GLIBCXX__
// Macros for visibility.
#define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
#if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
#define _GLIBCXX_VISIBILITY(V) __attribute__ ((__visibility__ (#V)))
#else
#define _GLIBCXX_VISIBILITY(V)
#endif
// Macros for controlling various namespace association schemes and modes.
#ifdef _GLIBCXX_DEBUG
# define _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG 1
@ -53,15 +62,15 @@
// _GLIBCXX_BEGIN_NESTED_NAMESPACE
// _GLIBCXX_END_NESTED_NAMESPACE
#if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) namespace X { namespace Y {
# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) namespace X { namespace Y _GLIBCXX_VISIBILITY(default) {
# define _GLIBCXX_END_NESTED_NAMESPACE } }
# define _GLIBCXX_BEGIN_NAMESPACE(X) _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, _6)
# define _GLIBCXX_END_NAMESPACE _GLIBCXX_END_NESTED_NAMESPACE
#else
# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X {
# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY(default) {
# define _GLIBCXX_END_NAMESPACE }
# if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) namespace X { namespace Y {
# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) namespace X { namespace Y _GLIBCXX_VISIBILITY(default) {
# define _GLIBCXX_END_NESTED_NAMESPACE } }
# else
# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) _GLIBCXX_BEGIN_NAMESPACE(X)

View File

@ -122,6 +122,8 @@ ENABLE_SYMVERS_GNU_NAMESPACE_FALSE = @ENABLE_SYMVERS_GNU_NAMESPACE_FALSE@
ENABLE_SYMVERS_GNU_NAMESPACE_TRUE = @ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@
ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GLIBCXX_BUILD_DEBUG_FALSE = @GLIBCXX_BUILD_DEBUG_FALSE@

View File

@ -163,6 +163,8 @@ ENABLE_SYMVERS_GNU_NAMESPACE_FALSE = @ENABLE_SYMVERS_GNU_NAMESPACE_FALSE@
ENABLE_SYMVERS_GNU_NAMESPACE_TRUE = @ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@
ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GLIBCXX_BUILD_DEBUG_FALSE = @GLIBCXX_BUILD_DEBUG_FALSE@

View File

@ -107,6 +107,8 @@ ENABLE_SYMVERS_GNU_NAMESPACE_FALSE = @ENABLE_SYMVERS_GNU_NAMESPACE_FALSE@
ENABLE_SYMVERS_GNU_NAMESPACE_TRUE = @ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@
ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GLIBCXX_BUILD_DEBUG_FALSE = @GLIBCXX_BUILD_DEBUG_FALSE@

View File

@ -157,6 +157,8 @@ ENABLE_SYMVERS_GNU_NAMESPACE_FALSE = @ENABLE_SYMVERS_GNU_NAMESPACE_FALSE@
ENABLE_SYMVERS_GNU_NAMESPACE_TRUE = @ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@
ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GLIBCXX_BUILD_DEBUG_FALSE = @GLIBCXX_BUILD_DEBUG_FALSE@

View File

@ -39,7 +39,7 @@
using namespace std;
namespace __gnu_internal
namespace __gnu_internal _GLIBCXX_VISIBILITY(hidden)
{
static __glibcxx_mutex_define_initialized(iterator_base_mutex);
} // namespace __gnu_internal

View File

@ -1,6 +1,6 @@
// Explicit instantiation file.
// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
// Copyright (C) 2001, 2002, 2004, 2006 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
@ -34,7 +34,7 @@
#include <ext/rope>
#include <ext/stdio_filebuf.h>
namespace __gnu_internal
namespace __gnu_internal _GLIBCXX_VISIBILITY(hidden)
{
const int min_len = __gnu_cxx::_Rope_constants::_S_max_rope_depth + 1;
}

View File

@ -1,4 +1,5 @@
// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
// 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
@ -75,7 +76,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_GLIBCXX_END_NAMESPACE
namespace __gnu_internal
namespace __gnu_internal _GLIBCXX_VISIBILITY(hidden)
{
using namespace std;
using namespace __gnu_cxx;

View File

@ -1,4 +1,4 @@
// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
// Copyright (C) 2001, 2002, 2003, 2004, 2006 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
@ -43,7 +43,7 @@
// In macro form:
// _GLIBCXX_ASM_SYMVER(currentname, oldname, GLIBCXX_3.2)
namespace __gnu_internal
namespace __gnu_internal _GLIBCXX_VISIBILITY(hidden)
{
using namespace std;

View File

@ -40,7 +40,7 @@
#include <ext/stdio_filebuf.h>
#include <ext/stdio_sync_filebuf.h>
namespace __gnu_internal
namespace __gnu_internal _GLIBCXX_VISIBILITY(hidden)
{
using namespace __gnu_cxx;

View File

@ -35,7 +35,7 @@
#include <bits/atomicity.h>
#include <bits/concurrence.h>
namespace __gnu_internal
namespace __gnu_internal _GLIBCXX_VISIBILITY(hidden)
{
// Mutex object for cache access
static __glibcxx_mutex_define_initialized(locale_cache_mutex);

View File

@ -1,4 +1,4 @@
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@ -35,7 +35,7 @@
#include <bits/atomicity.h>
#include <bits/concurrence.h>
namespace __gnu_internal
namespace __gnu_internal _GLIBCXX_VISIBILITY(hidden)
{
// Defined in globals.cc.
extern std::locale c_locale;

View File

@ -1,6 +1,6 @@
// Allocator details.
// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
// Copyright (C) 2004, 2005, 2006 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
@ -35,7 +35,7 @@
#include <bits/concurrence.h>
#include <ext/mt_allocator.h>
namespace __gnu_internal
namespace __gnu_internal _GLIBCXX_VISIBILITY(hidden)
{
#ifdef __GTHREADS
struct __freelist

View File

@ -1,6 +1,6 @@
// Allocator details.
// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
// Copyright (C) 2004, 2005, 2006 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
@ -35,7 +35,7 @@
#include <cstdlib>
#include <ext/pool_allocator.h>
namespace __gnu_internal
namespace __gnu_internal _GLIBCXX_VISIBILITY(hidden)
{
static __glibcxx_mutex_define_initialized(palloc_init_mutex);
}

View File

@ -111,6 +111,8 @@ ENABLE_SYMVERS_GNU_NAMESPACE_FALSE = @ENABLE_SYMVERS_GNU_NAMESPACE_FALSE@
ENABLE_SYMVERS_GNU_NAMESPACE_TRUE = @ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@
ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GLIBCXX_BUILD_DEBUG_FALSE = @GLIBCXX_BUILD_DEBUG_FALSE@