summaryrefslogtreecommitdiffstats
path: root/dynamic-layers
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2020-03-17 14:01:38 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2020-04-04 18:18:52 +0800
commitcd258cb76f4e51b982d00cea112a1c8a1ddaccab (patch)
tree86c7138ed83709fd3465a71c192ad96f7c7f5098 /dynamic-layers
parented141a08b3e7785142c9889177fadc65d4f583ef (diff)
downloadmeta-intel-cd258cb76f4e51b982d00cea112a1c8a1ddaccab.tar.gz
opencl-clang: upgrade 9.0.0 -> 10.0.0
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 <anuj.mittal@intel.com>
Diffstat (limited to 'dynamic-layers')
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch32
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/link-with-all-libs.patch32
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/point-to-correct-llvm-tblgen.patch43
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_10.0.0.bb (renamed from dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_9.0.0.bb)8
4 files changed, 68 insertions, 47 deletions
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 00000000..8df7e3ab
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch
@@ -0,0 +1,32 @@
1From f3ef79a6301bab0b3a447f07ceb94c39a95009df Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Thu, 2 Apr 2020 08:59:20 +0800
4Subject: [PATCH] don't redefine LLVM_TABLEGEN_EXE
5
6Use the value that has been passed by the user.
7
8Upstream-Status: Submitted
9Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
10---
11 CMakeLists.txt | 5 ++++-
12 1 file changed, 4 insertions(+), 1 deletion(-)
13
14diff --git a/CMakeLists.txt b/CMakeLists.txt
15index 6893e97..941b0ae 100644
16--- a/CMakeLists.txt
17+++ b/CMakeLists.txt
18@@ -137,7 +137,10 @@ endif(NOT USE_PREBUILT_LLVM)
19 set (COMPILE_OPTIONS_TD opencl_clang_options.td)
20 set (COMPILE_OPTIONS_INC opencl_clang_options.inc)
21
22-set(LLVM_TABLEGEN_EXE "llvm-tblgen")
23+if(NOT DEFINED LLVM_TABLEGEN_EXE)
24+ set(LLVM_TABLEGEN_EXE "llvm-tblgen")
25+endif()
26+
27 set(LLVM_TARGET_DEFINITIONS ${COMPILE_OPTIONS_TD})
28 if(USE_PREBUILT_LLVM)
29 set(TABLEGEN_ADDITIONAL -I ${LLVM_INCLUDE_DIRS})
30--
312.25.1
32
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 00000000..bd6c9676
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/link-with-all-libs.patch
@@ -0,0 +1,32 @@
1From cc0769fb72561f82976e40c5b7ea8bf07069c87a Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Thu, 19 Mar 2020 16:30:07 +0800
4Subject: [PATCH] link to all libs
5
6LINK_COMPONENTS=all isn't working for static libs for out of tree builds. Use
7LLVM_AVAILABLE_LIBS instead. Reported:
8
9https://github.com/intel/opencl-clang/issues/114
10
11Upstream-Status: Pending
12
13Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
14---
15 CMakeLists.txt | 1 +
16 1 file changed, 1 insertion(+)
17
18diff --git a/CMakeLists.txt b/CMakeLists.txt
19index 4590a11..2ff9901 100644
20--- a/CMakeLists.txt
21+++ b/CMakeLists.txt
22@@ -261,6 +261,7 @@ add_llvm_library(${TARGET_NAME} SHARED
23 clangLex
24 clangBasic
25 ${ADDITIONAL_LIBS}
26+ ${LLVM_AVAILABLE_LIBS}
27 )
28
29 # Configure resource file on Windows
30--
312.25.1
32
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 417e0221..00000000
--- a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/point-to-correct-llvm-tblgen.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From 2ce2619b544678541e0cc56494e2927086718613 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Tue, 26 Mar 2019 14:11:29 +0800
4Subject: [PATCH] point to correct llvm-tblgen
5
6Let llvm-tblgen path be passed from recipe itself.
7
8Also since we're going to do the patching ourselves, no need to look for
9git through cmake.
10
11Upstream-Status: Inappropriate [OE specific]
12
13Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
14Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
15---
16 CMakeLists.txt | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/CMakeLists.txt b/CMakeLists.txt
20index 1371a67..f83ffcc 100644
21--- a/CMakeLists.txt
22+++ b/CMakeLists.txt
23@@ -53,7 +53,7 @@ endif(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
24 include(AddLLVM)
25 include(TableGen)
26
27-find_package(Git REQUIRED)
28+#find_package(Git REQUIRED)
29
30 if (NOT WIN32)
31 add_subdirectory( linux_linker )
32@@ -138,7 +138,7 @@ endif(NOT USE_PREBUILT_LLVM)
33 set (COMPILE_OPTIONS_TD opencl_clang_options.td)
34 set (COMPILE_OPTIONS_INC opencl_clang_options.inc)
35
36-set(LLVM_TABLEGEN_EXE "llvm-tblgen")
37+#set(LLVM_TABLEGEN_EXE "llvm-tblgen")
38 set(LLVM_TARGET_DEFINITIONS ${COMPILE_OPTIONS_TD})
39 if(USE_PREBUILT_LLVM)
40 set(TABLEGEN_ADDITIONAL -I ${LLVM_INCLUDE_DIRS})
41--
422.17.1
43
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
index 695749cc..cc897c64 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 \
5LICENSE = "NCSA" 5LICENSE = "NCSA"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=e8a15bf1416762a09ece07e44c79118c" 6LIC_FILES_CHKSUM = "file://LICENSE;md5=e8a15bf1416762a09ece07e44c79118c"
7 7
8SRC_URI = "git://github.com/intel/opencl-clang.git;branch=ocl-open-90;protocol=https \ 8SRC_URI = "git://github.com/intel/opencl-clang.git;branch=ocl-open-100;protocol=https \
9 file://point-to-correct-llvm-tblgen.patch \ 9 file://0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch \
10 file://link-with-all-libs.patch \
10 " 11 "
11 12
12SRCREV = "e6049638474112ad26db13eb167a16b2d497b841" 13SRCREV = "0a5a9f67b56431ef7b9436d1af812df6dfb44975"
13 14
14S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"
15 16
16inherit cmake 17inherit cmake
17DEPENDS += "clang" 18DEPENDS += "clang"
18
19DEPENDS_append_class-target = " opencl-clang-native" 19DEPENDS_append_class-target = " opencl-clang-native"
20 20
21COMPATIBLE_HOST = '(x86_64).*-linux' 21COMPATIBLE_HOST = '(x86_64).*-linux'