Skip to content

Commit

Permalink
Force building with ghc-9.6.5
Browse files Browse the repository at this point in the history
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] - haskell/ghcup-hs#1032
  • Loading branch information
hseg committed May 2, 2024
1 parent e820625 commit 0b9ab3f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .SRCINFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pkgbase = hlint-static-git
pkgdesc = Haskell source code suggestions
pkgver = 3.8.r17.gbaf62009
pkgver = 3.8.r19.g323eb45e
pkgrel = 1
url = https://github.com/ndmitchell/hlint
arch = x86_64
Expand Down
8 changes: 7 additions & 1 deletion PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Contributor: Dino Morelli <[email protected]>

pkgname=hlint-static-git
pkgver=3.8.r17.gbaf62009
pkgver=3.8.r19.g323eb45e
pkgrel=1
pkgdesc='Haskell source code suggestions'
arch=('x86_64')
Expand All @@ -20,6 +20,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"
Expand Down

0 comments on commit 0b9ab3f

Please sign in to comment.