* [build] Honor --disable-symvers (PR bootstrap/48135)
@ 2011-03-21 11:34 Rainer Orth
2011-03-21 11:42 ` Paolo Bonzini
0 siblings, 1 reply; 6+ messages in thread
From: Rainer Orth @ 2011-03-21 11:34 UTC (permalink / raw)
To: gcc-patches; +Cc: fortran, Paolo Bonzini
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?
Thanks.
Rainer
2011-03-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
libgfortran:
PR bootstrap/48135
* configure.ac (gfortran_use_symver): Handle --disable-symvers.
* configure: Regenerate.
libgomp:
PR bootstrap/48135
* acinclude.m4 (enable_symvers): Handle --disable-symvers.
* configure: Regenerate.
libjava:
PR bootstrap/48135
* configure.ac (libjava_cv_anon_version_script): Handle
--disable-symvers.
* configure: Regenerate.
libquadmath:
PR bootstrap/48135
* configure.ac (quadmath_use_symver): Handle --disable-symvers.
* configure: Regenerate.
libssp:
PR bootstrap/48135
* configure.ac (ssp_use_symver): Handle --disable-symvers.
* configure: Regenerate.
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])
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [build] Honor --disable-symvers (PR bootstrap/48135)
2011-03-21 11:34 [build] Honor --disable-symvers (PR bootstrap/48135) Rainer Orth
@ 2011-03-21 11:42 ` Paolo Bonzini
2011-03-21 12:40 ` Rainer Orth
0 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2011-03-21 11:42 UTC (permalink / raw)
To: Rainer Orth; +Cc: gcc-patches, fortran
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [build] Honor --disable-symvers (PR bootstrap/48135)
2011-03-21 11:42 ` Paolo Bonzini
@ 2011-03-21 12:40 ` Rainer Orth
2011-03-21 13:19 ` Richard Guenther
0 siblings, 1 reply; 6+ messages in thread
From: Rainer Orth @ 2011-03-21 12:40 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: gcc-patches, fortran, Richard Guenther
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
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [build] Honor --disable-symvers (PR bootstrap/48135)
2011-03-21 12:40 ` Rainer Orth
@ 2011-03-21 13:19 ` Richard Guenther
2011-03-21 13:23 ` Rainer Orth
0 siblings, 1 reply; 6+ messages in thread
From: Richard Guenther @ 2011-03-21 13:19 UTC (permalink / raw)
To: Rainer Orth; +Cc: Paolo Bonzini, gcc-patches, fortran, Richard Guenther
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [build] Honor --disable-symvers (PR bootstrap/48135)
2011-03-21 13:19 ` Richard Guenther
@ 2011-03-21 13:23 ` Rainer Orth
2011-03-21 13:36 ` Richard Guenther
0 siblings, 1 reply; 6+ messages in thread
From: Rainer Orth @ 2011-03-21 13:23 UTC (permalink / raw)
To: Richard Guenther; +Cc: Paolo Bonzini, gcc-patches, fortran, Richard Guenther
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
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [build] Honor --disable-symvers (PR bootstrap/48135)
2011-03-21 13:23 ` Rainer Orth
@ 2011-03-21 13:36 ` Richard Guenther
0 siblings, 0 replies; 6+ messages in thread
From: Richard Guenther @ 2011-03-21 13:36 UTC (permalink / raw)
To: Rainer Orth; +Cc: Richard Guenther, Paolo Bonzini, gcc-patches, fortran
[-- Attachment #1: Type: TEXT/PLAIN, Size: 415 bytes --]
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-03-21 13:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-21 11:34 [build] Honor --disable-symvers (PR bootstrap/48135) Rainer Orth
2011-03-21 11:42 ` Paolo Bonzini
2011-03-21 12:40 ` Rainer Orth
2011-03-21 13:19 ` Richard Guenther
2011-03-21 13:23 ` Rainer Orth
2011-03-21 13:36 ` Richard Guenther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).