spack/var/spack/repos/builtin/packages/llvm-amdgpu/fix-ncurses-3.9.0.patch
Mark W. Krentel 7e2ce24060
llvm-amdgpu: fix the build for version 3.9.0 (#20029)
* llvm-amdgpu: fix the build for version 3.9.0

Adapt the fix-system-zlib-ncurses.patch for version 3.9.0.  Without
the patch, llvm-amdgpu builds, but then rocm-device-libs fails with
"cannot find -ltinfo."

Tighten the version requirements for cmake according to the
llvm/CMakeLists.txt file.

* Add a conflict for cmake 3.19.0.
2020-11-26 09:32:24 +01:00

26 lines
927 B
Diff

Adapt the fix-system-zlib-ncurses.patch for version 3.9.0.
--- llvm-project-rocm-3.9.0/llvm/cmake/config-ix.cmake.orig 2020-11-20 21:41:10.498772540 -0600
+++ llvm-project-rocm-3.9.0/llvm/cmake/config-ix.cmake 2020-11-20 22:27:57.242391054 -0600
@@ -126,15 +126,11 @@
endif()
if(LLVM_ENABLE_TERMINFO)
set(HAVE_TERMINFO 0)
- foreach(library terminfo tinfo curses ncurses ncursesw)
- string(TOUPPER ${library} library_suffix)
- check_library_exists(${library} setupterm "" HAVE_TERMINFO_${library_suffix})
- if(HAVE_TERMINFO_${library_suffix})
- set(HAVE_TERMINFO 1)
- set(TERMINFO_LIBS "${library}")
- break()
- endif()
- endforeach()
+ find_library(FIND_TERMINFO NAMES terminfo tinfo curses ncurses ncursesw)
+ if(FIND_TERMINFO)
+ set(HAVE_TERMINFO 1)
+ set(TERMINFO_LIBS "${FIND_TERMINFO}")
+ endif()
else()
set(HAVE_TERMINFO 0)
endif()