diff options
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.patch | 44 |
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 @@ | |||
1 | From dfff33f748b0335ccc2df25c45f3841d459b6345 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 12 Aug 2022 11:50:57 -0700 | ||
4 | Subject: [PATCH] llvm: Do not use cmake infra to detect libzstd | ||
5 | |||
6 | OE's version is build using plain make not cmake as a result we do not | ||
7 | have the cmake support files and this probing method can get this info | ||
8 | from build host and force linking with libzstd from /usr/lib which is | ||
9 | not what we want when cross building. | ||
10 | |||
11 | Fixes errors building llvm-config like | ||
12 | /usr/lib/libzstd.so.1.5.2: error adding symbols: file in wrong | ||
13 | format | ||
14 | | clang-15: error: linker command failed with exit code 1 (use -v to see invocation) | ||
15 | | ninja: build stopped: subcommand failed. | ||
16 | |||
17 | Upstream-Status: Inappropriate [OE-Specific] | ||
18 | Signed-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 | |||
23 | diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt | ||
24 | index 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) | ||