Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Dec 2015 22:21:33 +0100
From:      Andreas Tobler <andreast-list@fgznet.ch>
To:        Konstantin Belousov <kostikbel@gmail.com>, Mark Millard <markmi@dsl-only.net>
Cc:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: powerpc64 11.0-CURRENT's clang binds -m32 -mcpu=powerpc a.out to /libexec/ld-elf.so.1
Message-ID:  <5671D5DD.9090808@fgznet.ch>
In-Reply-To: <20151215123640.GG3625@kib.kiev.ua>
References:  <894D2513-6DE7-4E31-87A5-0529ECDF336C@dsl-only.net> <20151215123640.GG3625@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On 15.12.15 13:36, Konstantin Belousov wrote:
> On Mon, Dec 14, 2015 at 11:06:51PM -0800, Mark Millard wrote:
>> # more main.c int main() { return 0; }
>>
>>
>>
>> # ls -l `which cc` -r-xr-xr-x  7 root  wheel  54137976 Dec 14 00:06
>> /usr/bin/cc
>>
>> # cc --version FreeBSD clang version 3.7.0 (tags/RELEASE_370/final
>> 246257) 20150906 Target: powerpc64-unknown-freebsd11.0 Thread
>> model: posix
>>
>> # cc -m32 -mcpu=powerpc main.c # file a.out a.out: ELF 32-bit MSB
>> executable, PowerPC or cisco 4500, version 1 (FreeBSD), dynamically
>> linked, interpreter /libexec/ld-elf.so.1, FreeBSD-style, for
>> FreeBSD 11.0 (1100091), not stripped
>>
>>
>>
>> By contrast powerpc64-gcc binds the a.out produced to
>> /libexec/ld-elf32.so.1 instead:
>>
>> # ls -l `which gcc` lrwxr-xr-x  1 root  wheel  48 Dec  5 05:38
>> /usr/bin/gcc -> /usr/local/bin/powerpc64-portbld-freebsd11.0-gcc
>>
>> # gcc --version gcc (FreeBSD Ports Collection for powerpc64) 5.2.0
>> Copyright (C) 2015 Free Software Foundation, Inc. This is free
>> software; see the source for copying conditions.  There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
>> PURPOSE.
>>
>> # gcc -m32 -mcpu=powerpc main.c # file a.out a.out: ELF 32-bit MSB
>> executable, PowerPC or cisco 4500, version 1 (FreeBSD), dynamically
>> linked, interpreter /libexec/ld-elf32.so.1, FreeBSD-style, for
>> FreeBSD 11.0 (1100091), not stripped
>>
> This is a bug in gcc, most likely in the spec file. All FreeBSD ABIs
> use either /libexec/ld-elf.so.1 or (for older versions)
> /usr/libexec/ld-elf.so.1.

This is mine. Taken.

Andreas



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5671D5DD.9090808>