diff options
Diffstat (limited to 'recipes-security/optee-imx/optee-os/0007-allow-setting-sysroot-for-clang.patch')
-rw-r--r-- | recipes-security/optee-imx/optee-os/0007-allow-setting-sysroot-for-clang.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/recipes-security/optee-imx/optee-os/0007-allow-setting-sysroot-for-clang.patch b/recipes-security/optee-imx/optee-os/0007-allow-setting-sysroot-for-clang.patch new file mode 100644 index 00000000..067ba6eb --- /dev/null +++ b/recipes-security/optee-imx/optee-os/0007-allow-setting-sysroot-for-clang.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From db9e44af75c7cfd3316cab15aaa387383df3e57e Mon Sep 17 00:00:00 2001 | ||
2 | From: Brett Warren <brett.warren@arm.com> | ||
3 | Date: Wed, 23 Sep 2020 09:27:34 +0100 | ||
4 | Subject: [PATCH] optee: enable clang support | ||
5 | |||
6 | When compiling with clang, the LIBGCC_LOCATE_CFLAG variable used | ||
7 | to provide a sysroot wasn't included, which results in not locating | ||
8 | compiler-rt. This is mitigated by including the variable as ammended. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | ChangeId: 8ba69a4b2eb8ebaa047cb266c9aa6c2c3da45701 | ||
12 | Signed-off-by: Brett Warren <brett.warren@arm.com> | ||
13 | |||
14 | --- | ||
15 | mk/clang.mk | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/mk/clang.mk b/mk/clang.mk | ||
19 | index c141a3f2..7d067cc0 100644 | ||
20 | --- a/mk/clang.mk | ||
21 | +++ b/mk/clang.mk | ||
22 | @@ -27,7 +27,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 | ||