[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [mips java patch] add -mxgot for libjava convenience libraries on mips/mipsel-linux



Matthias Klose wrote:
> The following patch add's -mxgot to the cflags of the convenience
> libraries as it is down for the libjava library itself on
> mips/mipsel-linux. Without this patch I see many 'relocation
> truncated to fit: R_MIPS_CALL16' failures when linking the convenience
> libs, with this patch I'm down to one file/bug in glibc when linking
> libgcj:
> 
> /home/doko/gcc/gcc-snapshot-20041003/build/gcc/xgcc -shared-libgcc -B/home/doko/gcc/gcc-snapshot-20041003/build/gcc/ -nostdinc++ -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src/.libs -B/usr/lib/gcc-snapshot/mipsel-linux-gnu/bin/ -B/usr/lib/gcc-snapshot/mipsel-linux-gnu/lib/ -isystem /usr/lib/gcc-snapshot/mipsel-linux-gnu/include -isystem /usr/lib/gcc-snapshot/mipsel-linux-gnu/sys-include -shared -nostdlib /usr/lib/crti.o /home/doko/gcc/gcc-snapshot-20041003/build/gcc/crtbeginS.o .libs/libgcj.la-2.o -Wl,--whole-archive ../libffi/.libs/libffi_convenience.a ../boehm-gc/.libs/libgcjgc_convenience.a ./libltdl/.libs/libltdlc.a -Wl,--no-whole-archive  -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src/.libs -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu
/libjava ../libffi/.libs/libffi_convenience.a ../boehm-gc/.libs/libgcjgc_convenience.a -lpthread ./libltdl/.libs/libltdlc.a -ldl -lz -L/home/doko/gcc/gcc-snapshot-20041003/build/gcc -lgcc_s -lc -lgcc_s    /home/doko/gcc/gcc-snapshot-20041003/build/gcc/crtendS.o /usr/lib/crtn.o  -Wl,-soname -Wl,libgcj.so.6 -o .libs/libgcj.so.6.0.0
> /usr/lib/libc_nonshared.a(atexit.oS)(.text+0x38): In function `atexit':
> : relocation truncated to fit: R_MIPS_CALL16 __cxa_atexit@@GLIBC_2.2
> collect2: ld returned 1 exit status
> make[2]: *** [libgcj.la] Error 1
> 
> 
> Ok to checkin?
> 
> 
> 2004-10-05  Matthias Klose  <doko@debian.org>
> 
> boehm-gc/ChangeLog
> 
> 	* configure.host: for mips*-*-linux* add -mxgot to gc_cflags
> 
> libffi/ChangeLog
> 
> 	* configure.ac: Set libffi_cflags, substitute LIBFFI_CFLAGS.
> 	* configure.host: for mips*-*-linux* add -mxgot to gc_cflags
> 	* Makefile.am (AM_CFLAGS, AM_CCASFLAGS): Add @LIBFFI_CFLAGS@.
> 	* Makefile.in: Regenerate.
> 	* configure: Regenerate.
> 
> libjava/ChangeLog:
> 
> 	* libltdl/Makefile.am (AM_CFLAGS): Add @LIBLTDL_CFLAGS@.
> 	* libltdl/Makefile.in: Regenerate.
> 	* libltdl/configure.ac: Set libltdl_cflags, substitute LIBLTDL_CFLAGS.
> 	* libltdl/configure: Regenerate.
> 
> 

I just did a complete cross build of today's CVS with this configure command:

#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host dl.hq.avtrex.com:
#
# ../gccmaincvs/gcc/configure   --host=i686-pc-linux-gnu
--target=mipsel-linux --with-headers=/home/test35/mipsel-linux/include
--with-arch=mips32 --with-float=soft --prefix=/home/test35
--with-gcc-version-trigger=/newdisk/programs/gccmaincvs/gcc/gcc/version.c
--enable-languages=c,c++,java
.
.
.

and

$ mipsel-linux-ld --version
GNU ld version 2.15

I get no GOT overflow.  The build completes without errors.

I still think you have a problem with your binutils configuration.  As I
said in previous messages, I would rather not use -mxgot unless absolutely
necessary.  And I don't think it is necessary in the places you added it.

I am not a "Maintainer" so I cannot approve or disapprove, but these are my
$0.02.

David Daney.








Reply to: