Skip to content

Commit

Permalink
Force building with ghc-9.6.5
Browse files Browse the repository at this point in the history
Pull in the ghc-9.6 port branch for now.

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 ee83b3b commit 7afb9d7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = ghcup-hs-static-git
pkgdesc = GHC toolchain installer
pkgver = 0.1.22.0.r11.g63e714d
pkgrel = 2
pkgver = 0.1.22.0.r45.g4513c39
pkgrel = 1
url = https://www.haskell.org/ghcup/
install = ghcup-hs.install
arch = x86_64
Expand All @@ -19,7 +19,7 @@ pkgbase = ghcup-hs-static-git
provides = ghcup-hs-bin
conflicts = ghcup-hs
conflicts = ghcup-hs-bin
source = ghcup-hs-static-git::git+https://github.com/haskell/ghcup-hs
source = ghcup-hs-static-git::git+https://github.com/haskell/ghcup-hs#branch=ghc-9.6
sha256sums = SKIP

pkgname = ghcup-hs-static-git
16 changes: 13 additions & 3 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

pkgname=ghcup-hs-static-git
_pkgname="${pkgname%-static-git}"
pkgver=0.1.22.0.r11.g63e714d
pkgrel=2
pkgver=0.1.22.0.r45.g4513c39
pkgrel=1
pkgdesc='GHC toolchain installer'
arch=('x86_64' 'aarch64' 'armv7h' 'i686')
url="https://www.haskell.org/ghcup/"
Expand All @@ -16,7 +16,7 @@ optdepends=('curl'
"ncurses5-compat-libs: using older ghc's linking against libtinfo.so.5")
provides=("$_pkgname" "$_pkgname"-bin)
conflicts=("$_pkgname" "$_pkgname"-bin)
source=($pkgname::git+https://github.com/haskell/ghcup-hs)
source=($pkgname::git+https://github.com/haskell/ghcup-hs#branch=ghc-9.6)
sha256sums=('SKIP')
install="$_pkgname.install"

Expand All @@ -25,8 +25,18 @@ pkgver() {
git describe --tags --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

_allowNewerDeps() {
yq -i --yaml-output --args "$@" -- \
'."allow-newer-deps" += $ARGS.positional' \
stack.yaml
}

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

_allowNewerDeps cabal-install-parsers ghcup semigroupoids unix-bytestring

# enable tests
yq -i --yaml-output \
Expand Down

0 comments on commit 7afb9d7

Please sign in to comment.