public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@redhat.com>
To: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>,
	gcc-patches@gcc.gnu.org, java@gcc.gnu.org, mark@codesourcery.com
Cc: "David S. Miller" <davem@redhat.com>,
	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)
Date: Thu, 02 May 2002 19:22:00 -0000	[thread overview]
Message-ID: <orhelqrmy2.fsf@free.redhat.lsd.ic.unicamp.br> (raw)
In-Reply-To: <15569.46538.150141.211082@xayide.TechFak.Uni-Bielefeld.DE>

[-- Attachment #1: Type: text/plain, Size: 635 bytes --]

On May  2, 2002, Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> 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?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: libjava-solaris.patch --]
[-- Type: text/x-patch, Size: 3990 bytes --]

Index: libjava/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	Suggested by Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
	* 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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: toplev-solaris-libjava.patch --]
[-- Type: text/x-patch, Size: 1472 bytes --]

Index: ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* 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

[-- Attachment #4: Type: text/plain, Size: 289 bytes --]


-- 
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

       reply	other threads:[~2002-05-03  2:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20020502135546.A5069@redhat.com>
     [not found] ` <15569.45674.297203.299627@xayide.TechFak.Uni-Bielefeld.DE>
     [not found]   ` <20020502144819.A5145@redhat.com>
     [not found]     ` <20020502.143920.20510740.davem@redhat.com>
     [not found]       ` <15569.46538.150141.211082@xayide.TechFak.Uni-Bielefeld.DE>
2002-05-02 19:22         ` Alexandre Oliva [this message]
2002-05-03  0:45           ` Mark Mitchell
2002-05-03 11:27             ` Alexandre Oliva
2002-05-03  4:05           ` Rainer Orth
2002-05-03 21:56           ` Alexandre Oliva
2002-05-03 22:04             ` David S. Miller
2002-05-03 22:22               ` Mark Mitchell
2002-05-03 22:23               ` Alexandre Oliva
2002-05-03 22:28                 ` David S. Miller
2002-05-03 22:41                   ` Alexandre Oliva
     [not found] <yddpu0ex1zc.fsf@xayide.TechFak.Uni-Bielefeld.DE>
2002-05-02  9:36 ` Gerald Pfeifer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=orhelqrmy2.fsf@free.redhat.lsd.ic.unicamp.br \
    --to=aoliva@redhat.com \
    --cc=Joe.Buck@synopsys.com \
    --cc=davem@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=glebourgeois@amadeus.net \
    --cc=java@gcc.gnu.org \
    --cc=mark@codesourcery.com \
    --cc=ro@TechFak.Uni-Bielefeld.DE \
    --cc=rth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).