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 0e1b0e5 commit f297b91
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = graphmod-git
pkgdesc = Present the module dependencies of a program as a 'dot' graph
pkgver = 1.4.r53.g983c38f
pkgrel = 1
pkgrel = 2
url = https://github.com/yav/graphmod
arch = i686
arch = x86_64
Expand Down
16 changes: 9 additions & 7 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pkgname=graphmod-git
_pkgname="${pkgname%-git}"
pkgver=1.4.r53.g983c38f
pkgrel=1
pkgrel=2
pkgdesc="Present the module dependencies of a program as a 'dot' graph"
arch=('i686' 'x86_64')
url="https://github.com/yav/${_pkgname}"
Expand All @@ -21,16 +21,18 @@ pkgver() {

prepare() {
cd "$_pkgname"
stack config set resolver lts-21.8
stack config set resolver lts-22.19 # ghc-9.6.4
echo 'compiler: ghc-9.6.5' >> stack.yaml
}

build() {
cd "$_pkgname"
stack build
cd "$_pkgname"
stack build

}

package() {
cd "$_pkgname"
stack install --local-bin-path "${pkgdir}/usr/bin"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
cd "$_pkgname"
stack install --local-bin-path "${pkgdir}/usr/bin"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

0 comments on commit f297b91

Please sign in to comment.