summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch')
-rw-r--r--meta/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch b/meta/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch
new file mode 100644
index 0000000000..0ee7090290
--- /dev/null
+++ b/meta/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch
@@ -0,0 +1,44 @@
1From 419855642e4a48d09e7b3b1e02593b6d9a506089 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 19 May 2016 23:11:45 -0700
4Subject: [PATCH] compiler-rt: Simplify cross-compilation. Don't use
5 native-compiled llvm-config.
6
7 Note: AddLLVM.cmake does not expose the LLVM source directory.
8 So if you want to run the test suite, you need to either:
9
10 1) set LLVM_MAIN_SRC_DIR explicitly (to find lit.py)
11 2) change AddLLVM.cmake to point to an installed 'lit'.
12 3) add_subdirectory(compiler-rt/test) from clang instead of compiler-rt.
13
14https://us.codeaurora.org/patches/quic/llvm/50683/compiler-rt-cross-compilation.patch
15
16Upstream-Status: Pending
17Signed-off-by: Greg Fitzgerald <gregf@codeaurora.org>
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 compiler-rt/CMakeLists.txt | 11 ++++++++++-
21 1 file changed, 10 insertions(+), 1 deletion(-)
22
23diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
24index 2c52788de56a..fe409704acc3 100644
25--- a/compiler-rt/CMakeLists.txt
26+++ b/compiler-rt/CMakeLists.txt
27@@ -107,7 +107,16 @@ if (COMPILER_RT_STANDALONE_BUILD)
28 set(CMAKE_CXX_EXTENSIONS NO)
29
30 if (NOT LLVM_RUNTIMES_BUILD)
31- load_llvm_config()
32+ find_package(LLVM REQUIRED)
33+ list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
34+
35+ # Variables that AddLLVM.cmake depends on (included by AddCompilerRT)
36+ set(LLVM_TOOLS_BINARY_DIR "${LLVM_INSTALL_PREFIX}/bin")
37+ set(LLVM_LIBRARY_DIR "${LLVM_INSTALL_PREFIX}/lib")
38+
39+ set(LLVM_LIBRARY_OUTPUT_INTDIR
40+ ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
41+
42 endif()
43 if (TARGET intrinsics_gen)
44 # Loading the llvm config causes this target to be imported so place it