summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-07-29 23:04:31 -0700
committerKhem Raj <raj.khem@gmail.com>2019-08-12 22:00:22 -0700
commit610a8e1a2ce02b77f905bac261e80b023450b573 (patch)
tree3618fab7398e489267dfee8dd1dc485ba1d1d948 /recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch
parentc969fa61147845efdc6d3a47c782e2a71de745f9 (diff)
downloadmeta-clang-610a8e1a2ce02b77f905bac261e80b023450b573.tar.gz
clang: Upgrade to 9.x-rcX
dont package six.py, its provided by python3-six package default to lp64d ABI and rv64gc ISA. Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch')
-rw-r--r--recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch
new file mode 100644
index 0000000..162d4e1
--- /dev/null
+++ b/recipes-devtools/clang/clang/0007-llvm-allow-env-override-of-exe-path.patch
@@ -0,0 +1,37 @@
1From eb2aeff635789738b25907388ea1ef8ea3e12641 Mon Sep 17 00:00:00 2001
2From: Martin Kelly <mkelly@xevo.com>
3Date: Fri, 19 May 2017 00:22:57 -0700
4Subject: [PATCH 07/20] llvm: allow env override of exe path
5
6When using a native llvm-config from inside a sysroot, we need llvm-config to
7return the libraries, include directories, etc. from inside the sysroot rather
8than from the native sysroot. Thus provide an env override for calling
9llvm-config from a target sysroot.
10
11Signed-off-by: Martin Kelly <mkelly@xevo.com>
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 llvm/tools/llvm-config/llvm-config.cpp | 7 +++++++
15 1 file changed, 7 insertions(+)
16
17diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp
18index 7ef7c46a262..a4f7ed82c7b 100644
19--- a/llvm/tools/llvm-config/llvm-config.cpp
20+++ b/llvm/tools/llvm-config/llvm-config.cpp
21@@ -225,6 +225,13 @@ Typical components:\n\
22
23 /// Compute the path to the main executable.
24 std::string GetExecutablePath(const char *Argv0) {
25+ // Hack for Yocto: we need to override the root path when we are using
26+ // llvm-config from within a target sysroot.
27+ const char *Sysroot = std::getenv("YOCTO_ALTERNATE_EXE_PATH");
28+ if (Sysroot != nullptr) {
29+ return Sysroot;
30+ }
31+
32 // This just needs to be some symbol in the binary; C++ doesn't
33 // allow taking the address of ::main however.
34 void *P = (void *)(intptr_t)GetExecutablePath;
35--
362.22.0
37