sys-devel/binutils by default in x86_64 targets under FreeBSD doesn't add support for "elf32-i386-freebsd" BFD target, which is needed by sys-freebsd/freebsd-lib.
Created attachment 90425 [details, diff] The patch which fixes the problem
Mike can you take a look to this? (and judge its likelyness to be applied upstream).
looks fine to me, but i havent actually tested it :p
Created attachment 91228 [details, diff] More precise patch This patch only compiles BFD "elf32-i386-freebsd" (the only needed) instead both "elf32-i386" AND "elf32-i386-freebsd". With this the nm program has no warnings about "ambiguous target".
Created attachment 91757 [details, diff] elf64-x86-64-freebsd and elf32-i386-freebsd support when building binutils This patch came from SpanKY. He posted it in binutils mailing list, URL: http://sources.redhat.com/ml/binutils/2006-07/msg00192.html
Created attachment 91758 [details, diff] Last version of the patch This is a revised version of the previous one which included "elf64-x86-64" also and isn't needed due we want to use FreeBSD specific targets.
Assigning to toolchain guys now :)
considering that's the first time ive played with bfd/gas, i'd prefer to get some feedback on the binutils list before merging anything :P
Created attachment 92050 [details, diff] binutils bfd,gas and ld patch I modified it a bit to set "elf64-x86-64-freebsd" as default ld output format when using it. The modified patch is attached and the change is in top of it.
when you are ready, we can take it back to the binutils list for submission ... i would just like to have you do some more stage testing first :)
Created attachment 92341 [details, diff] Last patch revision This is the last revision. I used it when building the stage3 that I published in http://amd64-fbsd.unixevil.info/stages/ Also a QEMU disk image with a fully-merged system with the patch applied can be obtained from http://amd64-fbsd.unixevil.info/vm_images/gfbsd-amd64-qemu_2006-07-20.img.bz2 BFD names are: - elf32-i386-freebsd; AND - elf64-x86-64-freebsd Default format output is "elf64-x86-64-freebsd". This was done modyfing "ld/emulparams/elf_x86_64_fbsd.sh"
upstream has merged this ... you guys want me to add this to binutils-2.17 or are you ok with using the latest cvs snapshot of binutils ?
I would like this applied to binutils-2.17 for its use rather than using CVS snapshots.
if you could backport what was applied to upstream cvs to the 2.17 release, that'd expedite things ;)
Created attachment 97057 [details, diff] Patch backport for binutils-2.16.1 This patch can be applied with binutils-2.16.1 version without problems. I'm using it for new development and was backported for the previous one for binutils-2.17.
cleaned up your patch and added to 2.16.1-r3