blob: 3c13ce3f028cac7ba190154f7825f8d0733658a8 [file] [log] [blame]
Patrick Williams705982a2024-01-12 09:51:57 -06001From 59d4c190eae11c93b26cca5a7b005a17dadc8248 Mon Sep 17 00:00:00 2001
Patrick Williamsac13d5f2023-11-24 18:59:46 -06002From: Brett Warren <brett.warren@arm.com>
3Date: Wed, 23 Sep 2020 09:27:34 +0100
4Subject: [PATCH] optee: enable clang support
5
6When compiling with clang, the LIBGCC_LOCATE_CFLAG variable used
7to provide a sysroot wasn't included, which results in not locating
8compiler-rt. This is mitigated by including the variable as ammended.
9
10Upstream-Status: Pending
11ChangeId: 8ba69a4b2eb8ebaa047cb266c9aa6c2c3da45701
12Signed-off-by: Brett Warren <brett.warren@arm.com>
13
14---
15 mk/clang.mk | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/mk/clang.mk b/mk/clang.mk
19index a045beee8..1ebe2f702 100644
20--- a/mk/clang.mk
21+++ b/mk/clang.mk
22@@ -30,7 +30,7 @@ comp-cflags-warns-clang := -Wno-language-extension-token \
23
24 # Note, use the compiler runtime library (libclang_rt.builtins.*.a) instead of
25 # libgcc for clang
26-libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) \
27+libgcc$(sm) := $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) \
28 -rtlib=compiler-rt -print-libgcc-file-name 2> /dev/null)
29
30 # Core ASLR relies on the executable being ready to run from its preferred load