Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jul 2014 21:28:38 +0100 (BST)
From:      Anton Shterenlikht <mexas@bris.ac.uk>
To:        andreast-list@fgznet.ch, freebsd-arm@freebsd.org, george+freebsd@m5p.com,  mexas@bris.ac.uk
Subject:   Re: [Bug 175605] devel/binutils: please fix build binutils-2.23.1 in raspberry pi
Message-ID:  <201407122028.s6CKSch3098048@mech-cluster241.men.bris.ac.uk>
In-Reply-To: <53C19400.6050404@fgznet.ch>

next in thread | previous in thread | raw e-mail | index | archive | help
>From andreast-list@fgznet.ch Sat Jul 12 21:07:05 2014
>On 12.07.14 21:43, Anton Shterenlikht wrote:
>>>> --- Comment #6 from mexas@bris.ac.uk ---
>>>> Forgot to say that this was with Andreas Tobler's patchset.
>>>> Also, it segfaults with the OS default ld too:
>>>>
>>>> $ cat z.c
>>>> #include <stdio.h>
>>>> int main(int argc, char **argv)
>>>> {
>>>>           printf("mumu\n");
>>>>           return 0;
>>>> }
>>>> $ cc -c z.c -Wall
>>>> $ /usr/local/bin/ld -o z /usr/lib/crt1.o /usr/lib/crti.o z.o -lc
>>>> $ ldd z
>>>> z:
>>>>           libc.so.7 => /lib/libc.so.7 (0x2003c000)
>>>> $ file z
>>>> z: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses
>>>> shared libs), for FreBSD 10.0 (1000710), not stripped
>>>> $ ./z
>>>> Segmentation fault (core dumped)
>>>> $ /usr/bin/ld -o z /usr/lib/crt1.o /usr/lib/crti.o z.o -lc
>>>> $ ldd z
>>>> z:
>>>>           libc.so.7 => /lib/libc.so.7 (0x2003c000)
>>>> $ file z
>>>> z: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses
>>>> shared libs), for FreBSD 10.0 (1000710), not stripped
>>>> $ ./z
>>>> Segmentation fault (core dumped)
>>>> $
>>>>
>>> Why are you using this strange invocation of the linker?  If I run
>>> "cc -v -o z z.c", here is how it invokes ld:
>>>
>>>   "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1
>>> --hash-style=both --enable-new-dtags -o z /usr/lib/crt1.o
>>> /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib /tmp/z-9530c3.o -lgcc
>>> --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s
>>> --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o
>>>
>>> The resulting program runs without difficulty.          -- George
>>
>> well, I copied my invocation from:
>> http://people.freebsd.org/~rene/patches/binutils-rpi-bug.txt
>>
>> but you are right. I have now did just the same
>> using /usr/local/bin/ld, and the executable worked.
>>
>> So probably Andreas Tobler's patchset should
>> be committed?
>>
>> I'm building lang/gcc right now, will see how it goes.
>
>You can save the time for gcc. Nothing else than the system gcc works.

Sorry, I still don't get you.
What is the "system gcc"?
I thought the system C compiler is clang, in 10-stable and above.

I'm not intersted in gcc itself.
I just want to build xorg-server.

Thanks

Anton




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