From fb9cce760a772f1a42dc30ec77c7ff51afaaf4f7 Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Wed, 19 Nov 2014 22:46:25 -0500 Subject: [PATCH] rust: fix use local goop --- recipes/rust/rust.inc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/recipes/rust/rust.inc b/recipes/rust/rust.inc index 913bb3b..5037e2e 100644 --- a/recipes/rust/rust.inc +++ b/recipes/rust/rust.inc @@ -233,14 +233,9 @@ do_configure () { unset CXXFLAGS unset CPPFLAGS - if [ "${USE_LOCAL_RUST}" -eq 1 ]; then - # FIXME: this path to rustc may not be quite right in the case - # where we're reinstalling the compiler. May want to try for a real - # path based on bitbake vars - my_conf="--enable-local-rust --local-rust-root=$(dirname $(which rustc))" - else - my_conf="" - fi + # FIXME: this path to rustc (via `which rustc`) may not be quite right in the case + # where we're reinstalling the compiler. May want to try for a real + # path based on bitbake vars # - rpath is required otherwise rustc fails to resolve symbols # - submodule management is done by bitbake's fetching @@ -259,7 +254,7 @@ do_configure () { "--libdir=${libdir}" \ "--bindir=${bindir}" \ "--disable-manage-submodules" \ - ${my_conf} \ + ${@base_conditional('USE_LOCAL_RUST', '1', '--enable-local-rust --local-rust-root=$(which rustc)', '', d)} \ ${EXTRA_OECONF} }