From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26506 invoked by alias); 3 May 2002 02:22:04 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 26482 invoked from network); 3 May 2002 02:22:03 -0000 Received: from unknown (HELO potter.sfbay.redhat.com) (205.180.83.107) by sources.redhat.com with SMTP; 3 May 2002 02:22:03 -0000 Received: from free.redhat.lsd.ic.unicamp.br (vpn3-4.sfbay.redhat.com [172.16.25.4]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g432Kav13747; Thu, 2 May 2002 19:20:38 -0700 Received: (from aoliva@localhost) by free.redhat.lsd.ic.unicamp.br (8.11.6/8.11.6) id g432LAn07736; Thu, 2 May 2002 23:21:10 -0300 To: Rainer Orth , gcc-patches@gcc.gnu.org, java@gcc.gnu.org, mark@codesourcery.com Cc: "David S. Miller" , rth@redhat.com, Joe.Buck@synopsys.com, glebourgeois@amadeus.net, gcc@gcc.gnu.org Subject: Re: Still failing to bootstrap on Solaris (CONFIG_SHELL doesn't help) References: <20020502135546.A5069@redhat.com> <15569.45674.297203.299627@xayide.TechFak.Uni-Bielefeld.DE> <20020502144819.A5145@redhat.com> <20020502.143920.20510740.davem@redhat.com> <15569.46538.150141.211082@xayide.TechFak.Uni-Bielefeld.DE> From: Alexandre Oliva Organization: GCC Team, Red Hat Date: Thu, 02 May 2002 19:22:00 -0000 In-Reply-To: <15569.46538.150141.211082@xayide.TechFak.Uni-Bielefeld.DE> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2002-05/txt/msg00207.txt.bz2 --=-=-= Content-length: 635 On May 2, 2002, Rainer Orth wrote: > David S. Miller writes: >> Rainer, thanks for helping us track this down. > It's always fun to rebut claims of Solaris brokenness :-) I always like when a misunderstanding of mine gets me enlightened at the end :-) Thanks for keeping me straight. Here's the patch I'm testing right now, on a relatively slow Solaris 7 box. I'm posting it such that people with access to faster boxes can test it too, and to avoid duplication of work in translating Rainer's suggestion into a patch. Mark, if this fixes the problem on Solaris, ok to install in the 3.1 branch? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=libjava-solaris.patch Content-length: 3990 Index: libjava/ChangeLog from Alexandre Oliva Suggested by Rainer Orth * Makefile.am (jv_convert_LDADD): Bring -L.libs to the front. (gij_LDADD, rmic_LDADD, rmiregistry_LDADD): Likewise. * Makefile.in: Rebuilt. Index: libjava/Makefile.am =================================================================== RCS file: /cvs/gcc/egcs/libjava/Makefile.am,v retrieving revision 1.202.2.10 diff -u -p -r1.202.2.10 Makefile.am --- libjava/Makefile.am 16 Apr 2002 15:52:53 -0000 1.202.2.10 +++ libjava/Makefile.am 3 May 2002 02:15:12 -0000 @@ -431,12 +431,14 @@ EXTRA_jv_convert_SOURCES = $(convert_sou jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) jv_convert_LINK = $(GCJLINK) -## We explicitly link in the libraries we need. This way we don't -## need -nodefaultlibs, so we can still rely on gcj picking up the -## system libraries we need (via the specs file). -## We need the -L so that gcj can find libgcj with `-lgcj'. -## FIXME: should be _libs on some systems. -jv_convert_LDADD = libgcj.la -L$(here)/.libs +## We don't explicitly link in the libraries we need; libgcj.la brings +## in all dependencies. We need the -L so that gcj can find libgcj +## with `-lgcj', but it must come first, otherwise the -L flags +## brought in from libgcj.la would cause the install directories to be +## searched before the build-tree ones, and we'd get errors because of +## different libraries with the same SONAME from picky linkers such as +## Solaris'. FIXME: should be _libs on some systems. +jv_convert_LDADD = -L$(here)/.libs libgcj.la ## Depend on the spec file to make sure it is up to date before ## linking this program. jv_convert_DEPENDENCIES = $(convert_source_files:.java=.lo) \ @@ -448,12 +450,8 @@ gij_SOURCES = gij.cc ## `.la' file. gij_LDFLAGS = -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) gij_LINK = $(GCJLINK) -## We explicitly link in the libraries we need. This way we don't -## need -nodefaultlibs, so we can still rely on gcj picking up the -## system libraries we need (via the specs file). -## We need the -L so that gcj can find libgcj with `-lgcj'. -## FIXME: should be _libs on some systems. -gij_LDADD = libgcj.la -L$(here)/.libs +## See jv_convert_LDADD. +gij_LDADD = -L$(here)/.libs libgcj.la ## Depend on the spec file to make sure it is up to date before ## linking this program. gij_DEPENDENCIES = libgcj.la libgcj.spec @@ -464,12 +462,8 @@ EXTRA_rmic_SOURCES = $(rmi_java_source_f rmic_LDFLAGS = --main=gnu.java.rmi.rmic.RMIC \ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) rmic_LINK = $(GCJLINK) -## We explicitly link in the libraries we need. This way we don't -## need -nodefaultlibs, so we can still rely on gcj picking up the -## system libraries we need (via the specs file). -## We need the -L so that gcj can find libgcj with `-lgcj'. -## FIXME: should be _libs on some systems. -rmic_LDADD = libgcj.la -L$(here)/.libs +## See jv_convert_LDADD. +rmic_LDADD = -L$(here)/.libs libgcj.la ## Depend on the spec file to make sure it is up to date before ## linking this program. rmic_DEPENDENCIES = libgcj.la libgcj.spec @@ -480,12 +474,8 @@ EXTRA_rmiregistry_SOURCES = $(rmi_java_s rmiregistry_LDFLAGS = --main=gnu.java.rmi.registry.RegistryImpl \ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) rmiregistry_LINK = $(GCJLINK) -## We explicitly link in the libraries we need. This way we don't -## need -nodefaultlibs, so we can still rely on gcj picking up the -## system libraries we need (via the specs file). -## We need the -L so that gcj can find libgcj with `-lgcj'. -## FIXME: should be _libs on some systems. -rmiregistry_LDADD = libgcj.la -L$(here)/.libs +## See jv_convert_LDADD. +rmiregistry_LDADD = -L$(here)/.libs libgcj.la ## Depend on the spec file to make sure it is up to date before ## linking this program. rmiregistry_DEPENDENCIES = libgcj.la libgcj.spec --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=toplev-solaris-libjava.patch Content-length: 1472 Index: ChangeLog from Alexandre Oliva * configure.in: Revert 2002-04-18's patch; fixed in libjava. Index: configure.in =================================================================== RCS file: /cvs/gcc/egcs/configure.in,v retrieving revision 1.119.2.12 diff -u -p -r1.119.2.12 configure.in --- configure.in 26 Apr 2002 21:40:53 -0000 1.119.2.12 +++ configure.in 3 May 2002 02:15:00 -0000 @@ -1379,33 +1379,6 @@ case "${host}" in ;; esac -# If we're building libgcj and we're using the Solaris 2.8 linker, -# then we check for a known problem. -if test "x${libgcj}" = x && test "${with_gnu_ld}" != yes \ - && test "${is_cross_compiler}" = no; then - - case "${host}" in - sparc-*-solaris2.8) - if test "$libdir" = '${exec_prefix}/lib';then - if test "$exec_prefix" = '$(prefix)'; then - tlibdir="$prefix/lib" - else - tlibdir="$exec_prefix/lib" - fi - else - tlibdir="$libdir" - fi - if test -f $tlibdir/libgcj.la; then - echo "*** You've already installed libgcj in $tlibdir." 1>&2 - echo " This causes problems when rebuilding libgcj with the Solaris 2.8 linker." 1>&2 - echo " Either disable the libgcj build, or remove the" 1>&2 - echo " already-installed libgcj files." 1>&2 - exit 1 - fi - ;; - esac -fi - # If --enable-shared was set, we must set LD_LIBRARY_PATH so that the # binutils tools will find libbfd.so. if [ "${shared}" = "yes" ]; then --=-=-= Content-length: 289 -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist Professional serial bug killer --=-=-=--