summaryrefslogtreecommitdiffstats
path: root/recipes-security/optee-imx/optee-os/0007-allow-setting-sysroot-for-clang.patch
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2023-01-10 08:44:05 -0300
committerGitHub <noreply@github.com>2023-01-10 08:44:05 -0300
commitbd8ff87bf68f52b3933c5d1e9f83c610f18a963d (patch)
treeba42b0e2542a7766b5ab5c594aa0483896039c8b /recipes-security/optee-imx/optee-os/0007-allow-setting-sysroot-for-clang.patch
parent3ed75dc03f775584a91d76f05e2df09f517bf974 (diff)
parent10c68480697fadc7fbb76845497010ce26fd11de (diff)
downloadmeta-freescale-bd8ff87bf68f52b3933c5d1e9f83c610f18a963d.tar.gz
Merge pull request #1379 from Freescale/backport-1373-to-kirkstone
[Backport kirkstone] optee-os: Fix build with clang
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.patch28
1 files changed, 28 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..dc6d5517
--- /dev/null
+++ b/recipes-security/optee-imx/optee-os/0007-allow-setting-sysroot-for-clang.patch
@@ -0,0 +1,28 @@
1From db9e44af75c7cfd3316cab15aaa387383df3e57e Mon Sep 17 00:00:00 2001
2From: 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
18--- a/mk/clang.mk
19+++ b/mk/clang.mk
20@@ -30,7 +30,7 @@ comp-cflags-warns-clang := -Wno-language
21
22 # Note, use the compiler runtime library (libclang_rt.builtins.*.a) instead of
23 # libgcc for clang
24-libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) \
25+libgcc$(sm) := $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) \
26 -rtlib=compiler-rt -print-libgcc-file-name 2> /dev/null)
27
28 # Core ASLR relies on the executable being ready to run from its preferred load