Use a submitted patch instead to point to correct llvm-tblgen and include a fix to really link with all libs when LLVM libs are built statically.
Signed-off-by: Anuj Mittal <[email protected]> --- .../0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch | 32 ++++++++++++++++ .../opencl-clang/files/link-with-all-libs.patch | 32 ++++++++++++++++ .../files/point-to-correct-llvm-tblgen.patch | 43 ---------------------- ...pencl-clang_9.0.0.bb => opencl-clang_10.0.0.bb} | 8 ++-- 4 files changed, 68 insertions(+), 47 deletions(-) create mode 100644 dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch create mode 100644 dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/link-with-all-libs.patch delete mode 100644 dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/point-to-correct-llvm-tblgen.patch rename dynamic-layers/clang-layer/recipes-opencl/opencl-clang/{opencl-clang_9.0.0.bb => opencl-clang_10.0.0.bb} (82%) diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch new file mode 100644 index 0000000..8df7e3a --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch @@ -0,0 +1,32 @@ +From f3ef79a6301bab0b3a447f07ceb94c39a95009df Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <[email protected]> +Date: Thu, 2 Apr 2020 08:59:20 +0800 +Subject: [PATCH] don't redefine LLVM_TABLEGEN_EXE + +Use the value that has been passed by the user. + +Upstream-Status: Submitted +Signed-off-by: Anuj Mittal <[email protected]> +--- + CMakeLists.txt | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6893e97..941b0ae 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -137,7 +137,10 @@ endif(NOT USE_PREBUILT_LLVM) + set (COMPILE_OPTIONS_TD opencl_clang_options.td) + set (COMPILE_OPTIONS_INC opencl_clang_options.inc) + +-set(LLVM_TABLEGEN_EXE "llvm-tblgen") ++if(NOT DEFINED LLVM_TABLEGEN_EXE) ++ set(LLVM_TABLEGEN_EXE "llvm-tblgen") ++endif() ++ + set(LLVM_TARGET_DEFINITIONS ${COMPILE_OPTIONS_TD}) + if(USE_PREBUILT_LLVM) + set(TABLEGEN_ADDITIONAL -I ${LLVM_INCLUDE_DIRS}) +-- +2.25.1 + diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/link-with-all-libs.patch b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/link-with-all-libs.patch new file mode 100644 index 0000000..bd6c967 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/link-with-all-libs.patch @@ -0,0 +1,32 @@ +From cc0769fb72561f82976e40c5b7ea8bf07069c87a Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <[email protected]> +Date: Thu, 19 Mar 2020 16:30:07 +0800 +Subject: [PATCH] link to all libs + +LINK_COMPONENTS=all isn't working for static libs for out of tree builds. Use +LLVM_AVAILABLE_LIBS instead. Reported: + +https://github.com/intel/opencl-clang/issues/114 + +Upstream-Status: Pending + +Signed-off-by: Anuj Mittal <[email protected]> +--- + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4590a11..2ff9901 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -261,6 +261,7 @@ add_llvm_library(${TARGET_NAME} SHARED + clangLex + clangBasic + ${ADDITIONAL_LIBS} ++ ${LLVM_AVAILABLE_LIBS} + ) + + # Configure resource file on Windows +-- +2.25.1 + diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/point-to-correct-llvm-tblgen.patch b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/point-to-correct-llvm-tblgen.patch deleted file mode 100644 index 417e022..0000000 --- a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/point-to-correct-llvm-tblgen.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 2ce2619b544678541e0cc56494e2927086718613 Mon Sep 17 00:00:00 2001 -From: Anuj Mittal <[email protected]> -Date: Tue, 26 Mar 2019 14:11:29 +0800 -Subject: [PATCH] point to correct llvm-tblgen - -Let llvm-tblgen path be passed from recipe itself. - -Also since we're going to do the patching ourselves, no need to look for -git through cmake. - -Upstream-Status: Inappropriate [OE specific] - -Signed-off-by: Anuj Mittal <[email protected]> -Signed-off-by: Naveen Saini <[email protected]> ---- - CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1371a67..f83ffcc 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -53,7 +53,7 @@ endif(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) - include(AddLLVM) - include(TableGen) - --find_package(Git REQUIRED) -+#find_package(Git REQUIRED) - - if (NOT WIN32) - add_subdirectory( linux_linker ) -@@ -138,7 +138,7 @@ endif(NOT USE_PREBUILT_LLVM) - set (COMPILE_OPTIONS_TD opencl_clang_options.td) - set (COMPILE_OPTIONS_INC opencl_clang_options.inc) - --set(LLVM_TABLEGEN_EXE "llvm-tblgen") -+#set(LLVM_TABLEGEN_EXE "llvm-tblgen") - set(LLVM_TARGET_DEFINITIONS ${COMPILE_OPTIONS_TD}) - if(USE_PREBUILT_LLVM) - set(TABLEGEN_ADDITIONAL -I ${LLVM_INCLUDE_DIRS}) --- -2.17.1 - diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_9.0.0.bb b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_10.0.0.bb similarity index 82% rename from dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_9.0.0.bb rename to dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_10.0.0.bb index 695749c..cc897c6 100644 --- a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_9.0.0.bb +++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_10.0.0.bb @@ -5,17 +5,17 @@ DESCRIPTION = "Common clang has OpenCL-oriented API and is capable \ LICENSE = "NCSA" LIC_FILES_CHKSUM = "file://LICENSE;md5=e8a15bf1416762a09ece07e44c79118c" -SRC_URI = "git://github.com/intel/opencl-clang.git;branch=ocl-open-90;protocol=https \ - file://point-to-correct-llvm-tblgen.patch \ +SRC_URI = "git://github.com/intel/opencl-clang.git;branch=ocl-open-100;protocol=https \ + file://0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch \ + file://link-with-all-libs.patch \ " -SRCREV = "e6049638474112ad26db13eb167a16b2d497b841" +SRCREV = "0a5a9f67b56431ef7b9436d1af812df6dfb44975" S = "${WORKDIR}/git" inherit cmake DEPENDS += "clang" - DEPENDS_append_class-target = " opencl-clang-native" COMPATIBLE_HOST = '(x86_64).*-linux' -- 2.7.4
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#6462): https://lists.yoctoproject.org/g/meta-intel/message/6462 Mute This Topic: https://lists.yoctoproject.org/mt/72767451/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
