Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Sep 2019 16:50:18 +0200
From:      Sid <sid@bsdmail.com>
To:        freebsd-toolchain@freebsd.org, sid@bsdmail.com
Subject:   Re: linker not using make.conf
Message-ID:  <trinity-ce1fe6c8-facc-41ba-97b3-ebc635e7ff61-1567608618037@3c-app-mailcom-lxa01>
References:  <trinity-008aa4cb-9c85-4504-9364-cd7875281113-1567544648345@3c-app-mailcom-lxa02>

next in thread | previous in thread | raw e-mail | index | archive | help
> This is for FreeBSD 12.0. Older releases (since 11.2) have had similar p=
roblems to this one.
> I wouldn't be surprised if Stable and Current also have this problem,
> because of the common past issue with this that haven't been fully reali=
zed.
>
> Subject: linker not using make.conf
>
> In /etc/make.conf, I have
>  LD=3D /usr/local/bin/ld.lld80
>
> This is not used for ports. It may be used for building the kernel and w=
orld.
>
>  clang-8: error: unable to execute command: Executable "ld" doesn't exis=
t!
>  clang-8: error: linker command failed with exit code 1 (use -v to see i=
nvocation)
>  *** Error code 1
>
>  XLD=3D /usr/local/bin/ld.lld80 being set as well also provides the same=
 error. XD sets it for all, but XLD is only applicable if a different comp=
iler is used for ports than kernel and the base. When LD is set, XLD only =
applies when it is set as well, but this suggests that XLD is not working =
correctly either.
>
> I have to manually link /usr/bin/ld to /usr/local/bin/ld.lld80 for ports=
 to build correctly. This is with both make, and with portmaster.
>
> I built my computer without ld in the base system, and this has worked w=
ell. make.conf should reference the chosen linker without having to manual=
ly link it. Otherwise, LD in make.conf is not working correctly, and gives=
 the impression that one linker is used, when it's not. This can cause fau=
lty conclusions and confusion for developers as well, who think one linker=
 is set, when it's not.
>
> Thank you



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?trinity-ce1fe6c8-facc-41ba-97b3-ebc635e7ff61-1567608618037>