summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang/clang/0034-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-devtools/clang/clang/0034-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch')
-rw-r--r--recipes-devtools/clang/clang/0034-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/recipes-devtools/clang/clang/0034-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch b/recipes-devtools/clang/clang/0034-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch
new file mode 100644
index 0000000..88b0744
--- /dev/null
+++ b/recipes-devtools/clang/clang/0034-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch
@@ -0,0 +1,44 @@
1From dfff33f748b0335ccc2df25c45f3841d459b6345 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 12 Aug 2022 11:50:57 -0700
4Subject: [PATCH] llvm: Do not use cmake infra to detect libzstd
5
6OE's version is build using plain make not cmake as a result we do not
7have the cmake support files and this probing method can get this info
8from build host and force linking with libzstd from /usr/lib which is
9not what we want when cross building.
10
11Fixes errors building llvm-config like
12/usr/lib/libzstd.so.1.5.2: error adding symbols: file in wrong
13format
14| clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
15| ninja: build stopped: subcommand failed.
16
17Upstream-Status: Inappropriate [OE-Specific]
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 llvm/lib/Support/CMakeLists.txt | 4 ++--
21 1 file changed, 2 insertions(+), 2 deletions(-)
22
23diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt
24index 5044b2639a0f..9bdd35c4eae4 100644
25--- a/llvm/lib/Support/CMakeLists.txt
26+++ b/llvm/lib/Support/CMakeLists.txt
27@@ -26,7 +26,7 @@ if(LLVM_ENABLE_ZLIB)
28 endif()
29
30 if(LLVM_ENABLE_ZSTD)
31- list(APPEND imported_libs zstd::libzstd_shared)
32+ list(APPEND imported_libs zstd)
33 endif()
34
35 if( MSVC OR MINGW )
36@@ -305,7 +305,7 @@ if(LLVM_ENABLE_ZSTD)
37 if(NOT zstd_library)
38 get_property(zstd_library TARGET zstd::libzstd_shared PROPERTY LOCATION)
39 endif()
40- set(llvm_system_libs ${llvm_system_libs} "${zstd_library}")
41+ set(llvm_system_libs ${llvm_system_libs} "zstd")
42 endif()
43
44 if(LLVM_ENABLE_TERMINFO)