Date: Sat, 11 Aug 2018 17:45:56 -0700 From: Mark Millard <marklmi@yahoo.com> To: Warner Losh <imp@bsdimp.com> Cc: Dimitry Andric <dim@freebsd.org>, "freebsd-toolchain@FreeBSD.org" <freebsd-toolchain@freebsd.org> Subject: Re: Broken arm support in clang now? Message-ID: <230C1E7D-04DB-4E45-8A40-F6B2F5E557E9@yahoo.com> In-Reply-To: <CANCZdfq4NmT6_W9MwSMC8r4fQfxW8fWyh1pOX5snnVLNEvew9A@mail.gmail.com> References: <CANCZdfpmDN-nAkViuEx-tKpPhOdRYX=xNu6s8E2o6F4xC2WPnA@mail.gmail.com> <1880880F-9D9D-47E0-A7A4-5369A3770F89@FreeBSD.org> <CANCZdfpF9ND_k2xvZrsDebsZ07p2RU0Lebp5GDtmxnjdXc=N-A@mail.gmail.com> <A5B46840-B508-4F40-9EFD-50D0439EBAC7@FreeBSD.org> <8B467E75-A6D3-41A5-8EA1-4DDFE0E14CC5@nexustechnology.com> <CANCZdfq4NmT6_W9MwSMC8r4fQfxW8fWyh1pOX5snnVLNEvew9A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[Replying from the intended Email address, rather than the one I accidentally used originally.] On 2018-Aug-11, at 5:05 PM, Warner Losh <imp at bsdimp.com> wrote: > On Sat, Aug 11, 2018 at 1:01 PM, Mark Millard = <mark.millard@nexustechnology.com> wrote: > On 2018-Aug-11, at 11:09 AM, Dimitry Andric <dim at FreeBSD.org> = wrote: > >=20 > > On 11 Aug 2018, at 19:31, Warner Losh <imp at bsdimp.com> wrote: > >>=20 > >> On Sat, Aug 11, 2018, 10:20 AM Dimitry Andric <dim@freebsd.org> = wrote: > >> On 11 Aug 2018, at 16:55, Warner Losh <imp@bsdimp.com> wrote: > >>>=20 > >>> It looks like armv5 clang bogusly uses lld: > >>>=20 > >>> =46rom a 'make buildkernel' of the RT1310 kernel config: > >>>=20 > >>> cc -target arm-gnueabi-freebsd12.0 > > ... > >>> ld: warning: lld uses extended branch encoding, no object with = architecture > >>> supporting feature detected. > >>> ld: warning: lld may use movt/movw, no object with architecture = supporting > >>> feature detected. > > ... >=20 > Did the build get either of the below notices? Both? >=20 > make[1]: "/usr/src/Makefile.inc1" line 341: SYSTEM_COMPILER: = Determined that CC=3Dcc matches the source tree. Not bootstrapping a = cross-compiler. >=20 > This one I have. > =20 > make[1]: "/usr/src/Makefile.inc1" line 346: SYSTEM_LINKER: Determined = that LD=3Dld matches the source tree. Not bootstrapping a cross-linker. >=20 > This one I don't. >=20 > Warner So the system-clang needs to find and use the bootstrap-ld. Interesting. (Hopefully the two distinct builds can not create any mismatches for such mixed use.) I'll note that the original Email listed a cc command for compiling vers.c and the messages about "linking kernel.full": PARTIAL QUOTE cc -target arm-gnueabi-freebsd12.0 --sysroot=3D/usr/home/imp/obj/usr/home/imp/git/head/arm.arm/tmp -B/usr/home/imp/obj/usr/home/imp/git/head/arm.arm/tmp/usr/bin -c . . .=20 -std=3Diso9899:1999 -Werror vers.c linking kernel.full ld: warning: lld uses extended branch encoding, no object with = architecture supporting feature detected. ld: warning: lld may use movt/movw, no object with architecture = supporting feature detected. . . . END PARTIAL QUOTE Is the link command itself available? (The .../sys/*/kernel.full.meta likely has it if it is still around.) > ? >=20 > (The example text was taken from an amd64 -> aarch64 cross build.) >=20 > >> Host is amd64. Target is arm. No src.conf. Did a full buildworld = TARGET=3Darm a few days ago. /usr/bin/ld is lld. > >=20 > > Okay, so in the above "cc" command, can you somehow figure out which = cc > > executable it is using? And please add a -v to the "linking = kernel.full" > > command line, so it shows exactly which linker it runs? > >=20 > > I have the idea that it is preferring your /usr/bin/ld over > > ${WORLDTMP}/usr/bin/ld... >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?230C1E7D-04DB-4E45-8A40-F6B2F5E557E9>