From 1436b996928f93da4a23b11d33416b3a05292d0e Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Sat, 1 Oct 2016 20:52:32 -0400 Subject: [PATCH] rust: avoid using flags for TARGET for non-TARGET --- recipes-devtools/rust/rust.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes-devtools/rust/rust.inc b/recipes-devtools/rust/rust.inc index e4f3956..b886e2a 100644 --- a/recipes-devtools/rust/rust.inc +++ b/recipes-devtools/rust/rust.inc @@ -247,8 +247,10 @@ def rust_gen_target(d, thing, wd): prefix = prefix_for(d, thing) features = "" + cpu = "generic" if thing is "TARGET": features = d.getVar('TARGET_LLVM_FEATURES', True) or "" + cpu = d.getVar('TARGET_LLVM_CPU', True) features = features or d.getVarFlag('FEATURES', arch, True) or "" # build tspec @@ -264,7 +266,7 @@ def rust_gen_target(d, thing, wd): tspec['linker'] = "{}{}gcc".format(d.getVar('CCACHE', True), prefix) tspec['objcopy'] = "{}objcopy".format(prefix) tspec['ar'] = "{}ar".format(prefix) - tspec['cpu'] = d.getVar('TARGET_LLVM_CPU', True) + tspec['cpu'] = cpu if features is not "": tspec['features'] = features tspec['dynamic-linking'] = True