From 39347894bf68f4b85c45e007ec37815776a913f3 Mon Sep 17 00:00:00 2001 From: gesh Date: Thu, 2 May 2024 20:29:30 +0300 Subject: [PATCH] Force building with ghc-9.6.5 The default makepkg configuration sets LDFLAGS but not LD. GHC used to take this as its cue to select its own choice of LD. However GHC would *not* check that its choice of LD supports LDFLAGS. This is a problem for dependencies with C components, which get linked using this LD. A fix[1] for this has landed in ghc 9.6.5 on 2024-04-16, and ghc's installed using the current ghcup HEAD (starting with 7a684ad[2]) will have `--disable-ld-override` passed, which also fixes the issue. [1] - https://gitlab.haskell.org/ghc/ghc/-/issues/24565 [2] - https://github.com/haskell/ghcup-hs/issues/1032 --- PKGBUILD | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PKGBUILD b/PKGBUILD index fc255e70eaa4..bed58fc1d442 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -21,6 +21,12 @@ pkgver() { git describe --tags --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } +prepare() { + cd "$pkgname" + stack config set resolver lts-22.19 # ghc-9.6.4 + echo 'compiler: ghc-9.6.5' >> stack.yaml +} + build() { cd "${pkgname}" stack build