Andrew Geissler | 23e0279 | 2023-07-21 09:06:10 -0500 | [diff] [blame] | 1 | From 0ca5ef7c8256dbd9690a01a82397bc16a123e179 Mon Sep 17 00:00:00 2001 |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 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 | mk/clang.mk | 2 +- |
| 15 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 16 | |
| 17 | diff --git a/mk/clang.mk b/mk/clang.mk |
Andrew Geissler | 23e0279 | 2023-07-21 09:06:10 -0500 | [diff] [blame] | 18 | index a045beee8482..1ebe2f702dcd 100644 |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 19 | --- a/mk/clang.mk |
| 20 | +++ b/mk/clang.mk |
Andrew Geissler | 2daf84b | 2023-03-31 09:57:23 -0500 | [diff] [blame] | 21 | @@ -30,7 +30,7 @@ comp-cflags-warns-clang := -Wno-language-extension-token \ |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 22 | |
| 23 | # Note, use the compiler runtime library (libclang_rt.builtins.*.a) instead of |
| 24 | # libgcc for clang |
| 25 | -libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) \ |
| 26 | +libgcc$(sm) := $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) \ |
| 27 | -rtlib=compiler-rt -print-libgcc-file-name 2> /dev/null) |
| 28 | |
| 29 | # Core ASLR relies on the executable being ready to run from its preferred load |