Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jul 2021 11:55:32 +0200
From:      J P <webplication@gmail.com>
To:        marklmi@yahoo.com
Cc:        David Chisnall <theraven@freebsd.org>, toolchain@freebsd.org
Subject:   Re: Why is main's system clang (12.0.1-rc2) using /usr/local/bin/aarch64-unknown-freebsd14.0-ld ? (such breaks things)
Message-ID:  <CABcCtUSnNzsfVOJoppa1j_Hcwt_vvEedms=jM_GJWxsLc4eTJg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--00000000000044b26305c73a9745
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

El 2021-07-16 09:53, Mark Millard via toolchain escribi=C3=B3:
[...]
> # find / -name aarch64-unknown-freebsd14.0-ld -print | more
> /usr/local/bin/aarch64-unknown-freebsd14.0-ld

First unusual thing is the file name, in particular the
-unknown- part. If it were built by the ports it should be
-portbld- instead, so it seem this was built from /usr/src
but in this case it should not be in /usr/local.

Can you
pkg which /usr/local/bin/aarch64-unknown-freebsd14.0-ld
?

Or some other how know where you get that linker from?


The second unusual thing is that system cc gives precedence
to /usr/local/bin stuff.

I do not have /usr/local/bin/aarch64-unknown-freebsd14.0-ld
and when I compile your trivial.cpp example I get:
[...]
End of search list.
 "/usr/bin/ld" --eh-frame-hdr
[...]

If I add that file, I get instead your reported behavior:
cp /usr/bin/ld /usr/local/bin/aarch64-unknown-freebsd14.0-ld
cc -v -o trivial trivial.cpp
[...]
End of search list.
 "/usr/local/bin/aarch64-unknown-freebsd14.0-ld" --eh-frame-hdr
[...]

I suspect this is intentional as it allows to build
stuff from /usr/src with toolchains from the ports, but
I am not sure, in fact when I
/usr/local/bin # mv aarch64-unknown-freebsd14.0-ld
aarch64-portbld-freebsd14.0-ld

the linker is /usr/bin/ld, not
/usr/local/bin/aarch64-portbld-freebsd14.0-ld

BR,

--00000000000044b26305c73a9745--



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