From 5013182ddaf7fabc3cc87ba6c923abb7f68214f5 Mon Sep 17 00:00:00 2001 From: Brett Warren Date: Mon, 19 Oct 2020 14:23:47 +0100 Subject: [PATCH] trusted-firmware-a: enable clang support The CC and LD parameters are used to point make to the currently used compiler and linkers. This change enables TFA to be compiled successfully when TOOLCHAIN=clang. Change-Id: Ice465318b8c9b2b69c08fe4f48f6d36c610978f0 Signed-off-by: Brett Warren Signed-off-by: Jon Mason --- .../trusted-firmware-a/trusted-firmware-a.inc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc index 8b19d68c..98085d0a 100644 --- a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc +++ b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc @@ -78,6 +78,17 @@ do_configure[noexec] = "1" DEPENDS_append = " dtc-native openssl-native" DEPENDS_append_aarch64_qemuall ?= " optee-os" +# CC and LD introduce arguments which conflict with those otherwise provided by +# this recipe. The heads of these variables excluding those arguments +# are therefore used instead. +def remove_options_tail (in_string): + from itertools import takewhile + return ' '.join(takewhile(lambda x: not x.startswith('-'), in_string.split(' '))) + +EXTRA_OEMAKE += "LD=${@remove_options_tail(d.getVar('LD'))}" + +EXTRA_OEMAKE += "CC=${@remove_options_tail(d.getVar('CC'))}" + EXTRA_OEMAKE += "V=1" # Add platform parameter