From owner-freebsd-arm@FreeBSD.ORG Mon Jul 14 20:46:14 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 44E77DB for ; Mon, 14 Jul 2014 20:46:14 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 08F2321FB for ; Mon, 14 Jul 2014 20:46:13 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id at20so3655674iec.25 for ; Mon, 14 Jul 2014 13:46:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=szQc4uvD6W1idWwmsJDqDZVR4PJld3xN7Rj70nSlRfM=; b=NkACqplzBxuMlqOfW5FVHAsaUzdZmSynLX+nAI3VdlFtAN+nssExGN9MVcEr55zvsX TPSU0QPQjekGY3H/Mw39vvpuCG5gGdvMevH+lm0qYjWcDiOz6AvPgLbZAGnebZNhdTZH Cc8i2YLXnNJ3jMds8R+IVxV0gcTh+r/CvQHhE0hIzMfjwoxnlKFeC5mkMEicNRub/67/ LvYHzFlw5OHZk+l9XozfZOnCA3SQVwui7g/xyezA+AlF98EXEBLYakZlmBTh+n0YDoyg C8HQ1K94lMP/QnN6uxSZWZJkQ5fxupYLQFllv9kUjtTeFntX2HxRQCztGtzU8UxPkM0D zskg== X-Gm-Message-State: ALoCoQk0/fDMtpq/jTbFHjDefZHysRzaSiBMnjHLe/BmFKXNEKAGxoS6D/SdvLF0EQRFJcylJCag X-Received: by 10.50.142.97 with SMTP id rv1mr581083igb.13.1405370766894; Mon, 14 Jul 2014 13:46:06 -0700 (PDT) Received: from bsdimp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id qa4sm27900937igb.10.2014.07.14.13.46.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Jul 2014 13:46:06 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_75F2E4A3-904E-4D57-982E-8A4D389BE5EB"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: [Bug 175605] devel/binutils: please fix build binutils-2.23.1 in raspberry pi From: Warner Losh In-Reply-To: <1405370509.1312.11.camel@revolution.hippie.lan> Date: Mon, 14 Jul 2014 14:45:40 -0600 Message-Id: <9C3614F7-C311-453F-B0E7-BE0312766640@bsdimp.com> References: <201407121943.s6CJhT2p097909@mech-cluster241.men.bris.ac.uk> <53C19400.6050404@fgznet.ch> <1405370509.1312.11.camel@revolution.hippie.lan> To: Ian Lepore X-Mailer: Apple Mail (2.1878.6) Cc: freebsd-arm@freebsd.org 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: Mon, 14 Jul 2014 20:46:14 -0000 --Apple-Mail=_75F2E4A3-904E-4D57-982E-8A4D389BE5EB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Jul 14, 2014, at 2:41 PM, Ian Lepore wrote: > On Sat, 2014-07-12 at 22:01 +0200, Andreas Tobler wrote: >> 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: >>>>>=20 >>>>> $ 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 =3D> /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 =3D> /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) >>>>> $ >>>>>=20 >>>> 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: >>>>=20 >>>> "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 >>>> --hash-style=3Dboth --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 >>>>=20 >>>> The resulting program runs without difficulty. -- George >>>=20 >>> well, I copied my invocation from: >>> http://people.freebsd.org/~rene/patches/binutils-rpi-bug.txt >>>=20 >>> but you are right. I have now did just the same >>> using /usr/local/bin/ld, and the executable worked. >>>=20 >>> So probably Andreas Tobler's patchset should >>> be committed? >>>=20 >>> I'm building lang/gcc right now, will see how it goes. >>=20 >> You can save the time for gcc. Nothing else than the system gcc = works. >> I do some work on gcc-4.10 and it is hairy. >> I can bootstrap gcc-4.10 but I have some issues with tls which blocks = me=20 >> to come out with my patch set. The overall view is good.=20 >=20 >=20 >> I even have C++ exceptions working with EABI. >=20 > We are actively working on this at $work (using clang, not gcc) and = I'd > love to see whatever patches you've got. I was about to import = netbsd's > find_exidx.c for ld-elf.so, but if you've already done it I won't > bother. There are other aspects of it still not working for us, so > maybe you've solved things we're still working on. >=20 >>=20 >> Also, the binutils patch set is not satisfying for me. I do not have=20= >> feedback for arm*b nor for arm* < FreeBSD 10.0. >>=20 >=20 > I doubt you'll ever get feedback for either of these. We only have 2 = or > 3 users who have hardware and are even trying to use armeb these days. > The hardware is old and rare. -current only became usable again on > armeb in the past week or two. >=20 > As for arm on < 10, there's not much support. and not many active = users. > It's not an official project policy or anything, but in effect we've > abandoned active support on anything older than 10 due to lack of > resources. We use 8.2 with arm at work, and all the patches we've > generated there over the years have been merged to 8, 10, and 11. =20 >=20 > 9.x on arm has always been a nonexistant thing for me. I don't know = of > anybody even trying to use it, based on the traffic on irc and mailing > lists. I have a 9.x arm-based (atmel) dhcpd and other network services server = that I run since I couldn=92t get the 10.x MCI driver on atmel to work on the = newer SAM9 SoCs. All the optimizations for it work great on the AT91RM9200, but = break newer ones. That said, there are a number of bumps in the 9.x support in arm. :( = I=92ve worked around them, but most of the issues have since been fixed in -current = and 10. Warner --Apple-Mail=_75F2E4A3-904E-4D57-982E-8A4D389BE5EB Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJTxEF0AAoJEGwc0Sh9sBEAaawP/A9RGw9KnScxSqmJLPnqWBeL CsbNdx/8pgiz74UOnYWK87iHcJ0KRd9emNHl9eqAwfh12oxSiPPPIeeE1GgtOxJg HB+1YIcSLsbVLwaNCPZRxtYusU1ECmKYp9GNL9prjXGPaX4gjJopaCMuzsMVTIcd p6O6apkdP1yPJZZi23/5IWzyz+VfIs8rjFWDg5LNHW0uj6PttFI+5YkLNQdhf710 OMBexVFIm+6BcHguUB+wUCYegEhjuswv7vtIc0JpjMIlthoU7WFvrVXp3Y5l9wjx oYMjt24MouCgp5Rhg8i6eo2N3tqmP+R0eaHjh4/iSd6j6k0nbjSjPkJDPmdW/b3v N/FXAmm6c4Mft2YMmGZZqJve8/xgOby4lFKDR9if6gF2Bv74vAGEduJpYFS/o7Hi Wvupp3KyKjKPutokzb93IgmEjl0JrulDAAZe+dGh3BM0ltLupNdg4e3VRk8IWhQQ iuy1UMjp29gCstZ86JDLRmh1ONJ2okTHGh2UihNYuskx49VMCYIfiYjOXHpAwFTk RFQfba+XohOQjF8tGWmxnibaQ/CD2NNdDJncUNw6S/RLLavn12GzyGCheGprZTOM AJFJzLFoYC2+du194+SPx75iNFFrlDL5em6XtLBMFwQTvsMtze/9DUmcK8Dh6aHO YAV0VV3lb6DfF2kGm1Pl =IDjU -----END PGP SIGNATURE----- --Apple-Mail=_75F2E4A3-904E-4D57-982E-8A4D389BE5EB--