rust: be even more carful while probing
This commit is contained in:
@@ -272,13 +272,15 @@ do_configure () {
|
|||||||
# where we're reinstalling the compiler. May want to try for a real
|
# where we're reinstalling the compiler. May want to try for a real
|
||||||
# path based on bitbake vars
|
# path based on bitbake vars
|
||||||
# Also will be wrong when relative libdir and/or bindir aren't 'bin' and 'lib'.
|
# Also will be wrong when relative libdir and/or bindir aren't 'bin' and 'lib'.
|
||||||
local_rustc=$(which rustc)
|
|
||||||
local_maybe_enable=disable
|
local_maybe_enable=disable
|
||||||
local_rust_root=/not/set/do/not/use
|
local_rust_root=/not/set/do/not/use
|
||||||
if [ -n "$local_rustc" ]; then
|
if which rustc >/dev/null 2>&1; then
|
||||||
local_rust_root=$(dirname $(dirname $local_rustc))
|
local_rustc=$(which rustc)
|
||||||
if [ -e "$local_rust_root/bin/rustc" ]; then
|
if [ -n "$local_rustc" ]; then
|
||||||
local_maybe_enable=enable
|
local_rust_root=$(dirname $(dirname $local_rustc))
|
||||||
|
if [ -e "$local_rust_root/bin/rustc" ]; then
|
||||||
|
local_maybe_enable=enable
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user