This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [BC] Link libs with -Bsymbolic
This should do it for the time being. We need, I guess, to make this
the default for libgcj DSOs.
I wonder if we will ever need to turn -Bsymbolic off? I haven't used
it when linking libgcj.so itself: it may not be absolutely necessary,
and I'm being cautious.
Andrew.
2004-11-16 Andrew Haley <aph@redhat.com>
* configure.ac (LIBGCJ_LD_SYMBOLIC): AC_SUBST this definition.
* configure.host: Define libgcj_ld_symbolic for Linux hosts.
* Makefile.am (lib_*_la_LDFLAGS): Add LIBGCJ_LD_SYMBOLIC.
* configure: Regenerate.
* Makefile.in: Regenerate.
Index: configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/libjava/configure.ac,v
retrieving revision 1.9.8.1
diff -p -2 -c -r1.9.8.1 configure.ac
*** configure.ac 12 Oct 2004 12:32:27 -0000 1.9.8.1
--- configure.ac 16 Nov 2004 13:33:21 -0000
*************** LIBGCJ_CFLAGS="${libgcj_cflags}"
*** 135,141 ****
--- 135,143 ----
LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
+ LIBGCJ_LD_SYMBOLIC="${libgcj_ld_symbolic}"
AC_SUBST(LIBGCJ_CFLAGS)
AC_SUBST(LIBGCJ_CXXFLAGS)
AC_SUBST(LIBGCJ_JAVAFLAGS)
+ AC_SUBST(LIBGCJ_LD_SYMBOLIC)
AC_CONFIG_HEADERS([include/config.h gcj/libgcj-config.h])
Index: configure.host
===================================================================
RCS file: /cvs/gcc/gcc/libjava/configure.host,v
retrieving revision 1.57.2.1
diff -p -2 -c -r1.57.2.1 configure.host
*** configure.host 12 Oct 2004 12:32:27 -0000 1.57.2.1
--- configure.host 16 Nov 2004 13:33:21 -0000
*************** case "${host}" in
*** 174,177 ****
--- 174,178 ----
sh-linux* | sh[34]*-linux*)
can_unwind_signal=yes
+ libgcj_ld_symbolic='-Wl,-Bsymbolic'
if test x$slow_pthread_self = xyes \
&& test x$cross_compiling != xyes; then
Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.am,v
retrieving revision 1.368.2.8
diff -p -2 -c -r1.368.2.8 Makefile.am
*** Makefile.am 5 Nov 2004 13:57:48 -0000 1.368.2.8
--- Makefile.am 16 Nov 2004 13:33:22 -0000
*************** lib_gnu_java_awt_peer_gtk_la_DEPENDENCIE
*** 352,356 ****
## The mysterious backslash in the grep pattern is consumed by make.
lib_gnu_java_awt_peer_gtk_la_LDFLAGS = \
! -version-info `grep -v '^\#' $(srcdir)/libtool-version`
lib_gnu_java_awt_peer_gtk_la_LINK = $(LIBLINK)
--- 352,356 ----
## The mysterious backslash in the grep pattern is consumed by make.
lib_gnu_java_awt_peer_gtk_la_LDFLAGS = \
! -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
lib_gnu_java_awt_peer_gtk_la_LINK = $(LIBLINK)
*************** lib_org_ietf_jgss_la_LIBADD = -L$(here)/
*** 373,377 ****
## The mysterious backslash in the grep pattern is consumed by make.
lib_org_ietf_jgss_la_LDFLAGS = -rpath $(toolexeclibdir) \
! -version-info `grep -v '^\#' $(srcdir)/libtool-version`
lib_org_w3c_dom_la_SOURCES = org/w3c/dom/Attr.java \
--- 373,377 ----
## The mysterious backslash in the grep pattern is consumed by make.
lib_org_ietf_jgss_la_LDFLAGS = -rpath $(toolexeclibdir) \
! -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
lib_org_w3c_dom_la_SOURCES = org/w3c/dom/Attr.java \
*************** lib_org_w3c_dom_la_LIBADD = -L$(here)/.l
*** 404,408 ****
## The mysterious backslash in the grep pattern is consumed by make.
lib_org_w3c_dom_la_LDFLAGS = -rpath $(toolexeclibdir) \
! -version-info `grep -v '^\#' $(srcdir)/libtool-version`
lib_org_xml_sax_la_SOURCES = org/xml/sax/ext/DeclHandler.java \
--- 404,408 ----
## The mysterious backslash in the grep pattern is consumed by make.
lib_org_w3c_dom_la_LDFLAGS = -rpath $(toolexeclibdir) \
! -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
lib_org_xml_sax_la_SOURCES = org/xml/sax/ext/DeclHandler.java \
*************** lib_org_xml_sax_la_LIBADD = -L$(here)/.l
*** 440,444 ****
## The mysterious backslash in the grep pattern is consumed by make.
lib_org_xml_sax_la_LDFLAGS = -rpath $(toolexeclibdir) \
! -version-info `grep -v '^\#' $(srcdir)/libtool-version`
lib_gnu_awt_xlib_la_SOURCES = \
--- 440,444 ----
## The mysterious backslash in the grep pattern is consumed by make.
lib_org_xml_sax_la_LDFLAGS = -rpath $(toolexeclibdir) \
! -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
lib_gnu_awt_xlib_la_SOURCES = \
*************** lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc
*** 456,460 ****
@X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
-rpath $(toolexeclibdir) \
! -version-info `grep -v '^\#' $(srcdir)/libtool-version`
lib_gnu_awt_xlib_la_LINK = $(LIBLINK)
--- 456,460 ----
@X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
-rpath $(toolexeclibdir) \
! -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
lib_gnu_awt_xlib_la_LINK = $(LIBLINK)