Bug 223249 - sys-devel/binutils-2.18{,-r1} does not recognize SYSV objects on freebsd
Bug#: 223249 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: FreeBSD Status: RESOLVED Severity: major Priority: P2
Resolution: FIXED Assigned To: toolchain@gentoo.org Reported By: aballier@gentoo.org
Component: Applications
URL:  http://sourceware.org/bugzilla/show_bug.cgi?id=4424
Summary: sys-devel/binutils-2.18{,-r1} does not recognize SYSV objects on freebsd
Keywords:  
Status Whiteboard: 
Opened: 2008-05-22 19:07 0000
Description:   Opened: 2008-05-22 19:07 0000
So... I decided to tackle the reason why we were slacking on bsd for binutils.

Basically, 2.18 isn't keyworded because we cannot build the kernel with it.
The reason is that it needs to link SYSV object which 2.18 does not recognize;
snapshots of binutils are fixed in that regard:

Changes from binutils 2.18.50.0.2:
[...]
2. Support link in Linux object files on FreeBSD.  PR 4424.
[...]

The error is the same as on:
http://sourceware.org/bugzilla/show_bug.cgi?id=5179


The original bug report is at:
http://sourceware.org/bugzilla/show_bug.cgi?id=4424

The discussion:
http://sourceware.org/ml/binutils/2007-10/msg00215.html

And the final patch:
http://sourceware.org/ml/binutils/2007-10/msg00262.html

I've backported it and that would allow us to rekeyword 2.18 if it could be
merged, I'll attach the patch in a minute.

------- Comment #1 From Alexis Ballier 2008-05-22 19:09:30 0000 -------
Created an attachment (id=153975) [details]
backported patch

If that is acceptable to merge in 2.18, please add ~x86-fbsd keyword to it
while adding the patch or poke me for doing it. I'll test/get somebody to test
sparc-fbsd later.

------- Comment #2 From Jose Quinteiro 2008-05-24 23:26:08 0000 -------
Patch applied cleanly and yielded a working linker for me.  I emerged and ran
emacs to test it.

It's cool that all you have to do is drop the patch file in
/etc/portage/patches/i686-gentoo-freebsd6.2/sys-devel/binutils-2.18 and it will
be automagically applied when you emerge binutils.

------- Comment #3 From SpanKY 2008-06-23 02:06:18 0000 -------
patch added to binutils-2.18-r2