ld-alternative: Update check on alternatives/ld symlink

Before LLD 19 /usr/bin/ld.lld was a file, and now it's a symlink to /usr/bin/lld.
Hence, /etc/alternative/ld symlink now resolves to /usr/bin/lld,
breaking our check and raising false positives.

Updating the expression to match "lld" only fixes the issue.
This commit is contained in:
Jesus Checa Hidalgo 2024-10-14 10:06:13 +02:00
commit a2b93f39c8

View file

@ -19,7 +19,7 @@ verify_ld_bfd
update-alternatives --set ld /usr/bin/ld.lld
# Verify that /usr/bin/ld points to lld
[[ $(readlink -f /etc/alternatives/ld) == *"ld.lld" ]]
[[ $(readlink -f /etc/alternatives/ld) == *"lld" ]]
# Run ld and verify it invokes lld
/usr/bin/ld --version | grep 'LLD'