diff options
Diffstat (limited to 'eclass/toolchain-funcs.eclass')
-rw-r--r-- | eclass/toolchain-funcs.eclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 2b52ee7ffd7c..a184887ad3b9 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -538,7 +538,7 @@ tc-ld-force-bfd() { # to its value (like multilib). #545218 local ld=$(tc-getLD "$@") local bfd_ld="${ld%% *}.bfd" - local path_ld=$(which "${bfd_ld}" 2>/dev/null) + local path_ld=$(type -P "${bfd_ld}" 2>/dev/null) [[ -e ${path_ld} ]] && export LD=${bfd_ld} # Set up LDFLAGS to select bfd based on the gcc / clang version. @@ -1083,7 +1083,7 @@ gen_usr_ldscript() { # If they're using gold, manually invoke the old bfd. #487696 local d="${T}/bfd-linker" mkdir -p "${d}" - ln -sf $(which ${CHOST}-ld.bfd) "${d}"/ld + ln -sf $(type -P ${CHOST}-ld.bfd) "${d}"/ld flags+=( -B"${d}" ) fi output_format=$($(tc-getCC) "${flags[@]}" 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p') |