Broken arm support in clang now?

Mark Millard marklmi at yahoo.com
Sun Aug 12 00:46:09 UTC 2018


[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 at nexustechnology.com> wrote:
> On 2018-Aug-11, at 11:09 AM, Dimitry Andric <dim at FreeBSD.org> wrote:
> > 
> > On 11 Aug 2018, at 19:31, Warner Losh <imp at bsdimp.com> wrote:
> >> 
> >> On Sat, Aug 11, 2018, 10:20 AM Dimitry Andric <dim at freebsd.org> wrote:
> >> On 11 Aug 2018, at 16:55, Warner Losh <imp at bsdimp.com> wrote:
> >>> 
> >>> It looks like armv5 clang bogusly uses lld:
> >>> 
> >>> From a 'make buildkernel' of the RT1310 kernel config:
> >>> 
> >>> 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.
> > ...
> 
> Did the build get either of the below notices? Both?
> 
> make[1]: "/usr/src/Makefile.inc1" line 341: SYSTEM_COMPILER: Determined that CC=cc matches the source tree.  Not bootstrapping a cross-compiler.
> 
> This one I have.
>  
> make[1]: "/usr/src/Makefile.inc1" line 346: SYSTEM_LINKER: Determined that LD=ld matches the source tree.  Not bootstrapping a cross-linker.
> 
> This one I don't.
> 
> 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=/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
. . . 
-std=iso9899: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.)



> ?
> 
> (The example text was taken from an amd64 -> aarch64 cross build.)
> 
> >> Host is amd64. Target is arm. No src.conf. Did a full buildworld TARGET=arm a few days ago. /usr/bin/ld is lld.
> > 
> > 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?
> > 
> > I have the idea that it is preferring your /usr/bin/ld over
> > ${WORLDTMP}/usr/bin/ld...
> 



===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-toolchain mailing list