From ca8eab19eead31318a97270d78e6a1611ebae2ef Mon Sep 17 00:00:00 2001 From: Adel Kara Slimane Date: Mon, 7 Jun 2021 14:50:36 +0200 Subject: [PATCH] install.sh: Generic + Clang: prompt to replace libunwind with llvm-libunwind (#258) --- install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install.sh b/install.sh index 126fd9f..16ca5cc 100755 --- a/install.sh +++ b/install.sh @@ -191,6 +191,14 @@ if [ "$1" = "install" ] || [ "$1" = "config" ]; then # Run init script that is also run in PKGBUILD, it will define some env vars that we will use _tkg_initscript + if [[ "${_compiler}" = "llvm" && "${_distro}" = "Generic" ]]; then + read -p "Replace \"libunwind\" with \"llvm-libunwind\" ? y/[n]:" _libunwind_replace + if [[ "${_libunwind_replace}" =~ ^(y|yes|Yes|Y)$ ]]; then + export LDFLAGS_MODULE="-unwindlib=libunwind" + export HOSTLDFLAGS="-unwindlib=libunwind" + fi + fi + if [[ $1 = "install" && ! "$_distro" =~ ^(Ubuntu|Debian|Fedora|Suse|Generic)$ ]]; then msg2 "Variable \"_distro\" in \"customization.cfg\" hasn't been set to \"Ubuntu\", \"Debian\", \"Fedora\" or \"Suse\"" msg2 "This script can only install custom kernels for RPM and DEB based distros, though only those keywords are permitted. Exiting..."