Skip to contentSkip to conversation

optee: Check for meta-clang for TOOLCHAIN variable

PATCH Applied Khem Raj 2 participants 2 messages Mar 7, 2021 – Mar 8, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 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.

Cc Jon Mason <[email protected]>
Cc Ross Burton <[email protected]>
---
 meta-arm/recipes-security/optee/optee.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta-arm/recipes-security/optee/optee.inc +2 -1
index 6f6f26d..d093b48 100644
@@ -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
Signature · 1 line
2.30.1
Applied
#1 lore raw
Quoted 8 lines · Khem Raj

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.

Cc Jon Mason <[email protected]>
Cc Ross Burton <[email protected]>

---

Applied to the master branch.

Thanks,
Jon

Quoted 24 lines
 meta-arm/recipes-security/optee/optee.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta-arm/recipes-security/optee/optee.inc +2 -1
index 6f6f26d..d093b48 100644
@@ -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
Signature · 1 line
2.30.1