From owner-freebsd-arm@FreeBSD.ORG Sat Jul 12 20:39:15 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 819B3935 for ; Sat, 12 Jul 2014 20:39:15 +0000 (UTC) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 109B62193 for ; Sat, 12 Jul 2014 20:39:13 +0000 (UTC) Received: from [192.168.225.11] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id s6CKd8fA039060; Sat, 12 Jul 2014 22:39:09 +0200 (CEST) (envelope-from andreast-list@fgznet.ch) Message-ID: <53C19CEC.7080101@fgznet.ch> Date: Sat, 12 Jul 2014 22:39:08 +0200 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: mexas@bris.ac.uk, freebsd-arm@freebsd.org, george+freebsd@m5p.com Subject: Re: [Bug 175605] devel/binutils: please fix build binutils-2.23.1 in raspberry pi References: <201407122028.s6CKSch3098048@mech-cluster241.men.bris.ac.uk> In-Reply-To: <201407122028.s6CKSch3098048@mech-cluster241.men.bris.ac.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 20:39:15 -0000 On 12.07.14 22:28, Anton Shterenlikht wrote: >>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 >>>>> 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"? Hm, we have clang or gcc for CC. When I talk about 'system gcc' I mean: [andreast@wandquad] /build/gcc/objdir_armv6/> gcc -v Using built-in specs. Target: armv6-undermydesk-freebsd Configured with: FreeBSD/armv6 system compiler Thread model: posix gcc version 4.2.1 20070831 patched [FreeBSD] Currently I have no clang installed since it does not build/bootstrap gcc-4.10. This is my game. > I thought the system C compiler is clang, in 10-stable and above. It can either be gcc or clang. > I'm not intersted in gcc itself. :) nobody seems and nobody is happy with a half backed clang ;) > I just want to build xorg-server. No experience here, sorry. Andreas