diff options
author | Sam James <sam@gentoo.org> | 2022-12-06 05:44:03 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-12-06 05:44:03 +0000 |
commit | 88607de9c44a1b11017ecb7d2d5e8868c48b1695 (patch) | |
tree | 2f6a4b303da56d1f10d2f166da01a25940d60732 /eclass/toolchain-funcs.eclass | |
parent | toolchain-funcs.eclass: fix -Wstrict-prototypes in linker, openmp tests (diff) | |
download | gentoo-88607de9c44a1b11017ecb7d2d5e8868c48b1695.tar.gz gentoo-88607de9c44a1b11017ecb7d2d5e8868c48b1695.tar.bz2 gentoo-88607de9c44a1b11017ecb7d2d5e8868c48b1695.zip |
toolchain-funcs.eclass: stop using which(1)
It's non-portable and we're looking to remove it from @system.
Bug: https://bugs.gentoo.org/487696
Bug: https://bugs.gentoo.org/646588
Signed-off-by: Sam James <sam@gentoo.org>
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') |