Message ID | ydd1v20hfm1.fsf@manam.CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
On 03/21/2011 12:34 PM, Rainer Orth wrote: > Prompted by PR bootstrap/48135, I found that only libstdc++-v3 honors > --disable-symvers. The following patch corrects this, but also notices > again the mess we've created by having at least 3 different sets of > checks for symbol versioning, each with its own variations ;-( But this > is not the time to correct this (yet). > > Tested by a i386-pc-solaris2.11 bootstrap and checking that all > libraries were still versioned by default. Then I removed and > configured/built the affected libraries again and checked that > versioning was correctly disabled. > > The patch below was created with -w to hide indentation changes. > > Ok for mainline now and perhaps 4.6.1? Ok for 4.7, RMs should decide about 4.6.1. Paolo
Paolo Bonzini <bonzini@gnu.org> writes: > On 03/21/2011 12:34 PM, Rainer Orth wrote: >> Prompted by PR bootstrap/48135, I found that only libstdc++-v3 honors >> --disable-symvers. The following patch corrects this, but also notices >> again the mess we've created by having at least 3 different sets of >> checks for symbol versioning, each with its own variations ;-( But this >> is not the time to correct this (yet). >> >> Tested by a i386-pc-solaris2.11 bootstrap and checking that all >> libraries were still versioned by default. Then I removed and >> configured/built the affected libraries again and checked that >> versioning was correctly disabled. >> >> The patch below was created with -w to hide indentation changes. >> >> Ok for mainline now and perhaps 4.6.1? > > Ok for 4.7, RMs should decide about 4.6.1. Applied, thanks. It would be nice to get into 4.6 (even 4.6.1) since otherwise install.texi which claims --disable-symvers as a workaround lies :-) Rainer
On Mon, Mar 21, 2011 at 1:39 PM, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote: > Paolo Bonzini <bonzini@gnu.org> writes: > >> On 03/21/2011 12:34 PM, Rainer Orth wrote: >>> Prompted by PR bootstrap/48135, I found that only libstdc++-v3 honors >>> --disable-symvers. The following patch corrects this, but also notices >>> again the mess we've created by having at least 3 different sets of >>> checks for symbol versioning, each with its own variations ;-( But this >>> is not the time to correct this (yet). >>> >>> Tested by a i386-pc-solaris2.11 bootstrap and checking that all >>> libraries were still versioned by default. Then I removed and >>> configured/built the affected libraries again and checked that >>> versioning was correctly disabled. >>> >>> The patch below was created with -w to hide indentation changes. >>> >>> Ok for mainline now and perhaps 4.6.1? >> >> Ok for 4.7, RMs should decide about 4.6.1. > > Applied, thanks. It would be nice to get into 4.6 (even 4.6.1) since > otherwise install.texi which claims --disable-symvers as a workaround > lies :-) Ok. Thanks, Richard.
Richard Guenther <richard.guenther@gmail.com> writes: >>> Ok for 4.7, RMs should decide about 4.6.1. >> >> Applied, thanks. It would be nice to get into 4.6 (even 4.6.1) since >> otherwise install.texi which claims --disable-symvers as a workaround >> lies :-) > > Ok. Just to make no mistake: ok for 4.6.0 or ok for 4.6.1? Thanks. Rainer
On Mon, 21 Mar 2011, Rainer Orth wrote: > Richard Guenther <richard.guenther@gmail.com> writes: > > >>> Ok for 4.7, RMs should decide about 4.6.1. > >> > >> Applied, thanks. It would be nice to get into 4.6 (even 4.6.1) since > >> otherwise install.texi which claims --disable-symvers as a workaround > >> lies :-) > > > > Ok. > > Just to make no mistake: ok for 4.6.0 or ok for 4.6.1? Ok for 4.6.1. Richard.
diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac --- a/libgfortran/configure.ac +++ b/libgfortran/configure.ac @@ -144,6 +144,12 @@ # Check for symbol versioning (copied from libssp). AC_MSG_CHECKING([whether symbol versioning is supported]) +AC_ARG_ENABLE(symvers, +AS_HELP_STRING([--disable-symvers], + [disable symbol versioning for libgfortran]), +gfortran_use_symver=$enableval, +gfortran_use_symver=yes) +if test "x$gfortran_use_symver" = xyes; then save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -fPIC -shared -Wl,--version-script,./conftest.map" cat > conftest.map <<EOF @@ -168,6 +174,7 @@ esac fi LDFLAGS="$save_LDFLAGS" +fi AC_MSG_RESULT($gfortran_use_symver) AM_CONDITIONAL(LIBGFOR_USE_SYMVER, [test "x$gfortran_use_symver" != xno]) AM_CONDITIONAL(LIBGFOR_USE_SYMVER_GNU, [test "x$gfortran_use_symver" = xgnu]) diff --git a/libgomp/acinclude.m4 b/libgomp/acinclude.m4 --- a/libgomp/acinclude.m4 +++ b/libgomp/acinclude.m4 @@ -228,6 +228,9 @@ # If we never went through the LIBGOMP_CHECK_LINKER_FEATURES macro, then we # don't know enough about $LD to do tricks... AC_REQUIRE([LIBGOMP_CHECK_LINKER_FEATURES]) + +# Turn a 'yes' into a suitable default. +if test x$enable_symvers = xyes ; then # FIXME The following test is too strict, in theory. if test $enable_shared = no || test "x$LD" = x; then enable_symvers=no @@ -244,6 +247,7 @@ esac fi fi +fi # Check if 'sun' was requested on non-Solaris 2 platforms. if test x$enable_symvers = xsun ; then diff --git a/libjava/configure.ac b/libjava/configure.ac --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -1800,13 +1800,24 @@ # See if linker supports anonymous version scripts. AC_CACHE_CHECK([whether ld supports anonymous version scripts], [libjava_cv_anon_version_script], - [save_CFLAGS="$CFLAGS"; save_LDFLAGS="$LDFLAGS" - libjava_cv_anon_version_script=no + [AC_ARG_ENABLE(symvers, + AS_HELP_STRING([--disable-symvers], + [disable symbol versioning for libjava]), + [case "$enableval" in + yes) libjava_cv_anon_version_script=yes ;; + no) libjava_cv_anon_version_script=no ;; + *) AC_MSG_ERROR([Unknown argument to enable/disable symvers]);; + esac], + [libjava_cv_anon_version_script=yes] + ) + if test x$libjava_cv_anon_version_script = xyes; then + save_CFLAGS="$CFLAGS"; save_LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS -fPIC"; LDFLAGS="$LDFLAGS -shared -Wl,--version-script,conftest.map" echo '{ global: globalsymb*; local: *; };' > conftest.map AC_TRY_LINK(void globalsymbol (void) {} void localsymbol (void) {},, - [libjava_cv_anon_version_script=gnu], []) + [libjava_cv_anon_version_script=gnu], + [libjava_cv_anon_version_script=no]) if test x$libjava_cv_anon_version_script = xno; then case "$target_os" in solaris2*) @@ -1820,6 +1831,7 @@ esac fi CFLAGS="$save_CFLAGS"; LDFLAGS="$save_LDFLAGS" + fi ]) AM_CONDITIONAL(ANONVERSCRIPT, test "$libjava_cv_anon_version_script" != no) AM_CONDITIONAL(ANONVERSCRIPT_GNU, test "$libjava_cv_anon_version_script" = gnu) diff --git a/libquadmath/configure.ac b/libquadmath/configure.ac --- a/libquadmath/configure.ac +++ b/libquadmath/configure.ac @@ -164,6 +164,12 @@ # Check for symbol versioning (copied from libssp). AC_MSG_CHECKING([whether symbol versioning is supported]) +AC_ARG_ENABLE(symvers, +AS_HELP_STRING([--disable-symvers], + [disable symbol versioning for libquadmath]), +quadmath_use_symver=$enableval, +quadmath_use_symver=yes) +if test "x$quadmath_use_symver" = xyes; then if test x$gcc_no_link = xyes; then # If we cannot link, we cannot build shared libraries, so do not use # symbol versioning. @@ -194,6 +200,7 @@ fi LDFLAGS="$save_LDFLAGS" fi +fi AC_MSG_RESULT($quadmath_use_symver) AM_CONDITIONAL(LIBQUAD_USE_SYMVER, [test "x$quadmath_use_symver" != xno]) AM_CONDITIONAL(LIBQUAD_USE_SYMVER_GNU, [test "x$quadmath_use_symver" = xgnu]) diff --git a/libssp/configure.ac b/libssp/configure.ac --- a/libssp/configure.ac +++ b/libssp/configure.ac @@ -72,6 +72,12 @@ fi AC_MSG_CHECKING([whether symbol versioning is supported]) +AC_ARG_ENABLE(symvers, +AS_HELP_STRING([--disable-symvers], + [disable symbol versioning for libssp]), +ssp_use_symver=$enableval, +ssp_use_symver=yes) +if test "x$ssp_use_symver" = xyes; then if test x$gcc_no_link = xyes; then # If we cannot link, we cannot build shared libraries, so do not use # symbol versioning. @@ -102,6 +108,7 @@ fi LDFLAGS="$save_LDFLAGS" fi +fi AC_MSG_RESULT($ssp_use_symver) AM_CONDITIONAL(LIBSSP_USE_SYMVER, [test "x$ssp_use_symver" != xno]) AM_CONDITIONAL(LIBSSP_USE_SYMVER_GNU, [test "x$ssp_use_symver" = xgnu])