diff options
Diffstat (limited to 'common/recipes-core/llvm')
-rw-r--r-- | common/recipes-core/llvm/files/0002-llvm-allow-env-override-of-exe-path.patch | 35 | ||||
-rw-r--r-- | common/recipes-core/llvm/llvm_git.bbappend | 14 |
2 files changed, 49 insertions, 0 deletions
diff --git a/common/recipes-core/llvm/files/0002-llvm-allow-env-override-of-exe-path.patch b/common/recipes-core/llvm/files/0002-llvm-allow-env-override-of-exe-path.patch new file mode 100644 index 00000000..7b490a81 --- /dev/null +++ b/common/recipes-core/llvm/files/0002-llvm-allow-env-override-of-exe-path.patch @@ -0,0 +1,35 @@ +From ac39269933a9011567722e69c02734beaa1191b3 Mon Sep 17 00:00:00 2001 +From: Martin Kelly <mkelly@xevo.com> +Date: Fri, 19 May 2017 00:22:57 -0700 +Subject: [PATCH] llvm: allow env override of exe path + +When using a native llvm-config from inside a sysroot, we need llvm-config to +return the libraries, include directories, etc. from inside the sysroot rather +than from the native sysroot. Thus provide an env override for calling +llvm-config from a target sysroot. + +Signed-off-by: Martin Kelly <mkelly@xevo.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + tools/llvm-config/llvm-config.cpp | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp +index 892adc3b9dd..73b6989fa9e 100644 +--- a/tools/llvm-config/llvm-config.cpp ++++ b/tools/llvm-config/llvm-config.cpp +@@ -226,6 +226,13 @@ Typical components:\n\ + + /// Compute the path to the main executable. + std::string GetExecutablePath(const char *Argv0) { ++ // Hack for Yocto: we need to override the root path when we are using ++ // llvm-config from within a target sysroot. ++ const char *Sysroot = std::getenv("YOCTO_ALTERNATE_EXE_PATH"); ++ if (Sysroot != nullptr) { ++ return Sysroot; ++ } ++ + // This just needs to be some symbol in the binary; C++ doesn't + // allow taking the address of ::main however. + void *P = (void *)(intptr_t)GetExecutablePath; diff --git a/common/recipes-core/llvm/llvm_git.bbappend b/common/recipes-core/llvm/llvm_git.bbappend index 373df6cb..bd77ed77 100644 --- a/common/recipes-core/llvm/llvm_git.bbappend +++ b/common/recipes-core/llvm/llvm_git.bbappend @@ -1,2 +1,16 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=c520ed40e11887bb1d24d86f7f5b1f05" + +SRCREV = "4a059213dd6f034147e9083c21133dc1b57b3a8a" +PV = "7" +BRANCH = "release_70" +PATCH_VERSION = "0" + SRC_URI += "file://0001-llvm-config-allow-overriding-libdir-through-cmdline.patch" +SRC_URI_remove = "file://0001-Disable-generating-a-native-llvm-config.patch" + +INSANE_SKIP_${MLPREFIX}libllvm${LLVM_RELEASE}-llvm-${LLVM_RELEASE}.${PATCH_VERSION}.0 += "dev-so" + +PACKAGES =+ "${PN}-testplugin" +FILES_${PN}-testplugin = "${libdir}/${LLVM_DIR}/TestPlugin.so" +FILES_${PN}-dbg += "${libdir}/${LLVM_DIR}/.debug/TestPlugin.so" |