install.sh: Generic + Clang: prompt to replace libunwind with llvm-libunwind (#258)

This commit is contained in:
Adel Kara Slimane
2021-06-07 14:50:36 +02:00
committed by GitHub
parent 8c2ba75087
commit ca8eab19ee

View File

@@ -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 # Run init script that is also run in PKGBUILD, it will define some env vars that we will use
_tkg_initscript _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 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 "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..." msg2 "This script can only install custom kernels for RPM and DEB based distros, though only those keywords are permitted. Exiting..."