diff options
Diffstat (limited to 'recipes-devtools')
-rw-r--r-- | recipes-devtools/clang/clang.inc | 2 | ||||
-rw-r--r-- | recipes-devtools/clang/clang/0037-Revert-libomptarget-amdcgn-Add-build-dependency-for-.patch | 23 | ||||
-rw-r--r-- | recipes-devtools/clang/clang/D108404.diff | 58 | ||||
-rw-r--r-- | recipes-devtools/clang/clang/D108868.diff | 47 | ||||
-rw-r--r-- | recipes-devtools/clang/common.inc | 3 |
5 files changed, 108 insertions, 25 deletions
diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 2d148d9..829c03b 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc | |||
@@ -8,7 +8,7 @@ MAJOR_VER = "13" | |||
8 | MINOR_VER = "0" | 8 | MINOR_VER = "0" |
9 | PATCH_VER = "0" | 9 | PATCH_VER = "0" |
10 | 10 | ||
11 | SRCREV ?= "34ff6a75f58377f32a5046a29f55c4c0e58bee9e" | 11 | SRCREV ?= "9e41dc71b8d4040fa5f0742022d6cf9852096744" |
12 | 12 | ||
13 | PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" | 13 | PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" |
14 | BRANCH = "release/13.x" | 14 | BRANCH = "release/13.x" |
diff --git a/recipes-devtools/clang/clang/0037-Revert-libomptarget-amdcgn-Add-build-dependency-for-.patch b/recipes-devtools/clang/clang/0037-Revert-libomptarget-amdcgn-Add-build-dependency-for-.patch deleted file mode 100644 index 66463a2..0000000 --- a/recipes-devtools/clang/clang/0037-Revert-libomptarget-amdcgn-Add-build-dependency-for-.patch +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | From d23235c2b03957e6b1f55068808e33419896ee4d Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 27 Aug 2021 16:45:24 -0700 | ||
4 | Subject: [PATCH] Revert "[libomptarget][amdcgn] Add build dependency for opt" | ||
5 | |||
6 | This reverts commit ab2d8f0749745663d1f029ee4c88fbc492bef00f. | ||
7 | --- | ||
8 | openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt | 2 +- | ||
9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt | ||
12 | index 4765d1989e52..8fec7dc6f17d 100644 | ||
13 | --- a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt | ||
14 | +++ b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt | ||
15 | @@ -157,7 +157,7 @@ foreach(mcpu ${mcpus}) | ||
16 | add_custom_command( | ||
17 | OUTPUT ${bc_libname} | ||
18 | COMMAND ${LINK_TOOL} ${bc_files} | ${OPT_TOOL} --always-inline -o ${OUTPUTDIR}/${bc_libname} | ||
19 | - DEPENDS ${bc_files} opt) | ||
20 | + DEPENDS ${bc_files}) | ||
21 | |||
22 | add_custom_target(lib${libname}-${mcpu} ALL DEPENDS ${bc_libname}) | ||
23 | |||
diff --git a/recipes-devtools/clang/clang/D108404.diff b/recipes-devtools/clang/clang/D108404.diff new file mode 100644 index 0000000..68d8ebc --- /dev/null +++ b/recipes-devtools/clang/clang/D108404.diff | |||
@@ -0,0 +1,58 @@ | |||
1 | Backported from https://reviews.llvm.org/D108404 | ||
2 | |||
3 | diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt | ||
4 | --- a/llvm/runtimes/CMakeLists.txt | ||
5 | +++ b/llvm/runtimes/CMakeLists.txt | ||
6 | @@ -350,15 +350,19 @@ | ||
7 | # Create a runtimes target that uses this file as its top-level CMake file. | ||
8 | # The runtimes target is a configuration of all the runtime libraries | ||
9 | # together in a single CMake invocaiton. | ||
10 | + if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES) | ||
11 | + message(STATUS "Adding dependencies opt llvm-link") | ||
12 | + set(extra_deps opt llvm-link) | ||
13 | + endif() | ||
14 | if(NOT LLVM_RUNTIME_TARGETS) | ||
15 | runtime_default_target( | ||
16 | - DEPENDS ${deps} | ||
17 | + DEPENDS ${deps} ${extra_deps} | ||
18 | PREFIXES ${prefixes}) | ||
19 | set(test_targets check-runtimes) | ||
20 | else() | ||
21 | if("default" IN_LIST LLVM_RUNTIME_TARGETS) | ||
22 | runtime_default_target( | ||
23 | - DEPENDS ${deps} | ||
24 | + DEPENDS ${deps} ${extra_deps} | ||
25 | PREFIXES ${prefixes}) | ||
26 | list(REMOVE_ITEM LLVM_RUNTIME_TARGETS "default") | ||
27 | else() | ||
28 | diff --git a/openmp/libomptarget/DeviceRTL/CMakeLists.txt b/openmp/libomptarget/DeviceRTL/CMakeLists.txt | ||
29 | --- a/openmp/libomptarget/DeviceRTL/CMakeLists.txt | ||
30 | +++ b/openmp/libomptarget/DeviceRTL/CMakeLists.txt | ||
31 | @@ -151,6 +151,7 @@ | ||
32 | |||
33 | # Create target to build all Bitcode libraries. | ||
34 | add_custom_target(omptarget-new-nvptx-bc) | ||
35 | +add_dependencies(omptarget-new-nvptx-bc opt llvm-link) | ||
36 | |||
37 | # Generate a Bitcode library for all the compute capabilities the user requested | ||
38 | foreach(sm ${nvptx_sm_list}) | ||
39 | @@ -197,6 +198,7 @@ | ||
40 | |||
41 | add_custom_target(${bclib_target_name} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${bclib_name}_opt) | ||
42 | add_dependencies(omptarget-new-nvptx-bc ${bclib_target_name}) | ||
43 | + add_dependencies(${bclib_target_name} opt llvm-link) | ||
44 | |||
45 | # Copy library to destination. | ||
46 | add_custom_command(TARGET ${bclib_target_name} POST_BUILD | ||
47 | diff --git a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt | ||
48 | --- a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt | ||
49 | +++ b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt | ||
50 | @@ -157,7 +157,7 @@ | ||
51 | add_custom_command( | ||
52 | OUTPUT ${bc_libname} | ||
53 | COMMAND ${LINK_TOOL} ${bc_files} | ${OPT_TOOL} --always-inline -o ${OUTPUTDIR}/${bc_libname} | ||
54 | - DEPENDS ${bc_files} opt) | ||
55 | + DEPENDS ${bc_files} llvm-link opt) | ||
56 | |||
57 | add_custom_target(lib${libname}-${mcpu} ALL DEPENDS ${bc_libname}) | ||
58 | |||
diff --git a/recipes-devtools/clang/clang/D108868.diff b/recipes-devtools/clang/clang/D108868.diff new file mode 100644 index 0000000..a12a3eb --- /dev/null +++ b/recipes-devtools/clang/clang/D108868.diff | |||
@@ -0,0 +1,47 @@ | |||
1 | Backported from https://reviews.llvm.org/D108868 | ||
2 | |||
3 | --- a/llvm/runtimes/CMakeLists.txt | ||
4 | +++ b/llvm/runtimes/CMakeLists.txt | ||
5 | @@ -350,9 +350,14 @@ if(runtimes) | ||
6 | # Create a runtimes target that uses this file as its top-level CMake file. | ||
7 | # The runtimes target is a configuration of all the runtime libraries | ||
8 | # together in a single CMake invocaiton. | ||
9 | + set(extra_deps "") | ||
10 | if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES) | ||
11 | - message(STATUS "Adding dependencies opt llvm-link") | ||
12 | - set(extra_deps opt llvm-link) | ||
13 | + if(TARGET opt) | ||
14 | + list(APPEND extra_deps opt) | ||
15 | + endif() | ||
16 | + if(TARGET llvm-link) | ||
17 | + list(APPEND extra_deps llvm-link) | ||
18 | + endif() | ||
19 | endif() | ||
20 | if(NOT LLVM_RUNTIME_TARGETS) | ||
21 | runtime_default_target( | ||
22 | --- a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt | ||
23 | +++ b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt | ||
24 | @@ -149,6 +149,14 @@ endmacro() | ||
25 | |||
26 | set(libname "omptarget-amdgcn") | ||
27 | |||
28 | +set(toolchain_deps "") | ||
29 | +if(TARGET llvm-link) | ||
30 | + list(APPEND toolchain_deps llvm-link) | ||
31 | +endif() | ||
32 | +if(TARGET opt) | ||
33 | + list(APPEND toolchain_deps opt) | ||
34 | +endif() | ||
35 | + | ||
36 | foreach(mcpu ${mcpus}) | ||
37 | set(bc_files) | ||
38 | add_cuda_bc_library(${cuda_sources}) | ||
39 | @@ -157,7 +165,7 @@ foreach(mcpu ${mcpus}) | ||
40 | add_custom_command( | ||
41 | OUTPUT ${bc_libname} | ||
42 | COMMAND ${LINK_TOOL} ${bc_files} | ${OPT_TOOL} --always-inline -o ${OUTPUTDIR}/${bc_libname} | ||
43 | - DEPENDS ${bc_files} llvm-link opt) | ||
44 | + DEPENDS ${bc_files} ${toolchain_deps}) | ||
45 | |||
46 | add_custom_target(lib${libname}-${mcpu} ALL DEPENDS ${bc_libname}) | ||
47 | |||
diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 5357848..8282862 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc | |||
@@ -46,7 +46,8 @@ SRC_URI = "\ | |||
46 | file://0034-compiler-rt-Do-not-force-thumb-mode-directive.patch \ | 46 | file://0034-compiler-rt-Do-not-force-thumb-mode-directive.patch \ |
47 | file://0035-Drop-the-git-suffix-from-various-version-variables.patch \ | 47 | file://0035-Drop-the-git-suffix-from-various-version-variables.patch \ |
48 | file://0036-clang-Do-not-use-install-relative-libc-headers.patch \ | 48 | file://0036-clang-Do-not-use-install-relative-libc-headers.patch \ |
49 | file://0037-Revert-libomptarget-amdcgn-Add-build-dependency-for-.patch \ | 49 | file://D108404.diff \ |
50 | file://D108868.diff \ | ||
50 | " | 51 | " |
51 | # Fallback to no-PIE if not set | 52 | # Fallback to no-PIE if not set |
52 | GCCPIE ??= "" | 53 | GCCPIE ??= "" |