1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- From 72a96fefcafb5aa677c2e9ec8dd36f30855f3398 Mon Sep 17 00:00:00 2001
- From: Jun Yuan Tan <junyuan.tan@starfivetech.com>
- Date: Fri, 22 Oct 2021 11:57:22 +0800
- Subject: [PATCH] llvm: Do not use find_library for ncurses
- This ensures that it lets OE to decide which lib to link
- otherwise it adds absolute paths to linker cmdline and confuses it
- horribly with native and target libs when build clang for target
- 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
- clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
- Rebased to LLVM 14.0.0 by Jun Yuan Tan
- Signed-off-by: Khem Raj <raj.khem@gmail.com>
- Signed-off-by: Jun Yuan Tan <junyuan.tan@starfivetech.com>
- ---
- compiler-rt/cmake/config-ix.cmake | 2 +-
- llvm/cmake/config-ix.cmake | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
- diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
- index e2985dccc645..ffe090910bd7 100644
- --- a/compiler-rt/cmake/config-ix.cmake
- +++ b/compiler-rt/cmake/config-ix.cmake
- @@ -152,7 +152,7 @@ else()
- set(MAYBE_REQUIRED)
- endif()
- if(LLVM_ENABLE_TERMINFO)
- - find_library(COMPILER_RT_TERMINFO_LIB NAMES terminfo tinfo curses ncurses ncursesw ${MAYBE_REQUIRED})
- + set(TERMINFO_LIB tinfo curses ncurses ncursesw)
- endif()
- if(COMPILER_RT_TERMINFO_LIB)
- set(LLVM_ENABLE_TERMINFO 1)
- diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake
- index c81b7e47ac78..09491a65d12f 100644
- --- a/llvm/cmake/config-ix.cmake
- +++ b/llvm/cmake/config-ix.cmake
- @@ -197,7 +197,7 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
- set(MAYBE_REQUIRED)
- endif()
- if(LLVM_ENABLE_TERMINFO)
- - find_library(TERMINFO_LIB NAMES terminfo tinfo curses ncurses ncursesw ${MAYBE_REQUIRED})
- + set(TERMINFO_LIB tinfo curses ncurses ncursesw)
- endif()
- if(TERMINFO_LIB)
- set(LLVM_ENABLE_TERMINFO 1)
- --
- 2.33.0
|