--enable-targets=all breaks ranlib

Mike Frysinger vapier@gentoo.org
Wed Sep 12 02:13:00 GMT 2007


is this a known feature ?  if i build up binutils on a multilib x86_64 system 
without --enable-targets=all, i get a ranlib that works on 32bit or 64bit 
archives.  if i utilize --enable-targets=all, ranlib is unable to do its 
thing properly which makes ld angry.  if it's a known defect, i'll let it 
slide, but if it's supposed to work i can just open a bug report ...

consider:
$ echo 'int foo(){return 0;}' > foo.c
$ echo 'int main(){return foo();}' > test.c
$ gcc -m32 -c foo.c
$ ar rc libfoo.a foo.o
$ ranlib libfoo.a
$ gcc -m32 test.c libfoo.a

normally this would work fine ... but with --enable-targets=all, ld barfs:
libfoo.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status

and indeed, running `md5sum` on the libfoo.a before and after the call to 
ranlib shows no modifications were actually made
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
URL: <https://sourceware.org/pipermail/binutils/attachments/20070912/0f7be899/attachment.sig>


More information about the Binutils mailing list