linker not using make.conf

2019-09-03 Thread Sid
In /etc/make.conf, I have
 LD= /usr/local/bin/ld.lld80

This is not used for ports. It may be used for building the kernel and world.

 clang-8: error: unable to execute command: Executable "ld" doesn't exist!
 clang-8: error: linker command failed with exit code 1 (use -v to see 
invocation)
 *** Error code 1

 XLD= /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 compiler 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 well. 
make.conf should reference the chosen linker without having to manually 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 faulty 
conclusions and confusion for developers as well, who think one linker is set, 
when it's not.

Thank you
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


Re: amd64 head -r351153 self-built but via devel/llvm90: 'objcopy: elf_update() failed: Layout constraint violation' for gptboot.bin

2019-09-03 Thread Dimitry Andric
On 17 Aug 2019, at 05:33, Mark Millard  wrote:
> 
> I upgraded to head -r351153 and then attempted a buildworld
> buildkernel via devel/llvm90 (rc2 via ports head -r509054),
> but that (from scratch) build attempt got:
> 
> --- gptboot.bin ---
> objcopy: elf_update() failed: Layout constraint violation
> *** [gptboot.bin] Error code 1
> make[5]: *** gptboot.bin removed


It turns out this is an lld issue with the -N option, introduced with
https://reviews.llvm.org/rLLD360593:

https://bugs.llvm.org/show_bug.cgi?id=43212

Before, -N did not do that much, but that change can cause section
offsets which do not match the stated section alignment.  Hence, objcopy
complains.

-Dimitry



signature.asc
Description: Message signed with OpenPGP