From 443e7c910bff590b050a8d4f6d4e34220e7a694e Mon Sep 17 00:00:00 2001 From: lisimin Date: Thu, 24 Mar 2022 16:22:23 +0800 Subject: [PATCH] exit when set wrong toolchain path report an error when toolchain path does not exist Signed-off-by: lisimin --- meta-openeuler/recipes-devtools/gcc/gcc-bin-toolchain.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meta-openeuler/recipes-devtools/gcc/gcc-bin-toolchain.inc b/meta-openeuler/recipes-devtools/gcc/gcc-bin-toolchain.inc index 65b4343483d..df091a1fd24 100644 --- a/meta-openeuler/recipes-devtools/gcc/gcc-bin-toolchain.inc +++ b/meta-openeuler/recipes-devtools/gcc/gcc-bin-toolchain.inc @@ -11,13 +11,16 @@ python () { import os local_toolchain = str(d.getVar('OPENEULER_TOOLCHAIN_DIR', True)) + #nativesdk no arch, nativesdk-glibc cannot get specific toolchain + if bb.data.inherits_class('nativesdk', d): + return True if not os.path.exists(local_toolchain): - return 1 + bb.fatal("%s is not a directory [%s]!" % (local_toolchain, d.getVar('PN', True))) if os.path.exists(local_toolchain): if "glibc" == d.getVar('BPN', True): gcctopdir = os.path.abspath(os.path.dirname(local_toolchain)) d.setVar("DL_DIR", gcctopdir) - return 0 + return True d.setVar("S", local_toolchain) d.setVarFlag("do_fetch", "noexec", "1") d.setVarFlag("do_unpack", "noexec", "1") -- Gitee