diff options
Diffstat (limited to 'recipes-devtools/clang/clang/0028-llvm-Do-not-use-find_library-for-ncurses.patch')
-rw-r--r-- | recipes-devtools/clang/clang/0028-llvm-Do-not-use-find_library-for-ncurses.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/recipes-devtools/clang/clang/0028-llvm-Do-not-use-find_library-for-ncurses.patch b/recipes-devtools/clang/clang/0028-llvm-Do-not-use-find_library-for-ncurses.patch new file mode 100644 index 0000000..ef9b2ed --- /dev/null +++ b/recipes-devtools/clang/clang/0028-llvm-Do-not-use-find_library-for-ncurses.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 6660c7d48601df4276fb3f51156c96fff103fb79 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 7 Feb 2021 23:58:41 -0800 | ||
4 | Subject: [PATCH] llvm: Do not use find_library for ncurses | ||
5 | |||
6 | This ensures that it lets OE to decide which lib to link | ||
7 | otherwise it adds absolute paths to linker cmdline and confuses it | ||
8 | horribly with native and target libs when build clang for target | ||
9 | |||
10 | TOPDIR/build/tmp/work/cortexa57-yoe-linux-musl/clang/12.0.0-r0/recipe-sysroot-native/usr/lib/libtinfo.so: error adding symbols: file in wrong format | ||
11 | clang-12: error: linker command failed with exit code 1 (use -v to see invocation) | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | compiler-rt/cmake/config-ix.cmake | 2 +- | ||
16 | llvm/cmake/config-ix.cmake | 2 +- | ||
17 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake | ||
20 | index 196aa62fd01c..49bbbd257d97 100644 | ||
21 | --- a/compiler-rt/cmake/config-ix.cmake | ||
22 | +++ b/compiler-rt/cmake/config-ix.cmake | ||
23 | @@ -140,7 +140,7 @@ else() | ||
24 | set(MAYBE_REQUIRED) | ||
25 | endif() | ||
26 | if(LLVM_ENABLE_TERMINFO) | ||
27 | - find_library(COMPILER_RT_TERMINFO_LIB NAMES terminfo tinfo curses ncurses ncursesw ${MAYBE_REQUIRED}) | ||
28 | + set(TERMINFO_LIB tinfo curses ncurses ncursesw) | ||
29 | endif() | ||
30 | if(COMPILER_RT_TERMINFO_LIB) | ||
31 | set(LLVM_ENABLE_TERMINFO 1) | ||
32 | diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake | ||
33 | index 818fafbce148..2f8ad6652334 100644 | ||
34 | --- a/llvm/cmake/config-ix.cmake | ||
35 | +++ b/llvm/cmake/config-ix.cmake | ||
36 | @@ -175,7 +175,7 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*") | ||
37 | set(MAYBE_REQUIRED) | ||
38 | endif() | ||
39 | if(LLVM_ENABLE_TERMINFO) | ||
40 | - find_library(TERMINFO_LIB NAMES terminfo tinfo curses ncurses ncursesw ${MAYBE_REQUIRED}) | ||
41 | + set(TERMINFO_LIB tinfo curses ncurses ncursesw) | ||
42 | endif() | ||
43 | if(TERMINFO_LIB) | ||
44 | set(LLVM_ENABLE_TERMINFO 1) | ||