From: Rainer Orth Date: Fri, 2 Jul 2010 10:05:49 +0000 (+0000) Subject: gc++filt.m4: New file. X-Git-Tag: upstream/12.2.0~91820 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c18dc5cceab24096cbb83deacabb75b77d57a9df;p=platform%2Fupstream%2Fgcc.git gc++filt.m4: New file. config: * gc++filt.m4: New file. contrib: * make_sunver.pl: New file. libstdc++v3: * acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Handle sun style. Require GCC_PROG_GNU_CXXFILT. (_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT): Define unless targetting solaris2*. Include ../config/gc++filt.m4. * configure.host (i?86-*-solaris2*): Set abi_baseline_pair. (sparc-*-solaris2*): Likewise. * src/Makefile.am [ENABLE_SYMVERS_SUN] (version_dep, version_arg): New variables. (libstdc++-symbols.ver-sun): New target. * configure: Regenerate. * config.h.in: Regenerate. * Makefile.in: Likewise. * doc/Makefile.in: Likewise. * include/Makefile.in: Likewise. * libsupc++/Makefile.in: Likewise. * po/Makefile.in: Likewise. * python/Makefile.in: Likewise. * src/Makefile.in: Likewise. * src/atomic.cc: Only define/use _GLIBCXX_ASM_SYMVER if _GLIBCXX_HAVE_SYMVER_RENAMING_RUNTIME_SUPPORT. * src/compatibility.cc: Likewise. * testsuite/Makefile.am (baseline_subdir): Define. (baseline_symbols): Use it. (new-abi-baseline): Likewise. * testsuite/Makefile.in: Regenerate. * config/abi/pre/gnu.ver (GLIBCXX_3.4.5): Enclose duplicates in #ifdef HAVE_SYMVER_RENAMING_RUNTIME_SUPPORT. (GLIBCXX_3.4.6): Likewise. * doc/xml/manual/configure.xml (--enable-symvers): Document sun style. * doc/xml/manual/abi.xml: Fix grammar. (Symbol versioning on the libstdc++.so binary): Fix mapfile path. (Incremental bumping of a library pre-defined macro): Fix c++config path. (Incremental bumping of a library pre-defined macro, _GLIBCPP_VERSION): Likewise. (Matching each specific C++ compiler release to a specific set of C++ include files): Fix acinclude.m4 path. (Prerequisites): Allow for Sun linker on Solaris 2.5+. Use proper link to Configuring. Fix acinclude.m4 path. (Checking Active): Allow for additional symbol versioning styles. Provide Solaris 2 example with pvs -r. (Bibliography): Update Linker and Libraries Guide, C++ Migration Guide entries. gcc: * doc/install.texi (Prerequisites): Document Perl requirement on Solaris 2. (Specific, *-*-solaris2*): Document GNU c++filt requirement. From-SVN: r161696 --- diff --git a/config/ChangeLog b/config/ChangeLog index 9d18d75..41c66e9 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2010-07-02 Rainer Orth + + * gc++filt.m4: New file. + 2010-06-20 Alexandre Oliva * bootstrap-lto.mk: New. diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 414e31e..267627a 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,7 @@ +2010-07-02 Rainer Orth + + * make_sunver.pl: New file. + 2010-07-02 Iain Sandoe * compare-debug (Darwin): Remove '-x' flag from ld-based object diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1d4b467..c1e0ae7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-07-02 Rainer Orth + + * doc/install.texi (Prerequisites): Document Perl requirement on + Solaris 2. + (Specific, *-*-solaris2*): Document GNU c++filt requirement. + 2010-07-02 Richard Guenther PR middle-end/44777 diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 6492903..6b1e6a3 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -456,8 +456,13 @@ snapshots of the development sources are also available via FTP@. Necessary when regenerating @file{Makefile} dependencies in libiberty. Necessary when regenerating @file{libiberty/functions.texi}. Necessary when generating manpages from Texinfo manuals. -Necessary when targetting Darwin, building libstdc++, +Necessary when targetting Darwin, building @samp{libstdc++}, and not using @option{--disable-symvers}. +Necessary when targetting Solaris 2 with Sun @command{ld}, building +@samp{libstdc++}, and not using @option{--disable-symvers}. A helper +scripts needs @samp{Glob.pm}, which is missing from @command{perl} 5.005 +included in Solaris~8. The bundled @command{perl} in Solaris~9 and up +works. Used by various scripts to generate some files included in SVN (mainly Unicode-related and rarely changing) from source tables. @@ -4109,6 +4114,12 @@ Solaris 10 cannot be used due to several bugs. Again, the current version (2.20.1) is known to work, but generally lacks platform specific features, so better stay with Sun @command{ld}. +To enable symbol versioning in @samp{libstdc++} with Sun @command{ld}, +you need to have any version of GNU @command{c++filt}, which is part of +GNU binutils. @samp{libstdc++} symbol versioning will be disabled if no +appropriate version is found. Sun @command{c++filt} from the Sun Studio +compilers does @emph{not} work. + Sun bug 4296832 turns up when compiling X11 headers with GCC 2.95 or newer: @command{g++} will complain that types are missing. These headers assume that omitting the type means @code{int}; this assumption worked for diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index dfb651e..4192b89 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,55 @@ +2010-07-02 Rainer Orth + + * acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Handle sun style. + Require GCC_PROG_GNU_CXXFILT. + (_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT): Define + unless targetting solaris2*. + Include ../config/gc++filt.m4. + * configure.host (i?86-*-solaris2*): Set abi_baseline_pair. + (sparc-*-solaris2*): Likewise. + * src/Makefile.am [ENABLE_SYMVERS_SUN] (version_dep, version_arg): + New variables. + (libstdc++-symbols.ver-sun): New target. + * configure: Regenerate. + * config.h.in: Regenerate. + * Makefile.in: Likewise. + * doc/Makefile.in: Likewise. + * include/Makefile.in: Likewise. + * libsupc++/Makefile.in: Likewise. + * po/Makefile.in: Likewise. + * python/Makefile.in: Likewise. + * src/Makefile.in: Likewise. + * src/atomic.cc: Only define/use _GLIBCXX_ASM_SYMVER if + _GLIBCXX_HAVE_SYMVER_RENAMING_RUNTIME_SUPPORT. + * src/compatibility.cc: Likewise. + * testsuite/Makefile.am (baseline_subdir): Define. + (baseline_symbols): Use it. + (new-abi-baseline): Likewise. + * testsuite/Makefile.in: Regenerate. + + * config/abi/pre/gnu.ver (GLIBCXX_3.4.5): Enclose duplicates in + #ifdef HAVE_SYMVER_RENAMING_RUNTIME_SUPPORT. + (GLIBCXX_3.4.6): Likewise. + + * doc/xml/manual/configure.xml (--enable-symvers): Document sun + style. + + * doc/xml/manual/abi.xml: Fix grammar. + (Symbol versioning on the libstdc++.so binary): Fix mapfile path. + (Incremental bumping of a library pre-defined macro): Fix + c++config path. + (Incremental bumping of a library pre-defined macro, + _GLIBCPP_VERSION): Likewise. + (Matching each specific C++ compiler release to a specific set of + C++ include files): Fix acinclude.m4 path. + (Prerequisites): Allow for Sun linker on Solaris 2.5+. + Use proper link to Configuring. + Fix acinclude.m4 path. + (Checking Active): Allow for additional symbol versioning styles. + Provide Solaris 2 example with pvs -r. + (Bibliography): Update Linker and Libraries Guide, C++ Migration + Guide entries. + 2010-06-29 Jason Merrill Enable implicitly declared move constructor/operator= (N3053). diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in index fd89c02..f62595f 100644 --- a/libstdc++-v3/Makefile.in +++ b/libstdc++-v3/Makefile.in @@ -57,6 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \ $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/../config/gc++filt.m4 \ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -124,6 +125,7 @@ CTIME_CC = @CTIME_CC@ CTIME_H = @CTIME_H@ CXX = @CXX@ CXXCPP = @CXXCPP@ +CXXFILT = @CXXFILT@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ C_INCLUDE_DIR = @C_INCLUDE_DIR@ diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index db6323d..305710b 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -2812,11 +2812,14 @@ AC_DEFUN([GLIBCXX_ENABLE_SYMVERS], [ GLIBCXX_ENABLE(symvers,$1,[=STYLE], [enables symbol versioning of the shared library], - [permit yes|no|gnu|gnu-versioned-namespace|darwin|darwin-export]) + [permit yes|no|gnu|gnu-versioned-namespace|darwin|darwin-export|sun]) # If we never went through the GLIBCXX_CHECK_LINKER_FEATURES macro, then we # don't know enough about $LD to do tricks... AC_REQUIRE([GLIBCXX_CHECK_LINKER_FEATURES]) +# Sun style symbol versions needs GNU c++filt for make_sunver.pl to work +# with extern "C++" in version scripts. +AC_REQUIRE([GCC_PROG_GNU_CXXFILT]) # Turn a 'yes' into a suitable default. if test x$enable_symvers = xyes ; then @@ -2834,6 +2837,20 @@ if test x$enable_symvers = xyes ; then case ${target_os} in darwin*) enable_symvers=darwin ;; + # Sun symbol versioning exists since Solaris 2.5. + solaris2.[[5-9]]* | solaris2.1[[0-9]]*) + # make_sunver.pl needs GNU c++filt to support extern "C++" in + # version scripts, so disable symbol versioning if none can be + # found. + if test -z "$ac_cv_path_CXXFILT"; then + AC_MSG_WARN([=== You have requested Sun symbol versioning, but]) + AC_MSG_WARN([=== no GNU c++filt could be found.]) + AC_MSG_WARN([=== Symbol versioning will be disabled.]) + enable_symvers=no + else + enable_symvers=sun + fi + ;; *) enable_symvers=no ;; esac @@ -2846,8 +2863,26 @@ if test x$enable_symvers = xdarwin-export ; then enable_symvers=darwin fi +# Check if 'sun' was requested on non-Solaris 2 platforms. +if test x$enable_symvers = xsun ; then + case ${target_os} in + solaris2*) + # All fine. + ;; + *) + # Unlikely to work. + AC_MSG_WARN([=== You have requested Sun symbol versioning, but]) + AC_MSG_WARN([=== you are not targetting Solaris 2.]) + AC_MSG_WARN([=== Symbol versioning will be disabled.]) + enable_symvers=no + ;; + esac +fi + # Check to see if 'gnu' can win. -if test $enable_symvers = gnu || test $enable_symvers = gnu-versioned-namespace; then +if test $enable_symvers = gnu || + test $enable_symvers = gnu-versioned-namespace || + test $enable_symvers = sun; then # Check to see if libgcc_s exists, indicating that shared libgcc is possible. AC_MSG_CHECKING([for shared libgcc]) ac_save_CFLAGS="$CFLAGS" @@ -2883,6 +2918,8 @@ changequote([,])dnl AC_MSG_WARN([=== you are not building a shared libgcc_s.]) AC_MSG_WARN([=== Symbol versioning will be disabled.]) enable_symvers=no + elif test $with_gnu_ld != yes && test $enable_symvers = sun; then + : All interesting versions of Sun ld support sun style symbol versioning. elif test $with_gnu_ld != yes ; then # just fail for now AC_MSG_WARN([=== You have requested GNU symbol versioning, but]) @@ -2922,6 +2959,11 @@ case $enable_symvers in AC_DEFINE(_GLIBCXX_SYMVER_DARWIN, 1, [Define to use darwin versioning in the shared library.]) ;; + sun) + SYMVER_FILE=config/abi/pre/gnu.ver + AC_DEFINE(_GLIBCXX_SYMVER_SUN, 1, + [Define to use Sun versioning in the shared library.]) + ;; esac if test x$enable_symvers != xno ; then @@ -2945,8 +2987,24 @@ GLIBCXX_CONDITIONAL(ENABLE_SYMVERS, test $enable_symvers != no) GLIBCXX_CONDITIONAL(ENABLE_SYMVERS_GNU, test $enable_symvers = gnu) GLIBCXX_CONDITIONAL(ENABLE_SYMVERS_GNU_NAMESPACE, test $enable_symvers = gnu-versioned-namespace) GLIBCXX_CONDITIONAL(ENABLE_SYMVERS_DARWIN, test $enable_symvers = darwin) +GLIBCXX_CONDITIONAL(ENABLE_SYMVERS_SUN, test $enable_symvers = sun) AC_MSG_NOTICE(versioning on shared library symbols is $enable_symvers) +if test $enable_symvers != no ; then + case ${target_os} in + # The Solaris 2 runtime linker doesn't support the GNU extension of + # binding the same symbol to different versions + solaris2*) + symvers_renaming=no ;; + # Other platforms with GNU symbol versioning (GNU/Linux, more?) do. + *) + AC_DEFINE(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT, 1, + [Define to 1 if the target runtime linker supports binding the same symbol to different versions.]) + symvers_renaming=yes + esac +fi +GLIBCXX_CONDITIONAL(ENABLE_SYMVERS_SOL2, test $symvers_renaming = no) + # Now, set up compatibility support, if any. # In addition, need this to deal with std::size_t mangling in # src/compatibility.cc. In a perfect world, could use @@ -3083,5 +3141,6 @@ AC_DEFUN([AC_LC_MESSAGES], [ ]) # Macros from the top-level gcc directory. +m4_include([../config/gc++filt.m4]) m4_include([../config/tls.m4]) diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in index 55fa49e..af8459d 100644 --- a/libstdc++-v3/config.h.in +++ b/libstdc++-v3/config.h.in @@ -691,6 +691,10 @@ /* Define if gthreads library is available. */ #undef _GLIBCXX_HAS_GTHREADS +/* Define to 1 if the target runtime linker supports binding the same symbol + to different versions. */ +#undef _GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT + /* Define to 1 if a full hosted library is built, or 0 if freestanding. */ #undef _GLIBCXX_HOSTED @@ -724,6 +728,9 @@ /* Define to use GNU namespace versioning in the shared library. */ #undef _GLIBCXX_SYMVER_GNU_NAMESPACE +/* Define to use Sun versioning in the shared library. */ +#undef _GLIBCXX_SYMVER_SUN + /* Define if C99 functions or macros from , , , , and can be used or exposed. */ #undef _GLIBCXX_USE_C99 diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver index 6375b88..3a2856b 100644 --- a/libstdc++-v3/config/abi/pre/gnu.ver +++ b/libstdc++-v3/config/abi/pre/gnu.ver @@ -740,6 +740,7 @@ GLIBCXX_3.4 { sqrtl; copysignf; +#ifdef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT # GLIBCXX_ABI compatibility only. # std::string _ZNKSs11_M_disjunctEPKc; @@ -767,6 +768,7 @@ GLIBCXX_3.4 { _ZNSt11char_traitsI[cw]E2eqERK[cw]S2_; _ZNSt19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEppEv; +#endif # std::locale::Impl _M_ members _ZNSt6locale5_Impl16_M_install_facetEPKNS_2idEPKNS_5facetE; @@ -875,7 +877,9 @@ GLIBCXX_3.4.6 { _ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE9showmanycEv; +#ifdef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT _ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv; +#endif _ZN9__gnu_cxx6__poolILb1EE13_M_initializeEv; diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 0650404..cc46de0 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -623,6 +623,10 @@ GLIBCXX_LDBL_COMPAT_FALSE GLIBCXX_LDBL_COMPAT_TRUE ENABLE_VISIBILITY_FALSE ENABLE_VISIBILITY_TRUE +ENABLE_SYMVERS_SOL2_FALSE +ENABLE_SYMVERS_SOL2_TRUE +ENABLE_SYMVERS_SUN_FALSE +ENABLE_SYMVERS_SUN_TRUE ENABLE_SYMVERS_DARWIN_FALSE ENABLE_SYMVERS_DARWIN_TRUE ENABLE_SYMVERS_GNU_NAMESPACE_FALSE @@ -633,6 +637,7 @@ ENABLE_SYMVERS_FALSE ENABLE_SYMVERS_TRUE port_specific_symbol_files SYMVER_FILE +CXXFILT LTLIBICONV LIBICONV OPT_LDFLAGS @@ -852,7 +857,8 @@ CXX CXXFLAGS CCC CPP -CXXCPP' +CXXCPP +CXXFILT' # Initialize some variables set by options. @@ -1553,6 +1559,8 @@ Some influential environment variables: CXXFLAGS C++ compiler flags CPP C preprocessor CXXCPP C++ preprocessor + CXXFILT Location of GNU c++filt. Defaults to the first GNU version of + `c++filt', `gc++filt' on PATH. Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -11460,7 +11468,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11463 "configure" +#line 11471 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11566,7 +11574,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11569 "configure" +#line 11577 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14906,7 +14914,7 @@ fi # # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style. cat > conftest.$ac_ext << EOF -#line 14909 "configure" +#line 14917 "configure" struct S { ~S(); }; void bar(); void foo() @@ -15274,7 +15282,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; } # Fake what AC_TRY_COMPILE does. cat > conftest.$ac_ext << EOF -#line 15277 "configure" +#line 15285 "configure" int main() { typedef bool atomic_type; @@ -15311,7 +15319,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15314 "configure" +#line 15322 "configure" int main() { typedef short atomic_type; @@ -15348,7 +15356,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15351 "configure" +#line 15359 "configure" int main() { // NB: _Atomic_word not necessarily int. @@ -15386,7 +15394,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15389 "configure" +#line 15397 "configure" int main() { typedef long long atomic_type; @@ -15462,7 +15470,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 15465 "configure" +#line 15473 "configure" int main() { _Decimal32 d1; @@ -25538,7 +25546,7 @@ rm -f core conftest.err conftest.$ac_objext \ CFLAGS="$chktls_save_CFLAGS" if test "X$thread_CFLAGS" != Xfailed; then CFLAGS="$thread_CFLAGS $chktls_save_CFLAGS" - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run test program while cross compiling @@ -44476,7 +44484,7 @@ rm -f core conftest.err conftest.$ac_objext \ CFLAGS="$chktls_save_CFLAGS" if test "X$thread_CFLAGS" != Xfailed; then CFLAGS="$thread_CFLAGS $chktls_save_CFLAGS" - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run test program while cross compiling @@ -50561,7 +50569,7 @@ rm -f core conftest.err conftest.$ac_objext \ CFLAGS="$chktls_save_CFLAGS" if test "X$thread_CFLAGS" != Xfailed; then CFLAGS="$thread_CFLAGS $chktls_save_CFLAGS" - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run test program while cross compiling @@ -58082,12 +58090,53 @@ ac_config_commands="$ac_config_commands include/gstdint.h" # This depends on GLIBCXX CHECK_LINKER_FEATURES, but without it assumes no. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU c++filt" >&5 +$as_echo_n "checking for GNU c++filt... " >&6; } +if test "${ac_cv_path_CXXFILT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$CXXFILT"; then + ac_path_CXXFILT_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in c++filt gc++filt; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_CXXFILT="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_CXXFILT" && $as_test_x "$ac_path_CXXFILT"; } || continue +# Check for GNU $ac_path_CXXFILT +case `"$ac_path_CXXFILT" --version 2>&1` in +*GNU*) + ac_cv_path_CXXFILT=$ac_path_CXXFILT && ac_path_CXXFILT_found=:;; +esac + + $ac_path_CXXFILT_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_CXXFILT"; then + : + fi +else + ac_cv_path_CXXFILT=$CXXFILT +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_CXXFILT" >&5 +$as_echo "$ac_cv_path_CXXFILT" >&6; } + CXXFILT=$ac_cv_path_CXXFILT + + # Check whether --enable-symvers was given. if test "${enable_symvers+set}" = set; then : enableval=$enable_symvers; case "$enableval" in - yes|no|gnu|gnu-versioned-namespace|darwin|darwin-export) ;; + yes|no|gnu|gnu-versioned-namespace|darwin|darwin-export|sun) ;; *) as_fn_error "Unknown argument to enable/disable symvers" "$LINENO" 5 ;; esac @@ -58100,6 +58149,9 @@ fi # If we never went through the GLIBCXX_CHECK_LINKER_FEATURES macro, then we # don't know enough about $LD to do tricks... +# Sun style symbol versions needs GNU c++filt for make_sunver.pl to work +# with extern "C++" in version scripts. + # Turn a 'yes' into a suitable default. if test x$enable_symvers = xyes ; then @@ -58117,6 +58169,23 @@ if test x$enable_symvers = xyes ; then case ${target_os} in darwin*) enable_symvers=darwin ;; + # Sun symbol versioning exists since Solaris 2.5. + solaris2.[5-9]* | solaris2.1[0-9]*) + # make_sunver.pl needs GNU c++filt to support extern "C++" in + # version scripts, so disable symbol versioning if none can be + # found. + if test -z "$ac_cv_path_CXXFILT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: === You have requested Sun symbol versioning, but" >&5 +$as_echo "$as_me: WARNING: === You have requested Sun symbol versioning, but" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: === no GNU c++filt could be found." >&5 +$as_echo "$as_me: WARNING: === no GNU c++filt could be found." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: === Symbol versioning will be disabled." >&5 +$as_echo "$as_me: WARNING: === Symbol versioning will be disabled." >&2;} + enable_symvers=no + else + enable_symvers=sun + fi + ;; *) enable_symvers=no ;; esac @@ -58129,8 +58198,29 @@ if test x$enable_symvers = xdarwin-export ; then enable_symvers=darwin fi +# Check if 'sun' was requested on non-Solaris 2 platforms. +if test x$enable_symvers = xsun ; then + case ${target_os} in + solaris2*) + # All fine. + ;; + *) + # Unlikely to work. + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: === You have requested Sun symbol versioning, but" >&5 +$as_echo "$as_me: WARNING: === You have requested Sun symbol versioning, but" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: === you are not targetting Solaris 2." >&5 +$as_echo "$as_me: WARNING: === you are not targetting Solaris 2." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: === Symbol versioning will be disabled." >&5 +$as_echo "$as_me: WARNING: === Symbol versioning will be disabled." >&2;} + enable_symvers=no + ;; + esac +fi + # Check to see if 'gnu' can win. -if test $enable_symvers = gnu || test $enable_symvers = gnu-versioned-namespace; then +if test $enable_symvers = gnu || + test $enable_symvers = gnu-versioned-namespace || + test $enable_symvers = sun; then # Check to see if libgcc_s exists, indicating that shared libgcc is possible. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared libgcc" >&5 $as_echo_n "checking for shared libgcc... " >&6; } @@ -58207,6 +58297,8 @@ $as_echo "$as_me: WARNING: === you are not building a shared libgcc_s." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: === Symbol versioning will be disabled." >&5 $as_echo "$as_me: WARNING: === Symbol versioning will be disabled." >&2;} enable_symvers=no + elif test $with_gnu_ld != yes && test $enable_symvers = sun; then + : All interesting versions of Sun ld support sun style symbol versioning. elif test $with_gnu_ld != yes ; then # just fail for now { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: === You have requested GNU symbol versioning, but" >&5 @@ -58257,6 +58349,12 @@ $as_echo "#define _GLIBCXX_SYMVER_GNU_NAMESPACE 1" >>confdefs.h $as_echo "#define _GLIBCXX_SYMVER_DARWIN 1" >>confdefs.h ;; + sun) + SYMVER_FILE=config/abi/pre/gnu.ver + +$as_echo "#define _GLIBCXX_SYMVER_SUN 1" >>confdefs.h + + ;; esac if test x$enable_symvers != xno ; then @@ -58303,9 +58401,26 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: versioning on shared library symbols is $enable_symvers" >&5 $as_echo "$as_me: versioning on shared library symbols is $enable_symvers" >&6;} +if test $enable_symvers != no ; then + case ${target_os} in + # The Solaris 2 runtime linker doesn't support the GNU extension of + # binding the same symbol to different versions + solaris2*) + symvers_renaming=no ;; + # Other platforms with GNU symbol versioning (GNU/Linux, more?) do. + *) + +$as_echo "#define _GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT 1" >>confdefs.h + + symvers_renaming=yes + esac +fi + + # Now, set up compatibility support, if any. # In addition, need this to deal with std::size_t mangling in # src/compatibility.cc. In a perfect world, could use @@ -58911,6 +59026,24 @@ else fi + if test $enable_symvers = sun; then + ENABLE_SYMVERS_SUN_TRUE= + ENABLE_SYMVERS_SUN_FALSE='#' +else + ENABLE_SYMVERS_SUN_TRUE='#' + ENABLE_SYMVERS_SUN_FALSE= +fi + + + if test $symvers_renaming = no; then + ENABLE_SYMVERS_SOL2_TRUE= + ENABLE_SYMVERS_SOL2_FALSE='#' +else + ENABLE_SYMVERS_SOL2_TRUE='#' + ENABLE_SYMVERS_SOL2_FALSE= +fi + + if test $enable_visibility = yes; then ENABLE_VISIBILITY_TRUE= ENABLE_VISIBILITY_FALSE='#' @@ -59324,6 +59457,14 @@ if test -z "${ENABLE_SYMVERS_DARWIN_TRUE}" && test -z "${ENABLE_SYMVERS_DARWIN_F as_fn_error "conditional \"ENABLE_SYMVERS_DARWIN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_SYMVERS_SUN_TRUE}" && test -z "${ENABLE_SYMVERS_SUN_FALSE}"; then + as_fn_error "conditional \"ENABLE_SYMVERS_SUN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_SYMVERS_SOL2_TRUE}" && test -z "${ENABLE_SYMVERS_SOL2_FALSE}"; then + as_fn_error "conditional \"ENABLE_SYMVERS_SOL2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_VISIBILITY_TRUE}" && test -z "${ENABLE_VISIBILITY_FALSE}"; then as_fn_error "conditional \"ENABLE_VISIBILITY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host index 444f672..06874d5 100644 --- a/libstdc++-v3/configure.host +++ b/libstdc++-v3/configure.host @@ -320,7 +320,13 @@ case "${host}" in ;; esac ;; + i?86-*-solaris2*) + abi_baseline_pair=i386-solaris2 + ;; powerpc*-*-darwin*) port_specific_symbol_files="\$(srcdir)/../config/os/bsd/darwin/ppc-extra.ver" ;; + sparc*-*-solaris2*) + abi_baseline_pair=sparc-solaris2 + ;; esac diff --git a/libstdc++-v3/doc/Makefile.in b/libstdc++-v3/doc/Makefile.in index 482bbb1..555b8f0 100644 --- a/libstdc++-v3/doc/Makefile.in +++ b/libstdc++-v3/doc/Makefile.in @@ -54,6 +54,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \ $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/../config/gc++filt.m4 \ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -99,6 +100,7 @@ CTIME_CC = @CTIME_CC@ CTIME_H = @CTIME_H@ CXX = @CXX@ CXXCPP = @CXXCPP@ +CXXFILT = @CXXFILT@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ C_INCLUDE_DIR = @C_INCLUDE_DIR@ diff --git a/libstdc++-v3/doc/xml/manual/abi.xml b/libstdc++-v3/doc/xml/manual/abi.xml index 8777bc72..400d2a4 100644 --- a/libstdc++-v3/doc/xml/manual/abi.xml +++ b/libstdc++-v3/doc/xml/manual/abi.xml @@ -33,9 +33,9 @@ The C++ Interface - C++ applications often dependent on specific language support + C++ applications often depend on specific language support routines, say for throwing exceptions, or catching exceptions, and - perhaps also dependent on features in the C++ Standard Library. + perhaps also depend on features in the C++ Standard Library. @@ -122,7 +122,7 @@ as to give distinct versions to the C++ interface. releases of library binaries the ability to add new symbols and add functionality, all the while retaining compatibility with the previous releases in the series. Thus, program binaries linked with the initial -release of a library binary will still link correctly if the library +release of a library binary will still run correctly if the library binary is replaced by carefully-managed subsequent library binaries. This is called forward compatibility. @@ -232,7 +232,7 @@ compatible. Release versioning on the libstdc++.so binary, implemented in - the same was as the libgcc_s.so binary above. Listed is the + the same way as the libgcc_s.so binary above. Listed is the filename: DT_SONAME can be deduced from the filename by removing the last two period-delimited numbers. For example, filename libstdc++.so.5.0.4 @@ -306,10 +306,10 @@ compatible. Symbol versioning on the libstdc++.so binary. - mapfile: libstdc++/config/linker-map.gnu + mapfile: libstdc++-v3/config/abi/pre/gnu.ver It is versioned with the following labels and version definitions, where the version definition is the maximum for a - particular release. Note, only symbol which are newly introduced + particular release. Note, only symbols which are newly introduced will use the maximum version definition. Thus, for release series with the same label, but incremented version definitions, the later release has both versions. (An example of this would be the @@ -410,7 +410,7 @@ compatible. This macro is defined in the file "c++config" in the - "libstdc++/include/bits" directory. (Up to gcc-4.1.0, it was + "libstdc++-v3/include/bits" directory. (Up to gcc-4.1.0, it was changed every night by an automated script. Since gcc-4.1.0, it is the same value as gcc/DATESTAMP.) @@ -474,7 +474,7 @@ compatible. This macro is defined in the file "c++config" in the - "libstdc++/include/bits" directory and is generated + "libstdc++-v3/include/bits" directory and is generated automatically by autoconf as part of the configure-time generation of config.h. @@ -514,7 +514,7 @@ compatible. All C++ includes are installed in include/c++, then nest in a directory hierarchy corresponding to the C++ compiler's released version. This version corresponds to the variable "gcc_version" in - "libstdc++/acinclude.m4," and more details can be found in that + "libstdc++-v3/acinclude.m4," and more details can be found in that file's macro GLIBCXX_CONFIGURE (GLIBCPP_CONFIGURE before gcc-3.4.0). @@ -584,7 +584,8 @@ compatible. Minimum environment that supports a versioned ABI: A supported dynamic linker, a GNU linker of sufficient vintage to understand - demangled C++ name globbing (ld), a shared executable compiled + demangled C++ name globbing (ld) or the Sun linker, a shared + executable compiled with g++, and shared libraries (libgcc_s, libstdc++) compiled by a compiler (g++) with a compatible ABI. Phew. @@ -598,7 +599,7 @@ compatible. Most modern Linux and BSD versions, particularly ones using gcc-3.1.x tools and more recent vintages, will meet the - requirements above. + requirements above, as does Solaris 2.5 and up. @@ -614,7 +615,7 @@ compatible. For more information on configure options, including ABI impacts, see: - http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html + here @@ -623,7 +624,7 @@ compatible. - In particular, libstdc++/acinclude.m4 has a macro called + In particular, libstdc++-v3/acinclude.m4 has a macro called GLIBCXX_ENABLE_SYMVERS that defaults to yes (or the argument passed in via --enable-symvers=foo). At that point, the macro attempts to make sure that all the requirement for symbol @@ -648,6 +649,7 @@ compatible. + or another of the supported styles. If you don't see this line in the configure output, or if this line appears but the last word is 'no', then you are out of luck. @@ -685,6 +687,23 @@ of the name, then the executable is versioned. Here's an example: U _ZNSt8ios_base4InitC1Ev@@GLIBCXX_3.4 + +On Solaris 2, you can use pvs -r instead: + + + +%g++ hello.cc -o hello.out + +%pvs -r hello.out + libstdc++.so.6 (GLIBCXX_3.4, GLIBCXX_3.4.12); + libgcc_s.so.1 (GCC_3.0); + libc.so.1 (SUNWprivate_1.1, SYSVABI_1.3); + + + +ldd -v works too, but is very verbose. + + @@ -735,7 +754,7 @@ number to increase, say from "libstdc++.so.3.0.4" to Adding an explicit copy constructor or destructor to a class that would otherwise have implicit versions. This will change the way the compiler deals with this class in by-value return -statements or parameters: instead of being passing instances of this +statements or parameters: instead of passing instances of this class in registers, the compiler will be forced to use memory. See this part of the C++ ABI documentation for further details. @@ -920,7 +939,7 @@ Use the 'make check-abi' rule in the libstdc++ Makefile. -This is a proactive check the library ABI. Currently, exported symbol +This is a proactive check of the library ABI. Currently, exported symbol names that are either weak or defined are checked against a last known good baseline. Currently, this baseline is keyed off of 3.4.0 binaries, as this was the last time the .so number was incremented. In @@ -955,7 +974,7 @@ Another approach might be to use the -fdump-class-hierarchy flag to get information. However, currently this approach gives insufficient data for use in library testing, as class data members, their offsets, and other detailed data is not displayed with this flag. -(See g++/7470 on how this was used to find bugs.) +(See PR g++/7470 on how this was used to find bugs.) @@ -968,7 +987,7 @@ us. We'd like to know about them! Multiple ABI Testing A "C" application, dynamically linked to two shared libraries, liba, -libb. The dependent library liba is C++ shared library compiled with +libb. The dependent library liba is a C++ shared library compiled with gcc-3.3.x, and uses io, exceptions, locale, etc. The dependent library libb is a C++ shared library compiled with gcc-3.4.x, and also uses io, exceptions, locale, etc. @@ -1114,9 +1133,9 @@ gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so. - + - Sun Solaris 2.9 : Linker and Libraries Guide (document 816-1386) + Linker and Libraries Guide (document 819-0690) @@ -1125,9 +1144,9 @@ gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so. - + - Sun Solaris 2.9 : C++ Migration Guide (document 816-2459) + Sun Studio 11: C++ Migration Guide (document 819-3689) diff --git a/libstdc++-v3/doc/xml/manual/configure.xml b/libstdc++-v3/doc/xml/manual/configure.xml index 26af745..6e81b06 100644 --- a/libstdc++-v3/doc/xml/manual/configure.xml +++ b/libstdc++-v3/doc/xml/manual/configure.xml @@ -279,8 +279,8 @@ In 3.1 and later, tries to turn on symbol versioning in the shared library (if a shared library has been requested). Values for 'style' that are currently supported - are 'gnu', 'gnu-versioned-namespace', 'darwin', and - 'darwin-export'. Both gnu- options require that a recent + are 'gnu', 'gnu-versioned-namespace', 'darwin', + 'darwin-export', and 'sun'. Both gnu- options require that a recent version of the GNU linker be in use. Both darwin options are equivalent. With no style given, the configure script will try to guess correct defaults for the host system, probe to see if diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index 631561c..430f85a 100644 --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in @@ -56,6 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \ $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/../config/gc++filt.m4 \ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -101,6 +102,7 @@ CTIME_CC = @CTIME_CC@ CTIME_H = @CTIME_H@ CXX = @CXX@ CXXCPP = @CXXCPP@ +CXXFILT = @CXXFILT@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ C_INCLUDE_DIR = @C_INCLUDE_DIR@ diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in index 171a35a..7c00b67 100644 --- a/libstdc++-v3/libsupc++/Makefile.in +++ b/libstdc++-v3/libsupc++/Makefile.in @@ -56,6 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \ $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/../config/gc++filt.m4 \ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -158,6 +159,7 @@ CTIME_CC = @CTIME_CC@ CTIME_H = @CTIME_H@ CXX = @CXX@ CXXCPP = @CXXCPP@ +CXXFILT = @CXXFILT@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ C_INCLUDE_DIR = @C_INCLUDE_DIR@ diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in index ffffed2..d705894 100644 --- a/libstdc++-v3/po/Makefile.in +++ b/libstdc++-v3/po/Makefile.in @@ -54,6 +54,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \ $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/../config/gc++filt.m4 \ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -99,6 +100,7 @@ CTIME_CC = @CTIME_CC@ CTIME_H = @CTIME_H@ CXX = @CXX@ CXXCPP = @CXXCPP@ +CXXFILT = @CXXFILT@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ C_INCLUDE_DIR = @C_INCLUDE_DIR@ diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index 1cf9030..5499bd2 100644 --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -45,14 +45,38 @@ libstdc++-symbols.ver: ${glibcxx_srcdir}/$(SYMVER_FILE) \ fi; \ fi +CLEANFILES = libstdc++-symbols.ver + if ENABLE_SYMVERS_GNU +if ENABLE_SYMVERS_SOL2 +version_arg = -Wl,--version-script,libstdc++-symbols.ver-sol2 +version_dep = libstdc++-symbols.ver-sol2 +libstdc++-symbols.ver-sol2 : libstdc++-symbols.ver + sed -e '/^#ifdef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT/,/^#endif/d' $< \ + > $@ || (rm -f $@ ; exit 1) +else version_arg = -Wl,--version-script=libstdc++-symbols.ver version_dep = libstdc++-symbols.ver endif +endif if ENABLE_SYMVERS_GNU_NAMESPACE version_arg = -Wl,--version-script=libstdc++-symbols.ver version_dep = libstdc++-symbols.ver endif +if ENABLE_SYMVERS_SUN +version_arg = -Wl,-M,libstdc++-symbols.ver-sun +version_dep = libstdc++-symbols.ver-sun +libstdc++-symbols.ver-sun : libstdc++-symbols.ver \ + $(toplevel_srcdir)/contrib/make_sunver.pl \ + $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) + CXXFILT="$(CXXFILT)"; export CXXFILT; \ + perl $(toplevel_srcdir)/contrib/make_sunver.pl \ + libstdc++-symbols.ver \ + $(libstdc___la_OBJECTS:%.lo=.libs/%.o) \ + `echo $(libstdc___la_LIBADD) | \ + sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \ + > $@ || (rm -f $@ ; exit 1) +endif if ENABLE_SYMVERS_DARWIN version_arg = -Wl,-exported_symbols_list,libstdc++-symbols.explist version_dep = libstdc++-symbols.explist @@ -66,6 +90,8 @@ libstdc++-symbols.explist : libstdc++-symbols.ver \ sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \ > $@ || (rm -f $@ ; exit 1) endif + +CLEANFILES += $(version_dep) else version_arg = version_dep = diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index f46d7a6..75a97bd 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -55,6 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \ $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/../config/gc++filt.m4 \ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -157,6 +158,7 @@ CTIME_CC = @CTIME_CC@ CTIME_H = @CTIME_H@ CXX = @CXX@ CXXCPP = @CXXCPP@ +CXXFILT = @CXXFILT@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ C_INCLUDE_DIR = @C_INCLUDE_DIR@ @@ -321,14 +323,19 @@ AM_CPPFLAGS = $(GLIBCXX_INCLUDES) # Cross compiler support. toolexeclib_LTLIBRARIES = libstdc++.la +@ENABLE_SYMVERS_TRUE@CLEANFILES = libstdc++-symbols.ver $(version_dep) @ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@version_arg = -Wl,-exported_symbols_list,libstdc++-symbols.explist @ENABLE_SYMVERS_FALSE@version_arg = @ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@@ENABLE_SYMVERS_TRUE@version_arg = -Wl,--version-script=libstdc++-symbols.ver -@ENABLE_SYMVERS_GNU_TRUE@@ENABLE_SYMVERS_TRUE@version_arg = -Wl,--version-script=libstdc++-symbols.ver +@ENABLE_SYMVERS_GNU_TRUE@@ENABLE_SYMVERS_SOL2_FALSE@@ENABLE_SYMVERS_TRUE@version_arg = -Wl,--version-script=libstdc++-symbols.ver +@ENABLE_SYMVERS_GNU_TRUE@@ENABLE_SYMVERS_SOL2_TRUE@@ENABLE_SYMVERS_TRUE@version_arg = -Wl,--version-script,libstdc++-symbols.ver-sol2 +@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@version_arg = -Wl,-M,libstdc++-symbols.ver-sun @ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.explist @ENABLE_SYMVERS_FALSE@version_dep = @ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.ver -@ENABLE_SYMVERS_GNU_TRUE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.ver +@ENABLE_SYMVERS_GNU_TRUE@@ENABLE_SYMVERS_SOL2_FALSE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.ver +@ENABLE_SYMVERS_GNU_TRUE@@ENABLE_SYMVERS_SOL2_TRUE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.ver-sol2 +@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.ver-sun # Source files linked in via configuration/make substitution for a # particular host. @@ -649,6 +656,7 @@ install-strip: mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -760,6 +768,19 @@ uninstall-am: uninstall-toolexeclibLTLIBRARIES @ENABLE_SYMVERS_TRUE@ rm tmp.top tmp.bottom; \ @ENABLE_SYMVERS_TRUE@ fi; \ @ENABLE_SYMVERS_TRUE@ fi +@ENABLE_SYMVERS_GNU_TRUE@@ENABLE_SYMVERS_SOL2_TRUE@@ENABLE_SYMVERS_TRUE@libstdc++-symbols.ver-sol2 : libstdc++-symbols.ver +@ENABLE_SYMVERS_GNU_TRUE@@ENABLE_SYMVERS_SOL2_TRUE@@ENABLE_SYMVERS_TRUE@ sed -e '/^#ifdef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT/,/^#endif/d' $< \ +@ENABLE_SYMVERS_GNU_TRUE@@ENABLE_SYMVERS_SOL2_TRUE@@ENABLE_SYMVERS_TRUE@ > $@ || (rm -f $@ ; exit 1) +@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@libstdc++-symbols.ver-sun : libstdc++-symbols.ver \ +@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ $(toplevel_srcdir)/contrib/make_sunver.pl \ +@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) +@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ CXXFILT="$(CXXFILT)"; export CXXFILT; \ +@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ perl $(toplevel_srcdir)/contrib/make_sunver.pl \ +@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ libstdc++-symbols.ver \ +@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ $(libstdc___la_OBJECTS:%.lo=.libs/%.o) \ +@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ `echo $(libstdc___la_LIBADD) | \ +@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \ +@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ > $@ || (rm -f $@ ; exit 1) @ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@libstdc++-symbols.explist : libstdc++-symbols.ver \ @ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@ ${glibcxx_srcdir}/scripts/make_exports.pl \ @ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@ $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) diff --git a/libstdc++-v3/src/atomic.cc b/libstdc++-v3/src/atomic.cc index 7ec08c5..906b088 100644 --- a/libstdc++-v3/src/atomic.cc +++ b/libstdc++-v3/src/atomic.cc @@ -1,6 +1,6 @@ // Support for atomic operations -*- C++ -*- -// Copyright (C) 2008, 2009 +// Copyright (C) 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -127,7 +127,8 @@ namespace std // _GLIBCXX_*_SYMVER macros in this file. #if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \ - && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) + && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \ + && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) #define _GLIBCXX_ASM_SYMVER(cur, old, version) \ asm (".symver " #cur "," #old "@@" #version); diff --git a/libstdc++-v3/src/compatibility.cc b/libstdc++-v3/src/compatibility.cc index ccbeaa1..7dcd95c 100644 --- a/libstdc++-v3/src/compatibility.cc +++ b/libstdc++-v3/src/compatibility.cc @@ -26,7 +26,8 @@ #include #if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \ - && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) + && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE)\ + && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) #define istreambuf_iterator istreambuf_iteratorXX #define basic_fstream basic_fstreamXX #define basic_ifstream basic_ifstreamXX @@ -201,7 +202,8 @@ _GLIBCXX_END_NAMESPACE // NB: These symbols renames should go into the shared library only, // and only those shared libraries that support versioning. #if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \ - && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) + && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \ + && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) /* gcc-3.4.4 _ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv diff --git a/libstdc++-v3/testsuite/Makefile.am b/libstdc++-v3/testsuite/Makefile.am index f13f51d..43d0ed3 100644 --- a/libstdc++-v3/testsuite/Makefile.am +++ b/libstdc++-v3/testsuite/Makefile.am @@ -69,8 +69,10 @@ site.exp: Makefile extract_symvers = $(glibcxx_srcdir)/scripts/extract_symvers +baseline_subdir := $(shell $(CXX) --print-multi-dir) + baseline_symbols: - -@(output=${baseline_dir}/baseline_symbols.txt; \ + -@(output=${baseline_dir}/${baseline_subdir}/baseline_symbols.txt; \ if test ! -f $${output}; then \ echo "Baseline file doesn't exist."; \ echo "Try 'make new-abi-baseline' to create it."; \ @@ -78,8 +80,8 @@ baseline_symbols: fi; true) new-abi-baseline: - -@$(mkinstalldirs) ${baseline_dir} - -@(output=${baseline_dir}/baseline_symbols.txt; \ + -@$(mkinstalldirs) ${baseline_dir}${baseline_subdir} + -@(output=${baseline_dir}/${baseline_subdir}/baseline_symbols.txt; \ if test -f $${output}; then \ output=$${output}.new; \ t=`echo $${output} | sed 's=.*config/abi/=='`; \ diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in index 8eb34e9..ef177f6 100644 --- a/libstdc++-v3/testsuite/Makefile.in +++ b/libstdc++-v3/testsuite/Makefile.in @@ -54,6 +54,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \ $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/../config/gc++filt.m4 \ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -99,6 +100,7 @@ CTIME_CC = @CTIME_CC@ CTIME_H = @CTIME_H@ CXX = @CXX@ CXXCPP = @CXXCPP@ +CXXFILT = @CXXFILT@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ C_INCLUDE_DIR = @C_INCLUDE_DIR@ @@ -272,6 +274,7 @@ lists_of_files = \ testsuite_files_performance extract_symvers = $(glibcxx_srcdir)/scripts/extract_symvers +baseline_subdir := $(shell $(CXX) --print-multi-dir) check_DEJAGNU_normal_targets = $(patsubst %,check-DEJAGNUnormal%,0 1 2 3) # Runs the testsuite, but in compile only mode. @@ -495,7 +498,7 @@ site.exp: Makefile @mv site.tmp site.exp baseline_symbols: - -@(output=${baseline_dir}/baseline_symbols.txt; \ + -@(output=${baseline_dir}/${baseline_subdir}/baseline_symbols.txt; \ if test ! -f $${output}; then \ echo "Baseline file doesn't exist."; \ echo "Try 'make new-abi-baseline' to create it."; \ @@ -503,8 +506,8 @@ baseline_symbols: fi; true) new-abi-baseline: - -@$(mkinstalldirs) ${baseline_dir} - -@(output=${baseline_dir}/baseline_symbols.txt; \ + -@$(mkinstalldirs) ${baseline_dir}${baseline_subdir} + -@(output=${baseline_dir}/${baseline_subdir}/baseline_symbols.txt; \ if test -f $${output}; then \ output=$${output}.new; \ t=`echo $${output} | sed 's=.*config/abi/=='`; \