feat: setup ghc cross compiler during configure step
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
This commit is contained in:
parent
225a560590
commit
0a47e01c4d
@ -3,9 +3,10 @@ termux_step_configure() {
|
||||
|
||||
# This check should be above autotools check as haskell package too makes use of configure scripts which
|
||||
# should be executed by its own build system.
|
||||
if ls ./*.cabal &>/dev/null; then
|
||||
if ls "${TERMUX_PKG_SRCDIR}"/*.cabal &>/dev/null; then
|
||||
[ "$TERMUX_CONTINUE_BUILD" == "true" ] && return
|
||||
termux_setup_ghc
|
||||
termux_setup_ghc_cross_compiler
|
||||
termux_step_configure_haskell_build
|
||||
elif [ "$TERMUX_PKG_FORCE_CMAKE" = "false" ] && [ -f "$TERMUX_PKG_SRCDIR/configure" ]; then
|
||||
if [ "$TERMUX_CONTINUE_BUILD" == "true" ]; then
|
||||
|
@ -105,6 +105,12 @@ termux_step_configure_haskell_build() {
|
||||
AVOID_GNULIB+=" gl_cv_header_working_fcntl_h=yes"
|
||||
AVOID_GNULIB+=" gl_cv_C_locale_sans_EILSEQ=yes"
|
||||
|
||||
LLVM_BACKEND=""
|
||||
[ "${TERMUX_ARCH}" != "i686" ] && {
|
||||
LLVM_BACKEND="-fllvm --ghc-option=-fllvm"
|
||||
}
|
||||
[ "$TERMUX_DEBUG_BUILD" = "true" ] && OPTIMISATION="-O0" || OPTIMISATION="-O"
|
||||
|
||||
# Some packages rely on cabal build, therefore they may not have Setup.hs, (though very rare case)
|
||||
# as cabal has that configured by default.
|
||||
if [ ! -f "${TERMUX_PKG_SRCDIR}/Setup.hs" ] && [ ! -f "${TERMUX_PKG_SRCDIR}/Setup.lhs" ]; then
|
||||
@ -113,13 +119,6 @@ termux_step_configure_haskell_build() {
|
||||
cp "${TERMUX_SCRIPTDIR}/scripts/build/haskell-build/default-setup.hs" "${TERMUX_PKG_SRCDIR}/Setup.hs"
|
||||
fi
|
||||
|
||||
LLVM_BACKEND=""
|
||||
[ "${TERMUX_ARCH}" != "i686" ] && {
|
||||
LLVM_BACKEND="-fllvm --ghc-option=-fllvm"
|
||||
}
|
||||
|
||||
[ "$TERMUX_DEBUG_BUILD" = "true" ] && OPTIMISATION="-O0" || OPTIMISATION="-O"
|
||||
|
||||
# NOTE: We do not want to quote AVOID_GNULIB as we want word expansion.
|
||||
# shellcheck disable=SC2086
|
||||
env $AVOID_GNULIB runhaskell Setup configure \
|
||||
|
Loading…
Reference in New Issue
Block a user