mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-10 06:26:57 +02:00
eclass/toolchain-funcs: Sync with Gentoo
It's from Gentoo commit 3dae41abc9ea4c6d642ece7ce5bc54c0548b56a5.
This commit is contained in:
parent
ebab24c42e
commit
a6ce47f1b1
@ -534,10 +534,9 @@ tc-ld-force-bfd() {
|
||||
ewarn "Forcing usage of the BFD linker"
|
||||
|
||||
# Set up LD to point directly to bfd if it's available.
|
||||
local ld=$(tc-getLD "$@")
|
||||
# We need to extract the first word in case there are flags appended
|
||||
# to its value (like multilib), bug #545218.
|
||||
local bfd_ld="${ld%% *}.bfd"
|
||||
# Unset LD first so we get the default value from tc-getLD.
|
||||
local ld=$(unset LD; tc-getLD "$@")
|
||||
local bfd_ld="${ld}.bfd"
|
||||
local path_ld=$(type -P "${bfd_ld}" 2>/dev/null)
|
||||
[[ -e ${path_ld} ]] && export LD=${bfd_ld}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user