From aaaf3fac58f3d17f9d4c33020bb390b0de634e05 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 7 Mar 2021 09:46:28 -0800 Subject: [PATCH] optee: Check for meta-clang for TOOLCHAIN variable This covers the case when meta-clang is not in layers but TOOLCHAIN variable is defined ( via config metadata e.g. local.conf ), the value for TOOLCHAIN should be discarded in this case. Signed-off-by: Khem Raj Cc: Jon Mason Cc: Ross Burton Signed-off-by: Jon Mason --- meta-arm/recipes-security/optee/optee.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-arm/recipes-security/optee/optee.inc b/meta-arm/recipes-security/optee/optee.inc index 6f6f26d4..d093b48c 100644 --- a/meta-arm/recipes-security/optee/optee.inc +++ b/meta-arm/recipes-security/optee/optee.inc @@ -12,7 +12,8 @@ OPTEE_ARCH_armv7a = "arm32" OPTEE_ARCH_aarch64 = "arm64" OPTEE_CORE = "${@d.getVar('OPTEE_ARCH').upper()}" -OPTEE_COMPILER = "${@d.getVar('TOOLCHAIN') or 'gcc'}" +OPTEE_TOOLCHAIN = "${@d.getVar('TOOLCHAIN') or 'gcc'}" +OPTEE_COMPILER = "${@bb.utils.contains("BBFILE_COLLECTIONS", "clang-layer", "${OPTEE_TOOLCHAIN}", "gcc", d)}" # Set here but not passed to EXTRA_OEMAKE by default as that breaks # the optee-os build