public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/44415]  New: [4.6 regression] gmp multilib support broke bootstrap with static libgmp
@ 2010-06-04 12:41 ro at gcc dot gnu dot org
  2010-06-04 12:49 ` [Bug libgcj/44415] " rguenth at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: ro at gcc dot gnu dot org @ 2010-06-04 12:41 UTC (permalink / raw)
  To: java-prs

The recent introduction of this patch

2010-05-29  Mike Stump  <mikestump@comcast.net>

        * configure.ac: Add multilib support for gmp.  Proper -I and -L
        flags for gmp are added.

broke bootstrap on i386-pc-solaris2.11 and almost certainly at least all
Solaris 2
platforms with a static libgmp:

/bin/ksh ../../../libtool --tag=CC   --mode=link
/vol/gcc/obj/gcc-4.6.0-20100602/11-gcc/./gcc/xgcc
-B/vol/gcc/obj/gcc-4.6.0-20100602/11-gcc/./gcc/
-B/vol/gcc/i386-pc-solaris2.11/bin/ -B/vol/gcc/i386-pc-solaris2.11/lib/
-isystem /vol/gcc/i386-pc-solaris2.11/include -isystem
/vol/gcc/i386-pc-solaris2.11/sys-include    -W -Wall -Wmissing-declarations
-Wwrite-strings -Wmissing-prototypes -Wno-long-long  -I/vol/gcc/include  -g -O2
-module -version-info 0:0:0 -no-undefined -L/vol/gcc/lib -lgmp -avoid-version 
-o libjavamath.la -rpath /vol/gcc/lib/gcj-4.6.0-11 gnu_java_math_GMP.lo
../../../native/jni/classpath/jcl.lo -lsocket -lnsl 
libtool: link: /vol/gcc/obj/gcc-4.6.0-20100602/11-gcc/./gcc/xgcc
-B/vol/gcc/obj/gcc-4.6.0-20100602/11-gcc/./gcc/
-B/vol/gcc/i386-pc-solaris2.11/bin/ -B/vol/gcc/i386-pc-solaris2.11/lib/
-isystem /vol/gcc/i386-pc-solaris2.11/include -isystem
/vol/gcc/i386-pc-solaris2.11/sys-include    -shared -Wl,-z -Wl,text -Wl,-h
-Wl,libjavamath.so -o .libs/libjavamath.so  .libs/gnu_java_math_GMP.o
../../../native/jni/classpath/.libs/jcl.o   -L/vol/gcc/lib
/vol/gcc/lib/libgmp.a -lsocket -lnsl -lc   
Text relocation remains                         referenced
    against symbol                  offset      in file
.rodata.str1.4 (section)            0x2e       
/vol/gcc/lib/libgmp.a(lt19-get_str.o)
[...]

The static libgmp is usually non-PIC, while we need PIC code to link
libjavamath.so.

It turned out to be remarkably difficult to work around this:

* While gcc on Solaris supports -mimpure-text to allow linking of non-PIC code
  into a shared library, all this does is disable the implicit -z text enabled
  by gcc -shared.  Since libtool passes -z text by itself, this doesn't help.

* Sun ld doesn't allow -z text -z textoff, so I had to resort to edititing
  -z text out of libtool and adding -mimpure-text after the -shared there.

To fix this for real, one needs to build a PIC libgmp.a, which at the very
least
needs to be documented.

Apart from that, the patch has a couple of other problems:

* The ChangeLog entry belongs into classpath/ChangeLog, not libjava/ChangeLog.

* For multilibbed targets, it used to be enough to have libgmp for the default
  multilib.  Now you need libgmp for every multilib, otherwise the facitilies
  between e.g. 32-bit and 64-bit libjavamath.so differ.

* There seems to be no provision to pass in -L and -R flags for the non-default
  multilibs, and neither libtool nor the libjava/classpath make machinery seem
  to support automatically looking in e.g. $libdir/amd64 for 64-bit multilibs.

It seems this needs considerably more work to be complete and useful.


-- 
           Summary: [4.6 regression] gmp multilib support broke bootstrap
                    with static libgmp
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ro at gcc dot gnu dot org
 GCC build triplet: *-*-solaris2.*
  GCC host triplet: *-*-solaris2.*
GCC target triplet: *-*-solaris2.*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44415


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libgcj/44415] [4.6 regression] gmp multilib support broke bootstrap with static libgmp
  2010-06-04 12:41 [Bug libgcj/44415] New: [4.6 regression] gmp multilib support broke bootstrap with static libgmp ro at gcc dot gnu dot org
@ 2010-06-04 12:49 ` rguenth at gcc dot gnu dot org
  2010-06-04 17:48 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-04 12:49 UTC (permalink / raw)
  To: java-prs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.6.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44415


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libgcj/44415] [4.6 regression] gmp multilib support broke bootstrap with static libgmp
  2010-06-04 12:41 [Bug libgcj/44415] New: [4.6 regression] gmp multilib support broke bootstrap with static libgmp ro at gcc dot gnu dot org
  2010-06-04 12:49 ` [Bug libgcj/44415] " rguenth at gcc dot gnu dot org
@ 2010-06-04 17:48 ` pinskia at gcc dot gnu dot org
  2010-06-04 17:49 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-06-04 17:48 UTC (permalink / raw)
  To: java-prs



------- Comment #1 from pinskia at gcc dot gnu dot org  2010-06-04 17:48 -------
First off this is not a regression; I ran into this issue back a couple of
years ago with libjava requiring libgmp.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44415


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libgcj/44415] [4.6 regression] gmp multilib support broke bootstrap with static libgmp
  2010-06-04 12:41 [Bug libgcj/44415] New: [4.6 regression] gmp multilib support broke bootstrap with static libgmp ro at gcc dot gnu dot org
  2010-06-04 12:49 ` [Bug libgcj/44415] " rguenth at gcc dot gnu dot org
  2010-06-04 17:48 ` pinskia at gcc dot gnu dot org
@ 2010-06-04 17:49 ` pinskia at gcc dot gnu dot org
  2010-06-07 14:03 ` ro at CeBiTec dot Uni-Bielefeld dot DE
  2010-08-25 16:44 ` jakub at gcc dot gnu dot org
  4 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-06-04 17:49 UTC (permalink / raw)
  To: java-prs



------- Comment #2 from pinskia at gcc dot gnu dot org  2010-06-04 17:49 -------
See PR 39747.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |39747


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44415


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libgcj/44415] [4.6 regression] gmp multilib support broke bootstrap with static libgmp
  2010-06-04 12:41 [Bug libgcj/44415] New: [4.6 regression] gmp multilib support broke bootstrap with static libgmp ro at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2010-06-04 17:49 ` pinskia at gcc dot gnu dot org
@ 2010-06-07 14:03 ` ro at CeBiTec dot Uni-Bielefeld dot DE
  2010-08-25 16:44 ` jakub at gcc dot gnu dot org
  4 siblings, 0 replies; 8+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld dot DE @ 2010-06-07 14:03 UTC (permalink / raw)
  To: java-prs



------- Comment #3 from ro at CeBiTec dot Uni-Bielefeld dot DE  2010-06-07 14:03 -------
Subject: Re:  [4.6 regression] gmp multilib support broke bootstrap with static
libgmp

> ------- Comment #1 from pinskia at gcc dot gnu dot org  2010-06-04 17:48 -------
> First off this is not a regression; I ran into this issue back a couple of
> years ago with libjava requiring libgmp.

It sure is: you used to be able to bootstrap with a static, non-PIC
libgmp until this change went in, and now bootstrap fails.  If this is
not a regression, what is?

        Rainer


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44415


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libgcj/44415] [4.6 regression] gmp multilib support broke bootstrap with static libgmp
  2010-06-04 12:41 [Bug libgcj/44415] New: [4.6 regression] gmp multilib support broke bootstrap with static libgmp ro at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2010-06-07 14:03 ` ro at CeBiTec dot Uni-Bielefeld dot DE
@ 2010-08-25 16:44 ` jakub at gcc dot gnu dot org
  4 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-08-25 16:44 UTC (permalink / raw)
  To: java-prs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44415


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libgcj/44415] [4.6 regression] gmp multilib support broke bootstrap with static libgmp
       [not found] <bug-44415-8172@http.gcc.gnu.org/bugzilla/>
  2011-01-19 12:01 ` rguenth at gcc dot gnu.org
@ 2011-01-19 18:11 ` mrs at gcc dot gnu.org
  1 sibling, 0 replies; 8+ messages in thread
From: mrs at gcc dot gnu.org @ 2011-01-19 18:11 UTC (permalink / raw)
  To: java-prs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44415

mrs@gcc.gnu.org <mrs at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mrs at gcc dot gnu.org

--- Comment #5 from mrs at gcc dot gnu.org <mrs at gcc dot gnu.org> 2011-01-19 18:10:01 UTC ---
If we are to document bugs, please, let's include a bug number for people to
reference so that they can see when the problem is fixed.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libgcj/44415] [4.6 regression] gmp multilib support broke bootstrap with static libgmp
       [not found] <bug-44415-8172@http.gcc.gnu.org/bugzilla/>
@ 2011-01-19 12:01 ` rguenth at gcc dot gnu.org
  2011-01-19 18:11 ` mrs at gcc dot gnu.org
  1 sibling, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-19 12:01 UTC (permalink / raw)
  To: java-prs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44415

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-19 12:01:02 UTC ---
(In reply to comment #3)
> Subject: Re:  [4.6 regression] gmp multilib support broke bootstrap with static
> libgmp
> 
> > ------- Comment #1 from pinskia at gcc dot gnu dot org  2010-06-04 17:48 -------
> > First off this is not a regression; I ran into this issue back a couple of
> > years ago with libjava requiring libgmp.
> 
> It sure is: you used to be able to bootstrap with a static, non-PIC
> libgmp until this change went in, and now bootstrap fails.  If this is
> not a regression, what is?

How did it then succeed to link libjavamath.so?

Can one of you prepare an install manual patch to say that a PIC libgmp
is required for building libjava?


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-01-19 18:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-04 12:41 [Bug libgcj/44415] New: [4.6 regression] gmp multilib support broke bootstrap with static libgmp ro at gcc dot gnu dot org
2010-06-04 12:49 ` [Bug libgcj/44415] " rguenth at gcc dot gnu dot org
2010-06-04 17:48 ` pinskia at gcc dot gnu dot org
2010-06-04 17:49 ` pinskia at gcc dot gnu dot org
2010-06-07 14:03 ` ro at CeBiTec dot Uni-Bielefeld dot DE
2010-08-25 16:44 ` jakub at gcc dot gnu dot org
     [not found] <bug-44415-8172@http.gcc.gnu.org/bugzilla/>
2011-01-19 12:01 ` rguenth at gcc dot gnu.org
2011-01-19 18:11 ` mrs at gcc dot gnu.org

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