summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2020-04-03 18:15:09 +0800
committerKhem Raj <raj.khem@gmail.com>2020-04-03 15:04:56 -0700
commitb9e7c299d426e7e22e3ee45bebb5206ad8bc54fd (patch)
tree7190d4b74729cdbc58452deaaee2d788ab16f581
parent826feacfeb64e2b4fe3ff50153a8ba4fa4bfff76 (diff)
downloadmeta-clang-b9e7c299d426e7e22e3ee45bebb5206ad8bc54fd.tar.gz
fix build errors when using libLLVMInterpreter
Don't use the full path to libffi and avoid linking to the one from clang's sysroot. Prevents errors like: Log data follows: | DEBUG: Executing shell function do_compile | NOTE: VERBOSE=1 cmake --build /build/build/tmp/work/corei7-64-poky-linux/opencl-clang/10.0.0-r0/build --target all -- | ninja: error: '/build/build/tmp/work/corei7-64-poky-linux/clang/10.0.0-r0/recipe-sysroot/usr/lib/libffi.so', needed by 'libopencl-clang.so.10', missing and no known rule to make it | WARNING: exit code 1 from a shell command. | ERROR: Execution of '/build/build/tmp/work/corei7-64-poky-linux/opencl-clang/10.0.0-r0/temp/run.do_compile.72389' failed with exit code 1: | ninja: error: '/build/build/tmp/work/corei7-64-poky-linux/clang/10.0.0-r0/recipe-sysroot/usr/lib/libffi.so', needed by 'libopencl-clang.so.10', missing and no known rule to make it | WARNING: exit code 1 from a shell command. | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--recipes-devtools/clang/clang/0024-fix-path-to-libffi.patch28
-rw-r--r--recipes-devtools/clang/common.inc1
2 files changed, 29 insertions, 0 deletions
diff --git a/recipes-devtools/clang/clang/0024-fix-path-to-libffi.patch b/recipes-devtools/clang/clang/0024-fix-path-to-libffi.patch
new file mode 100644
index 0000000..2890228
--- /dev/null
+++ b/recipes-devtools/clang/clang/0024-fix-path-to-libffi.patch
@@ -0,0 +1,28 @@
1From 52b4e74809eba796663f0f65194ab4f3eafe2cb1 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Fri, 3 Apr 2020 15:10:37 +0800
4Subject: [PATCH] fix path to libffi
5
6FFI_LIBRARY_PATH is the full path to libffi so when building something that links to
7libLLVMInterpreter, we were looking for libffi in clang's recipe-sysroot instead of
8the recipe's sysroot.
9
10Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
11---
12 llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt b/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt
16index b8adea5..7d8434c 100644
17--- a/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt
18+++ b/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt
19@@ -16,5 +16,5 @@ add_llvm_component_library(LLVMInterpreter
20 )
21
22 if( LLVM_ENABLE_FFI )
23- target_link_libraries( LLVMInterpreter PRIVATE ${FFI_LIBRARY_PATH} )
24+ target_link_libraries( LLVMInterpreter PRIVATE ffi )
25 endif()
26--
272.7.4
28
diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc
index c45e24c..2e82343 100644
--- a/recipes-devtools/clang/common.inc
+++ b/recipes-devtools/clang/common.inc
@@ -31,6 +31,7 @@ SRC_URI = "\
31 file://0021-libcxx-Add-compiler-runtime-library-to-link-step-for.patch \ 31 file://0021-libcxx-Add-compiler-runtime-library-to-link-step-for.patch \
32 file://0022-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch \ 32 file://0022-clang-llvm-cmake-Fix-configure-for-packages-using-fi.patch \
33 file://0023-clang-Fix-resource-dir-location-for-cross-toolchains.patch \ 33 file://0023-clang-Fix-resource-dir-location-for-cross-toolchains.patch \
34 file://0024-fix-path-to-libffi.patch \
34" 35"
35 36
36# Fallback to no-PIE if not set 37# Fallback to no-PIE if not set