From cc2de92d5a4fbc66cbcfd1c9187c4ebecc4f46b3 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Mon, 27 Feb 2012 13:51:50 +0000 Subject: Fix Solaris symbol versioning (PR libstdc++/52188) 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. From-SVN: r184598 --- libgomp/ChangeLog | 16 ++++++++++++++++ libgomp/Makefile.am | 28 ++++++++++++++-------------- libgomp/Makefile.in | 25 ++++++++++++++----------- libgomp/acinclude.m4 | 7 ++----- libgomp/configure | 24 ++++-------------------- 5 files changed, 50 insertions(+), 50 deletions(-) (limited to 'libgomp') diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 95a6303738e..c0d578f3e9e 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,19 @@ +2012-02-27 Rainer Orth + + 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 * configure.tgt: Handle tilegx and tilepro. diff --git a/libgomp/Makefile.am b/libgomp/Makefile.am index c0c91678bab..2bc4986ad18 100644 --- a/libgomp/Makefile.am +++ b/libgomp/Makefile.am @@ -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'` \ diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in index b81936ac5ca..ecc010eda4b 100644 --- a/libgomp/Makefile.in +++ b/libgomp/Makefile.in @@ -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'` \ diff --git a/libgomp/acinclude.m4 b/libgomp/acinclude.m4 index 4a4b62f01c3..d43aa885474 100644 --- a/libgomp/acinclude.m4 +++ b/libgomp/acinclude.m4 @@ -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) ]) diff --git a/libgomp/configure b/libgomp/configure index 6f25c6f5eb9..8ed841a06e0 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -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 -- cgit v1.2.1