From e7c10de5551babcb229a557b0ea8208b0078caa7 Mon Sep 17 00:00:00 2001 From: Dan Dedrick Date: Mon, 14 Jan 2019 15:39:37 -0500 Subject: [PATCH] rust: don't configure thumb if not in TUNE_FEATURES ARM_INSTRUCTION_SET, and therefore ARM_THUMB_OPT also, expect to only be used in conjunction with the thumb TUNE_FEATURES. So thumb-mode should only be added if thumb is in TUNE_FEATURES and ARM_THUMB_OPT is thumb. The commit https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/conf/machine/include/arm/arch-armv7a.inc?id=3e7d26e31a724009e69788460737e07163a14051 caused armv7a.inc to set ARM_INSTRUCTION_SET to thumb and the commit message explicitly states that the change should have no effect unless TUNE_FEATURES also includes thumb. This change to rust will allow that assumption to continue to be true. --- recipes-devtools/rust/rust.inc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/recipes-devtools/rust/rust.inc b/recipes-devtools/rust/rust.inc index 06c35de..ea2e11a 100644 --- a/recipes-devtools/rust/rust.inc +++ b/recipes-devtools/rust/rust.inc @@ -78,10 +78,11 @@ def llvm_features_from_tune(d): if 'dsp' in feat: f.append("+dsp") - if d.getVar('ARM_THUMB_OPT') is "thumb": - if not feat.isdisjoint(v7): - f.append("+thumb2") - f.append("+thumb-mode") + if 'thumb' in feat: + if d.getVar('ARM_THUMB_OPT') is "thumb": + if not feat.isdisjoint(v7): + f.append("+thumb2") + f.append("+thumb-mode") if 'cortexa5' in feat: f.append("+a5")