Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Nov 2010 10:52:07 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Roman Divacky <rdivacky@FreeBSD.org>
Cc:        svn-src-projects@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r214647 - in projects/binutils-2.17: sys/boot/i386/efi sys/conf usr.sbin/ndiscvt
Message-ID:  <4CCFDF47.4060400@FreeBSD.org>
In-Reply-To: <20101102081424.GA57515@freebsd.org>
References:  <201011012020.oA1KKVq5087117@svn.freebsd.org> <20101102081424.GA57515@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2010-11-02 09:14, Roman Divacky wrote:
> On Mon, Nov 01, 2010 at 08:20:31PM +0000, Dimitry Andric wrote:
>> Author: dim
>> Date: Mon Nov  1 20:20:31 2010
>> New Revision: 214647
>> URL: http://svn.freebsd.org/changeset/base/214647
>>
>> Log:
>>    Use new output format 'elf64-x86-64-freebsd' instead of 'elf64-x86-64',
>>    and similarly 'elf64-sparc-freebsd' instead of 'elf64-sparc'.
>
> is there any reason why we do this?

Yes, the reason is that newer binutils work this way, and otherwise they
will not work, and complain they cannot find the correct BFD at runtime.
In newer binutils, 'elf64-x86-64' is generic, and 'elf-x86-64-freebsd'
is freebsd-specific.

Previously we needed a hack (elf-fbsd-brand.c) to bolt on detection of
FreeBSD ELF files (using the OSABI field), but that hack is no longer
needed, except for ia64.  I may even fix that one, so we can drop the
hack. :)


> this effectively prevents 3rd party
> compilers (their driver) from working out of the box on freebsd..
> as they expect the format to be elfX-FOO wihtout the -freebsd suffix

Then they should be adapted to cope with newer binutils than from >3
years ago. :)  E.g. something like:

   if platform==FreeBSD then strcat(output_format, "-freebsd")

Also, for i386 the output format has always been elf-i386-freebsd, so
this change only makes it more consistent, really.  The same goes for
sparc64, where the output format name has been changed from (generic)
'elf64-sparc' to 'elf64-sparc-freebsd'.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CCFDF47.4060400>