Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 138475 - Support for elf32-i386-freebsd on x86_64 platform in binutils
Summary: Support for elf32-i386-freebsd on x86_64 platform in binutils
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: AMD64 FreeBSD
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://sourceware.org/bugzilla/show_b...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-29 06:47 UTC by Victor Roman Archidona
Modified: 2006-09-16 14:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The patch which fixes the problem (x86_64-elf32-freebsd.patch,524 bytes, patch)
2006-06-29 06:48 UTC, Victor Roman Archidona
Details | Diff
More precise patch (new-binutils.patch,505 bytes, patch)
2006-07-08 11:56 UTC, Victor Roman Archidona
Details | Diff
elf64-x86-64-freebsd and elf32-i386-freebsd support when building binutils (fix-bfd.patch,5.25 KB, patch)
2006-07-15 00:39 UTC, Victor Roman Archidona
Details | Diff
Last version of the patch (fix-bfd.patch,5.23 KB, patch)
2006-07-15 00:49 UTC, Victor Roman Archidona
Details | Diff
binutils bfd,gas and ld patch (binutils-x86-64-freebsd.patch,4.42 KB, patch)
2006-07-17 22:05 UTC, Victor Roman Archidona
Details | Diff
Last patch revision (last-patch.patch,4.42 KB, patch)
2006-07-20 13:22 UTC, Victor Roman Archidona
Details | Diff
Patch backport for binutils-2.16.1 (binutils-2.16.1-fbsd.patch,5.90 KB, patch)
2006-09-15 10:25 UTC, Victor Roman Archidona
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Roman Archidona 2006-06-29 06:47:04 UTC
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.
Comment 1 Victor Roman Archidona 2006-06-29 06:48:34 UTC
Created attachment 90425 [details, diff]
The patch which fixes the problem
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-06-29 06:54:47 UTC
Mike can you take a look to this? (and judge its likelyness to be applied upstream).
Comment 3 SpanKY gentoo-dev 2006-06-29 15:12:40 UTC
looks fine to me, but i havent actually tested it :p
Comment 4 Victor Roman Archidona 2006-07-08 11:56:34 UTC
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".
Comment 5 Victor Roman Archidona 2006-07-15 00:39:05 UTC
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
Comment 6 Victor Roman Archidona 2006-07-15 00:49:21 UTC
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.
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-07-15 00:55:05 UTC
Assigning to toolchain guys now :)
Comment 8 SpanKY gentoo-dev 2006-07-15 02:02:04 UTC
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
Comment 9 Victor Roman Archidona 2006-07-17 22:05:17 UTC
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.
Comment 10 SpanKY gentoo-dev 2006-07-17 22:21:34 UTC
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 :)
Comment 11 Victor Roman Archidona 2006-07-20 13:22:29 UTC
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"
Comment 12 SpanKY gentoo-dev 2006-08-08 21:14:59 UTC
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 ?
Comment 13 Victor Roman Archidona 2006-08-08 21:20:44 UTC
I would like this applied to binutils-2.17 for its use rather than using CVS snapshots.
Comment 14 SpanKY gentoo-dev 2006-08-08 22:22:33 UTC
if you could backport what was applied to upstream cvs to the 2.17 release, that'd expedite things ;)
Comment 15 Victor Roman Archidona 2006-09-15 10:25:34 UTC
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.
Comment 16 SpanKY gentoo-dev 2006-09-16 14:53:38 UTC
cleaned up your patch and added to 2.16.1-r3