freebsd-dev/share
Alex Richardson 2b6ee34cf6 Pass -fuse-ld=/path/to/ld if ${LD} != "ld"
This is needed so that setting LD/XLD is not ignored when linking with $CC
instead of directly using $LD. Currently only clang accepts an absolute
path for -fuse-ld= (Clang 12+ will add a new --ld-path flag), so we now
warn when building with GCC and $LD != "ld" since that might result in the
wrong linker being used.

We have been setting XLD=/path/to/cheri/ld.lld in CheriBSD for a long time and
used a similar version of this patch to avoid linking with /usr/bin/ld.
This change is also required when building FreeBSD on an Ubuntu with Clang:
In that case we set XCC=/usr/lib/llvm-10/bin/clang and since
/usr/lib/llvm-10/bin/ does not contain a "ld" binary the build fails with
`clang: error: unable to execute command: Executable "ld" doesn't exist!`
unless we pass -fuse-ld=/usr/lib/llvm-10/bin/ld.lld.

This change passes -fuse-ld instead of copying ${XLD} to WOLRDTMP/bin/ld
since then we would have to ensure that this file does not exist while
building the bootstrap tools. The cross-linker might not be compatible with
the host linker (e.g. when building on macos: host-linker= Mach-O /usr/bin/ld,
cross-linker=LLVM ld.lld).

Reviewed By:	brooks, emaste
Differential Revision: https://reviews.freebsd.org/D26055
2020-08-25 13:30:03 +00:00
..
colldef Add ga_IE.UTF-8 locale. 2018-11-26 19:39:49 +00:00
ctypedef Fix CTYPE for ja_JP.eucJP and ja_JP.SJIS. 2020-06-29 03:23:13 +00:00
dict
doc Move all sources from the llvm project into contrib/llvm-project. 2019-12-20 19:53:05 +00:00
dtrace Synchronize definitions in mbuf.d with values from mbuf.h 2020-08-05 11:54:02 +00:00
examples pkgbase: Remove the last users of the FreeBSD-example package 2020-08-04 14:48:45 +00:00
i18n
keys pkgbase: Add the pkg trusted keys to the FreeBSD-utilities package 2019-09-05 19:17:17 +00:00
man Add mlx5en(4) to the list of supported netdump network drivers. 2020-08-25 13:21:49 +00:00
misc Outline mentorship 2020-07-29 11:17:44 +00:00
mk Pass -fuse-ld=/path/to/ld if ${LD} != "ld" 2020-08-25 13:30:03 +00:00
monetdef Add ga_IE.UTF-8 locale. 2018-11-26 19:39:49 +00:00
msgdef Add ga_IE.UTF-8 locale. 2018-11-26 19:39:49 +00:00
numericdef Add ga_IE.UTF-8 locale. 2018-11-26 19:39:49 +00:00
security
sendmail
skel Make sh(1) support \u in PS1. This removes one fork/exec on interactive 2019-01-24 11:59:46 +00:00
snmp
syscons - sort according to scan code 2020-03-22 21:41:32 +00:00
tabset
termcap Update the screen termcap entries 2020-05-07 12:43:28 +00:00
tests
timedef Finsh readding Big5 in r317204, which was reverting r315568. This commit 2019-06-20 07:17:16 +00:00
vt Move font related data structured to sys/font.c and update vtfontcvt 2020-06-14 06:58:58 +00:00
zoneinfo Always install backward compatibility timezones, as they are installed 2020-04-09 05:11:18 +00:00
Makefile
Makefile.inc