Skip to content
Commit 3d5ecb62 authored by Adhemerval Zanella's avatar Adhemerval Zanella
Browse files

Fix LIBC_PROG_BINUTILS for -fuse-ld=lld



GCC does not print the correct linker when -fuse-ld=lld is used with
the -print-prog-name=ld:

  $ gcc -v 2>&1 | tail -n 1
  gcc version 11.2.0 (Ubuntu 11.2.0-7ubuntu2)
  $ gcc
  ld

This is different than for gold:

  $ gcc -fuse-ld=gold -print-prog-name=ld
  ld.gold

Using ld.lld as the static linker name prints the expected result.

This is only required when -fuse-ld=lld is used, if lld is used as
the 'ld' programs (through a symlink) LIBC_PROG_BINUTILS works
as expected.

Checked on x86_64-linux-gnu.

Reviewed-by: default avatarFangrui Song <maskray@google.com>
parent 66a273d1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment