svn commit: r214647 - in projects/binutils-2.17: sys/boot/i386/efi sys/conf usr.sbin/ndiscvt

Dimitry Andric dim at FreeBSD.org
Tue Nov 2 09:52:03 UTC 2010


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'.


More information about the svn-src-projects mailing list