#!/usr/bin/make -f DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) ifneq (,$(filter $(DEB_BUILD_ARCH),arm64 armhf armel i386 s390x x32)) export DEB_SETUP_GHC_CONFIGURE_ARGS += --ghc-options="-O0 -optc--param -optcggc-min-expand=10" endif # Compilation fails on non-threaded RTS, see https://bugs.debian.org/1020900. ifeq (0,$(shell ghc --info | grep 'Unregisterised.*YES' >/dev/null 2>&1; echo $$?)) export DEB_SETUP_GHC_CONFIGURE_ARGS += --ghc-options="-optc-UTHREADED_RTS" --gcc-options="-UTHREADED_RTS" endif %: dh $@