OSDN Git Service

Fix Solaris symbol versioning (PR libstdc++/52188)
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 27 Feb 2012 13:51:50 +0000 (13:51 +0000)
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 27 Feb 2012 13:51:50 +0000 (13:51 +0000)
contrib:
PR libstdc++/52188
* make_sunver.pl: Remove #ifdef handling.

libgomp:
PR libstdc++/52188
* acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Remove symvers_renaming.
Remove ENABLE_SYMVERS_SOL2.
* configure: Regenerate.
* Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB] (comma): New variable.
(PREPROCESS): New variable.
(libgomp.ver): New target.
[LIBGOMP_BUILD_VERSIONED_SHLIB &&
LIBGOMP_BUILD_VERSIONED_SHLIB_GNU]: Remove
LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2 handling.
Use libgomp.ver.
[LIBGOMP_BUILD_VERSIONED_SHLIB_SUN]: Use libgomp.ver, libgomp.ver-sun.
* Makefile.in: Regenerate.

libstdc++-v3:
PR libstdc++/52188
* acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Remove symvers_renaming.
Remove ENABLE_SYMVERS_SOL2.
* configure: Regenerate.
* src/Makefile.am [ENABLE_SYMVERS] (libstdc++-symbols.ver):
Postprocess mapfile.
[ENABLE_SYMVERS_GNU]: Remove ENABLE_SYMVERS_SOL2 handling.
* src/Makefile.in: Regenerate.

* config/abi/pre/gnu.ver (GLIBCXX_3.4.5) [!__sun__ && !__svr4__]:
Don't export
_ZNSt19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEppEv.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184598 138bc75d-0d04-0410-961f-82ee72b054a4

13 files changed:
contrib/ChangeLog
contrib/make_sunver.pl
libgomp/ChangeLog
libgomp/Makefile.am
libgomp/Makefile.in
libgomp/acinclude.m4
libgomp/configure
libstdc++-v3/ChangeLog
libstdc++-v3/acinclude.m4
libstdc++-v3/config/abi/pre/gnu.ver
libstdc++-v3/configure
libstdc++-v3/src/Makefile.am
libstdc++-v3/src/Makefile.in

index aeaee19..5094887 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR libstdc++/52188
+       * make_sunver.pl: Remove #ifdef handling.
+
 2012-02-17   Doug Kwan  <dougkwan@google.com>
 
        * contrib/testsuite-management/validate_failures.py
index 96ad22c..afdf973 100644 (file)
@@ -156,9 +156,6 @@ my $glob = 'glob';
 # We're currently inside `extern "C++"', which Sun ld doesn't understand.
 my $in_extern = 0;
 
-# We're currently inside a conditional section: just skip it.
-my $in_ifdef = 0;
-
 # The c++filt command to use.  This *must* be GNU c++filt; the Sun Studio
 # c++filt doesn't handle the GNU mangling style.
 my $cxxfilt = $ENV{'CXXFILT'} || "c++filt";
@@ -183,15 +180,6 @@ printf "# Omitted archives with corresponding shared libraries: %s\n",
 print "#\n\n";
 
 while (<F>) {
-    # End of skipped section.
-    if (/^[ \t]*\#endif/) {
-       $in_ifdef = 0;
-       next;
-    }
-
-    # Just skip a conditional section.
-    if ($in_ifdef) { next; }
-
     # Lines of the form '};'
     if (/^([ \t]*)(\}[ \t]*;[ \t]*)$/) {
        $glob = 'glob';
@@ -216,15 +204,6 @@ while (<F>) {
        print; next;
     }
 
-    # Special comments that look like C preprocessor conditionals.
-    # Just skip the contents for now.
-    # FIXME: Allow passing in conditionals from the command line to really
-    # control the skipping.
-    if (/^[ \t]*\#ifdef/) {
-       $in_ifdef = 1;
-       next;
-    }
-
     # Comment and blank lines
     if (/^[ \t]*\#/) { print; next; }
     if (/^[ \t]*$/) { print; next; }
index 95a6303..c0d578f 100644 (file)
@@ -1,3 +1,19 @@
+2012-02-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR libstdc++/52188
+       * acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Remove symvers_renaming.
+       Remove ENABLE_SYMVERS_SOL2.
+       * configure: Regenerate.
+       * Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB] (comma): New variable.
+       (PREPROCESS): New variable.
+       (libgomp.ver): New target.
+       [LIBGOMP_BUILD_VERSIONED_SHLIB &&
+       LIBGOMP_BUILD_VERSIONED_SHLIB_GNU]: Remove
+       LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2 handling.
+       Use libgomp.ver.
+       [LIBGOMP_BUILD_VERSIONED_SHLIB_SUN]: Use libgomp.ver, libgomp.ver-sun.
+       * Makefile.in: Regenerate.
+
 2012-02-14  Walter Lee  <walt@tilera.com>
 
        * configure.tgt: Handle tilegx and tilepro.
index c0c9167..2bc4986 100644 (file)
@@ -22,26 +22,26 @@ toolexeclib_LTLIBRARIES = libgomp.la
 nodist_toolexeclib_HEADERS = libgomp.spec
 
 if LIBGOMP_BUILD_VERSIONED_SHLIB
+# -Wc is only a libtool option.
+comma = ,
+PREPROCESS = $(subst -Wc$(comma), , $(COMPILE)) -E
+
+libgomp.ver: $(top_srcdir)/libgomp.map
+       $(EGREP) -v '#(#| |$$)' $< | \
+         $(PREPROCESS) -P -include config.h - > $@ || (rm -f $@ ; exit 1)
+
 if LIBGOMP_BUILD_VERSIONED_SHLIB_GNU
-if LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2
-libgomp_version_script = -Wl,--version-script,libgomp.map-sol2
-libgomp_version_dep = libgomp.map-sol2
-libgomp.map-sol2 : $(top_srcdir)/libgomp.map
-       sed -e '/^#ifdef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT/,/^#endif/d' $< \
-        > $@ || (rm -f $@ ; exit 1)
-else
-libgomp_version_script = -Wl,--version-script,$(top_srcdir)/libgomp.map
-libgomp_version_dep = $(top_srcdir)/libgomp.map
-endif
+libgomp_version_script = -Wl,--version-script,libgomp.ver
+libgomp_version_dep = libgomp.ver
 endif
 if LIBGOMP_BUILD_VERSIONED_SHLIB_SUN
-libgomp_version_script = -Wl,-M,libgomp.map-sun
-libgomp_version_dep = libgomp.map-sun
-libgomp.map-sun : $(top_srcdir)/libgomp.map \
+libgomp_version_script = -Wl,-M,libgomp.ver-sun
+libgomp_version_dep = libgomp.ver-sun
+libgomp.ver-sun : libgomp.ver \
                $(top_srcdir)/../contrib/make_sunver.pl \
                $(libgomp_la_OBJECTS) $(libgomp_la_LIBADD)
        perl $(top_srcdir)/../contrib/make_sunver.pl \
-         $(top_srcdir)/libgomp.map \
+         libgomp.ver \
          $(libgomp_la_OBJECTS:%.lo=.libs/%.o) \
         `echo $(libgomp_la_LIBADD) | \
            sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \
index b81936a..ecc010e 100644 (file)
@@ -298,14 +298,16 @@ AM_CFLAGS = $(XCFLAGS)
 AM_LDFLAGS = $(XLDFLAGS) $(SECTION_LDFLAGS) $(OPT_LDFLAGS)
 toolexeclib_LTLIBRARIES = libgomp.la
 nodist_toolexeclib_HEADERS = libgomp.spec
+
+# -Wc is only a libtool option.
+@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@comma = ,
+@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@PREPROCESS = $(subst -Wc$(comma), , $(COMPILE)) -E
 @LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE@libgomp_version_script = 
-@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_FALSE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_script = -Wl,--version-script,$(top_srcdir)/libgomp.map
-@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_script = -Wl,--version-script,libgomp.map-sol2
-@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_script = -Wl,-M,libgomp.map-sun
+@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_script = -Wl,--version-script,libgomp.ver
+@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_script = -Wl,-M,libgomp.ver-sun
 @LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE@libgomp_version_dep = 
-@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_FALSE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = $(top_srcdir)/libgomp.map
-@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = libgomp.map-sol2
-@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = libgomp.map-sun
+@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = libgomp.ver
+@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = libgomp.ver-sun
 libgomp_version_info = -version-info $(libtool_VERSION)
 libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \
         $(lt_host_flags)
@@ -1066,14 +1068,15 @@ uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
 
 
 vpath % $(strip $(search_path))
-@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp.map-sol2 : $(top_srcdir)/libgomp.map
-@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@  sed -e '/^#ifdef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT/,/^#endif/d' $< \
-@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@   > $@ || (rm -f $@ ; exit 1)
-@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp.map-sun : $(top_srcdir)/libgomp.map \
+
+@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp.ver: $(top_srcdir)/libgomp.map
+@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@   $(EGREP) -v '#(#| |$$)' $< | \
+@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@     $(PREPROCESS) -P -include config.h - > $@ || (rm -f $@ ; exit 1)
+@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp.ver-sun : libgomp.ver \
 @LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@           $(top_srcdir)/../contrib/make_sunver.pl \
 @LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@           $(libgomp_la_OBJECTS) $(libgomp_la_LIBADD)
 @LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@   perl $(top_srcdir)/../contrib/make_sunver.pl \
-@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@     $(top_srcdir)/libgomp.map \
+@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@     libgomp.ver \
 @LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@     $(libgomp_la_OBJECTS:%.lo=.libs/%.o) \
 @LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@    `echo $(libgomp_la_LIBADD) | \
 @LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@       sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \
index 4a4b62f..d43aa88 100644 (file)
@@ -355,15 +355,12 @@ if test $enable_symvers != no ; then
      # 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(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
-else
-    symvers_renaming=no
 fi
-AM_CONDITIONAL(LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2, test $symvers_renaming = no)
 ])
index 6f25c6f..8ed841a 100755 (executable)
@@ -619,8 +619,6 @@ link_gomp
 XLDFLAGS
 XCFLAGS
 config_path
-LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_FALSE
-LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_TRUE
 LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_FALSE
 LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE
 LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_FALSE
@@ -11082,7 +11080,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11085 "configure"
+#line 11083 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11188,7 +11186,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11191 "configure"
+#line 11189 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15994,27 +15992,17 @@ if test $enable_symvers != no ; then
      # 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 HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT 1" >>confdefs.h
 
-       symvers_renaming=yes ;;
+       ;;
     esac
-else
-    symvers_renaming=no
-fi
- if test $symvers_renaming = no; then
-  LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_TRUE=
-  LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_FALSE='#'
-else
-  LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_TRUE='#'
-  LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_FALSE=
 fi
 
 
-
 if test $enable_symvers = gnu; then
 
 $as_echo "#define LIBGOMP_GNU_SYMBOL_VERSIONING 1" >>confdefs.h
@@ -16404,10 +16392,6 @@ if test -z "${LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE}" && test -z "${LIBGOMP_BUI
   as_fn_error "conditional \"LIBGOMP_BUILD_VERSIONED_SHLIB_SUN\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_TRUE}" && test -z "${LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_FALSE}"; then
-  as_fn_error "conditional \"LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${USE_FORTRAN_TRUE}" && test -z "${USE_FORTRAN_FALSE}"; then
   as_fn_error "conditional \"USE_FORTRAN\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
index 4edf895..7b26bef 100644 (file)
@@ -1,3 +1,18 @@
+2012-02-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR libstdc++/52188
+       * acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Remove symvers_renaming.
+       Remove ENABLE_SYMVERS_SOL2.
+       * configure: Regenerate.
+       * src/Makefile.am [ENABLE_SYMVERS] (libstdc++-symbols.ver):
+       Postprocess mapfile.
+       [ENABLE_SYMVERS_GNU]: Remove ENABLE_SYMVERS_SOL2 handling.
+       * src/Makefile.in: Regenerate.
+
+       * config/abi/pre/gnu.ver (GLIBCXX_3.4.5) [!__sun__ && !__svr4__]:
+       Don't export
+       _ZNSt19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEppEv.
+
 2012-02-25  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        PR testsuite/52201
index b832527..fe37a91 100644 (file)
@@ -3264,17 +3264,14 @@ if test $enable_symvers != no ; then
      # 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(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
-else
-    symvers_renaming=no
 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
index 9657024..b99a812 100644 (file)
@@ -1,7 +1,7 @@
 ## Linker script for GNU versioning (GNU ld 2.13.91+ only.)
 ##
-## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
-## Free Software Foundation, Inc.
+## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+## 2011, 2012 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
@@ -890,8 +890,12 @@ GLIBCXX_3.4.5 {
 
     _ZNSt11char_traitsI[cw]E2eqERK[cw]S2_;
 
+    # Those template instantiations weren't exported on Solaris in GCC 4.6
+    # and aren't necessary for correct operation, so don't emit them now
+    # (PR libstdc++/52188).
+#if !defined(__sun__) && !defined(__svr4__)
     _ZNSt19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEppEv;
-
+#endif
 } GLIBCXX_3.4.4;
 
 GLIBCXX_3.4.6 {
index a15c05d..d3444e0 100755 (executable)
@@ -644,8 +644,6 @@ GLIBCXX_LDBL_COMPAT_TRUE
 ENABLE_VISIBILITY_FALSE
 ENABLE_VISIBILITY_TRUE
 libtool_VERSION
-ENABLE_SYMVERS_SOL2_FALSE
-ENABLE_SYMVERS_SOL2_TRUE
 ENABLE_SYMVERS_SUN_FALSE
 ENABLE_SYMVERS_SUN_TRUE
 ENABLE_SYMVERS_DARWIN_FALSE
@@ -11499,7 +11497,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11502 "configure"
+#line 11500 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11605,7 +11603,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11608 "configure"
+#line 11606 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14963,7 +14961,7 @@ fi
     #
     # Fake what AC_TRY_COMPILE does.  XXX Look at redoing this new-style.
     cat > conftest.$ac_ext << EOF
-#line 14966 "configure"
+#line 14964 "configure"
 struct S { ~S(); };
 void bar();
 void foo()
@@ -15298,7 +15296,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
   # Fake what AC_TRY_COMPILE does.
 
     cat > conftest.$ac_ext << EOF
-#line 15301 "configure"
+#line 15299 "configure"
 int main()
 {
   typedef bool atomic_type;
@@ -15333,7 +15331,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15336 "configure"
+#line 15334 "configure"
 int main()
 {
   typedef short atomic_type;
@@ -15368,7 +15366,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15371 "configure"
+#line 15369 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
@@ -15404,7 +15402,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15407 "configure"
+#line 15405 "configure"
 int main()
 {
   typedef long long atomic_type;
@@ -15484,7 +15482,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 15487 "configure"
+#line 15485 "configure"
 int main()
 {
   _Decimal32 d1;
@@ -15526,7 +15524,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15529 "configure"
+#line 15527 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
@@ -15560,7 +15558,7 @@ $as_echo "$enable_int128" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15563 "configure"
+#line 15561 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
@@ -64998,19 +64996,16 @@ if test $enable_symvers != no ; then
      # 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 HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT 1" >>confdefs.h
 
-       symvers_renaming=yes  ;;
+       ;;
     esac
-else
-    symvers_renaming=no
 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
@@ -66201,15 +66196,6 @@ else
 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_libstdcxx_visibility = yes; then
   ENABLE_VISIBILITY_TRUE=
   ENABLE_VISIBILITY_FALSE='#'
@@ -66637,10 +66623,6 @@ if test -z "${ENABLE_SYMVERS_SUN_TRUE}" && test -z "${ENABLE_SYMVERS_SUN_FALSE}"
   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
index 2cd2774..f3ca0d7 100644 (file)
@@ -102,34 +102,29 @@ CXXLINK = $(LIBTOOL) --tag CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
 if ENABLE_SYMVERS
 libstdc++-symbols.ver:  ${glibcxx_srcdir}/$(SYMVER_FILE) \
                $(port_specific_symbol_files)
-       cp ${glibcxx_srcdir}/$(SYMVER_FILE) ./libstdc++-symbols.ver
-       chmod +w ./libstdc++-symbols.ver
+       cp ${glibcxx_srcdir}/$(SYMVER_FILE) $@.tmp
+       chmod +w $@.tmp
        if test "x$(port_specific_symbol_files)" != x; then \
          if grep '^# Appended to version file.' \
               $(port_specific_symbol_files) /dev/null > /dev/null 2>&1; then \
-           cat $(port_specific_symbol_files) >> $@; \
+           cat $(port_specific_symbol_files) >> $@.tmp; \
          else \
-           sed -n '1,/DO NOT DELETE/p' $@ > tmp.top; \
-           sed -n '/DO NOT DELETE/,$$p' $@ > tmp.bottom; \
-           cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@; \
+           sed -n '1,/DO NOT DELETE/p' $@.tmp > tmp.top; \
+           sed -n '/DO NOT DELETE/,$$p' $@.tmp > tmp.bottom; \
+           cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@.tmp; \
            rm tmp.top tmp.bottom; \
          fi; \
        fi
+       $(EGREP) -v '#(#| |$$)' $@.tmp | \
+         $(COMPILE) -E -P -include config.h - > $@ || (rm -f $@ ; exit 1)
+       rm -f $@.tmp
 
 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
index 93ed440..17a6fb2 100644 (file)
@@ -399,14 +399,12 @@ CXXLINK = $(LIBTOOL) --tag CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
 @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_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_GNU_TRUE@@ENABLE_SYMVERS_TRUE@version_arg = -Wl,--version-script=libstdc++-symbols.ver
 @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_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_GNU_TRUE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.ver
 @ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.ver-sun
 @GLIBCXX_BUILD_DEBUG_FALSE@STAMP_DEBUG = 
 
@@ -765,22 +763,22 @@ vpath % $(top_srcdir)
 # Symbol versioning for shared libraries.
 @ENABLE_SYMVERS_TRUE@libstdc++-symbols.ver:  ${glibcxx_srcdir}/$(SYMVER_FILE) \
 @ENABLE_SYMVERS_TRUE@          $(port_specific_symbol_files)
-@ENABLE_SYMVERS_TRUE@  cp ${glibcxx_srcdir}/$(SYMVER_FILE) ./libstdc++-symbols.ver
-@ENABLE_SYMVERS_TRUE@  chmod +w ./libstdc++-symbols.ver
+@ENABLE_SYMVERS_TRUE@  cp ${glibcxx_srcdir}/$(SYMVER_FILE) $@.tmp
+@ENABLE_SYMVERS_TRUE@  chmod +w $@.tmp
 @ENABLE_SYMVERS_TRUE@  if test "x$(port_specific_symbol_files)" != x; then \
 @ENABLE_SYMVERS_TRUE@    if grep '^# Appended to version file.' \
 @ENABLE_SYMVERS_TRUE@         $(port_specific_symbol_files) /dev/null > /dev/null 2>&1; then \
-@ENABLE_SYMVERS_TRUE@      cat $(port_specific_symbol_files) >> $@; \
+@ENABLE_SYMVERS_TRUE@      cat $(port_specific_symbol_files) >> $@.tmp; \
 @ENABLE_SYMVERS_TRUE@    else \
-@ENABLE_SYMVERS_TRUE@      sed -n '1,/DO NOT DELETE/p' $@ > tmp.top; \
-@ENABLE_SYMVERS_TRUE@      sed -n '/DO NOT DELETE/,$$p' $@ > tmp.bottom; \
-@ENABLE_SYMVERS_TRUE@      cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@; \
+@ENABLE_SYMVERS_TRUE@      sed -n '1,/DO NOT DELETE/p' $@.tmp > tmp.top; \
+@ENABLE_SYMVERS_TRUE@      sed -n '/DO NOT DELETE/,$$p' $@.tmp > tmp.bottom; \
+@ENABLE_SYMVERS_TRUE@      cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@.tmp; \
 @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_TRUE@  $(EGREP) -v '#(#| |$$)' $@.tmp | \
+@ENABLE_SYMVERS_TRUE@    $(COMPILE) -E -P -include config.h - > $@ || (rm -f $@ ; exit 1)
+@ENABLE_SYMVERS_TRUE@  rm -f $@.tmp
 @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)