This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Using -fPIC for libiberty on s390x


On Monday 05 December 2011 03:46:55 Martin Schwidefsky wrote:
> On Mon, 5 Dec 2011 02:02:10 -0500 Mike Frysinger wrote:
> > On Saturday 23 July 2011 06:51:53 Aurelien Jarno wrote:
> > > Building binutils on s390x leads to relocation issues:
> > > | /home/aurel32/binutils/bfd/../libiberty/pic/libiberty.a(hashtab.o):
> > > | In function `htab_create':
> > > | /home/aurel32/binutils/libiberty/../../libiberty/hashtab.c:408:(.text
> > > | +0x 5e4): relocation truncated to fit: R_390_GOT12 against symbol
> > > | `xcalloc' defined in .text section in
> > > 
> > > Using -fPIC instead of -fpic there fixes the issue.
> > > 
> > > 2011-07-23  Aurelien Jarno  <aurelien@aurel32.net>
> > > 
> > > 	* configure.ac: Use -fPIC instead of -fpic on s390x.
> > 
> > i've run into this issue on Gentoo systems and binutils-2.22.  but now
> > with all the pic code being unified with gcc, we need to do:
> > 
> > --- a/config/picflag.m4
> > +++ b/config/picflag.m4
> > @@ -51,6 +51,9 @@ case "${$2}" in
> >      m68k-*-*)
> >  	$1=-fpic
> >  	;;
> > +    s390x*-*-*)
> > +	$1=-fPIC
> > +	;;
> >      s390*-*-*)
> >  	$1=-fpic
> >  	;;
> 
> Whenever you see a R_390_GOT12 relocation truncated to fit, the correct
> solution is to switch from -fpic to -fPIC. I assume that the picflag.m4
> replace the old configure.ac solution, no?

yeah, seems all the picflag logic has been consolidated in picflag.m4 in the gcc 
project.  i can send a patch there if you want.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]