Date: Fri, 16 Jul 2021 03:38:00 -0700 From: Mark Millard via toolchain <toolchain@freebsd.org> To: J P <webplication@gmail.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: <68D812DC-F762-4CDA-BA4D-FD18F9D97549@yahoo.com> In-Reply-To: <CABcCtUSnNzsfVOJoppa1j_Hcwt_vvEedms=jM_GJWxsLc4eTJg@mail.gmail.com> References: <CABcCtUSnNzsfVOJoppa1j_Hcwt_vvEedms=jM_GJWxsLc4eTJg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2021-Jul-16, at 02:55, J P <webplication@gmail.com> wrote: > 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 >=20 > 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. >=20 > Can you > pkg which /usr/local/bin/aarch64-unknown-freebsd14.0-ld > ? # pkg which /usr/local/bin/aarch64-unknown-freebsd14.0-ld /usr/local/bin/aarch64-unknown-freebsd14.0-ld was installed by package = aarch64-binutils-2.33.1_4,1 # pkg delete aarch64-binutils Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 3 packages (of 0 = packages in the universe): Installed packages to be REMOVED: aarch64-binutils: 2.33.1_4,1 aarch64-gcc6: 6.5.0_3 aarch64-gcc9: 9.3.0_1 Number of packages to be removed: 3 The operation will free 278 MiB. Proceed with deinstalling packages? [y/N]: N So it exists because I built and installed: devel/freebsd-gcc6@aarch64 devel/freebsd-gcc9@aarch64 devel/binutils@aarch64 > Or some other how know where you get that linker from? >=20 >=20 > The second unusual thing is that system cc gives precedence > to /usr/local/bin stuff. >=20 > 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 > [...] >=20 > 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 > [...] >=20 > 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 >=20 > the linker is /usr/bin/ld, not > /usr/local/bin/aarch64-portbld-freebsd14.0-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?68D812DC-F762-4CDA-BA4D-FD18F9D97549>