summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/llvm')
-rw-r--r--meta/recipes-devtools/llvm/llvm/0001-Disable-generating-a-native-llvm-config.patch41
-rw-r--r--meta/recipes-devtools/llvm/llvm_git.bb7
2 files changed, 45 insertions, 3 deletions
diff --git a/meta/recipes-devtools/llvm/llvm/0001-Disable-generating-a-native-llvm-config.patch b/meta/recipes-devtools/llvm/llvm/0001-Disable-generating-a-native-llvm-config.patch
new file mode 100644
index 0000000000..2809e4c594
--- /dev/null
+++ b/meta/recipes-devtools/llvm/llvm/0001-Disable-generating-a-native-llvm-config.patch
@@ -0,0 +1,41 @@
1From 7f7743ce233fcd735ec580c75270413493658aa6 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 19 Apr 2018 18:08:31 -0700
4Subject: [PATCH] Disable generating a native llvm-config
5
6OpenEmbedded already builds this as part of llvm-native
7
8Upstream-Status: Inappropriate [OE-Specific]
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 tools/llvm-config/CMakeLists.txt | 16 ----------------
13 1 file changed, 16 deletions(-)
14
15diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt
16index 25f99cec978..c45e9b642a8 100644
17--- a/tools/llvm-config/CMakeLists.txt
18+++ b/tools/llvm-config/CMakeLists.txt
19@@ -63,19 +63,3 @@ endif()
20
21 # Add the dependency on the generation step.
22 add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp ${BUILDVARIABLES_OBJPATH})
23-
24-if(CMAKE_CROSSCOMPILING)
25- set(${project}_LLVM_CONFIG_EXE "${LLVM_NATIVE_BUILD}/bin/llvm-config")
26- set(${project}_LLVM_CONFIG_EXE ${${project}_LLVM_CONFIG_EXE} PARENT_SCOPE)
27-
28- add_custom_command(OUTPUT "${${project}_LLVM_CONFIG_EXE}"
29- COMMAND ${CMAKE_COMMAND} --build . --target llvm-config --config $<CONFIGURATION>
30- DEPENDS ${LLVM_NATIVE_BUILD}/CMakeCache.txt
31- WORKING_DIRECTORY ${LLVM_NATIVE_BUILD}
32- COMMENT "Building native llvm-config..."
33- USES_TERMINAL)
34- add_custom_target(${project}NativeLLVMConfig DEPENDS ${${project}_LLVM_CONFIG_EXE})
35- add_dependencies(${project}NativeLLVMConfig CONFIGURE_LLVM_NATIVE)
36-
37- add_dependencies(llvm-config ${project}NativeLLVMConfig)
38-endif(CMAKE_CROSSCOMPILING)
39--
402.17.0
41
diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
index 77c095d9a3..cb3bba6fab 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -26,6 +26,7 @@ PATCH_VERSION = "0"
26SRC_URI = "git://github.com/llvm-mirror/llvm.git;branch=${BRANCH};protocol=http \ 26SRC_URI = "git://github.com/llvm-mirror/llvm.git;branch=${BRANCH};protocol=http \
27 file://0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \ 27 file://0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \
28 file://0002-llvm-allow-env-override-of-exe-path.patch \ 28 file://0002-llvm-allow-env-override-of-exe-path.patch \
29 file://0001-Disable-generating-a-native-llvm-config.patch \
29 " 30 "
30UPSTREAM_CHECK_COMMITS = "1" 31UPSTREAM_CHECK_COMMITS = "1"
31S = "${WORKDIR}/git" 32S = "${WORKDIR}/git"
@@ -85,15 +86,15 @@ do_configure_prepend() {
85} 86}
86 87
87do_compile() { 88do_compile() {
88 NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE} 89 ninja -v ${PARALLEL_MAKE}
89} 90}
90 91
91do_compile_class-native() { 92do_compile_class-native() {
92 NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen 93 ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen
93} 94}
94 95
95do_install() { 96do_install() {
96 NINJA_STATUS="[%p] " DESTDIR=${LLVM_INSTALL_DIR} ninja -v install 97 DESTDIR=${LLVM_INSTALL_DIR} ninja -v install
97 install -D -m 0755 ${B}/bin/llvm-config ${D}${libdir}/${LLVM_DIR}/llvm-config 98 install -D -m 0755 ${B}/bin/llvm-config ${D}${libdir}/${LLVM_DIR}/llvm-config
98 99
99 install -d ${D}${bindir}/${LLVM_DIR} 100 install -d ${D}${bindir}/${LLVM_DIR}