| From c0b0ef51b3c997a1c20ef9381ba2201ed477f609 Mon Sep 17 00:00:00 2001 |
| From: Alexander Kanavin <alex@linutronix.de> |
| Date: Tue, 21 Sep 2021 16:54:23 +0200 |
| Subject: [PATCH] system-deps/src/lib.rs: do not probe into harcoded list of |
| targets |
| |
| Oe-core defines custom targets, and this probe fails. |
| |
| Upstream-Status: Inappropriate [oe-core specific] |
| Signed-off-by: Alexander Kanavin <alex@linutronix.de> |
| |
| --- |
| system-deps-6.0.3/src/lib.rs | 16 +--------------- |
| 2 files changed, 2 insertions(+), 16 deletions(-) |
| |
| diff --git a/system-deps-6.0.3/src/lib.rs b/system-deps-6.0.3/src/lib.rs |
| index 45ab1ce..f87d1ec 100644 |
| --- a/system-deps-6.0.3/src/lib.rs |
| +++ b/system-deps-6.0.3/src/lib.rs |
| @@ -800,21 +800,7 @@ impl Config { |
| } |
| |
| fn check_cfg(&self, cfg: &cfg_expr::Expression) -> Result<bool, Error> { |
| - use cfg_expr::{targets::get_builtin_target_by_triple, Predicate}; |
| - |
| - let target = self |
| - .env |
| - .get("TARGET") |
| - .expect("no TARGET env variable defined"); |
| - let target = get_builtin_target_by_triple(&target) |
| - .unwrap_or_else(|| panic!("Invalid TARGET: {}", target)); |
| - |
| - let res = cfg.eval(|pred| match pred { |
| - Predicate::Target(tp) => Some(tp.matches(target)), |
| - _ => None, |
| - }); |
| - |
| - res.ok_or_else(|| Error::UnsupportedCfg(cfg.original().to_string())) |
| + Ok(true) |
| } |
| } |
| |