diff options
Diffstat (limited to 'recipes-devtools/clang/clang/0014-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch')
-rw-r--r-- | recipes-devtools/clang/clang/0014-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/recipes-devtools/clang/clang/0014-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch b/recipes-devtools/clang/clang/0014-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch new file mode 100644 index 0000000..40168b0 --- /dev/null +++ b/recipes-devtools/clang/clang/0014-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From a010673fd33c7311763620cf62159993255bb559 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 19 May 2016 23:11:45 -0700 | ||
4 | Subject: [PATCH 14/15] 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 | |||
14 | https://us.codeaurora.org/patches/quic/llvm/50683/compiler-rt-cross-compilation.patch | ||
15 | |||
16 | Signed-off-by: Greg Fitzgerald <gregf@codeaurora.org> | ||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | --- | ||
19 | compiler-rt/CMakeLists.txt | 11 ++++++++++- | ||
20 | 1 file changed, 10 insertions(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt | ||
23 | index aa360a3ef36..264d39c95c3 100644 | ||
24 | --- a/compiler-rt/CMakeLists.txt | ||
25 | +++ b/compiler-rt/CMakeLists.txt | ||
26 | @@ -66,7 +66,16 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOLEAN | ||
27 | "Build for a bare-metal target.") | ||
28 | |||
29 | if (COMPILER_RT_STANDALONE_BUILD) | ||
30 | - load_llvm_config() | ||
31 | + find_package(LLVM REQUIRED) | ||
32 | + list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}") | ||
33 | + | ||
34 | + # Variables that AddLLVM.cmake depends on (included by AddCompilerRT) | ||
35 | + set(LLVM_TOOLS_BINARY_DIR "${LLVM_INSTALL_PREFIX}/bin") | ||
36 | + set(LLVM_LIBRARY_DIR "${LLVM_INSTALL_PREFIX}/lib") | ||
37 | + | ||
38 | + set(LLVM_LIBRARY_OUTPUT_INTDIR | ||
39 | + ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) | ||
40 | + | ||
41 | if (TARGET intrinsics_gen) | ||
42 | # Loading the llvm config causes this target to be imported so place it | ||
43 | # under the appropriate folder in an IDE. | ||
44 | -- | ||
45 | 2.20.1 | ||
46 | |||