Commit Graph

1279 Commits

Author SHA1 Message Date
nixpkgs-ci[bot]
49663d6264 Merge master into staging-next 2025-12-30 15:03:52 +00:00
sternenseemann
867f6b8b28 haskell.compiler.ghc9123: init at 9.12.3 (#474597) 2025-12-30 14:26:52 +00:00
nixpkgs-ci[bot]
6dac5d40bc Merge staging-next into staging 2025-12-30 11:39:05 +00:00
nixpkgs-ci[bot]
845c1e4ab3 Merge master into staging-next 2025-12-30 11:38:28 +00:00
OPNA2608
fddddd0db2 haskell.compiler: Apply patches to fix PPC64 ELFv2 support 2025-12-29 13:50:34 +01:00
sternenseemann
5710b82c56 haskell.compiler.ghcHEAD: 9.15.20250811 -> 9.15.20251225 2025-12-28 12:44:58 +01:00
sternenseemann
f3958665b8 haskell.compiler.ghc9123: init at 9.12.3
https://www.haskell.org/ghc/blog/20251227-ghc-9.12.3-released.html

haskell.packages.ghc9123.interpolate: fix eval
2025-12-28 10:25:03 +01:00
nixpkgs-ci[bot]
9f3565e0bf Merge a97147406e into haskell-updates 2025-12-27 00:23:32 +00:00
nixpkgs-ci[bot]
e1d9ab22a2 Merge staging-next into staging 2025-12-27 00:18:50 +00:00
nixpkgs-ci[bot]
87bc2d9594 Merge master into staging-next 2025-12-27 00:18:15 +00:00
sternenseemann
c8680a776e haskell.*: Bootstrap & fix on powerpc64 (#439258) 2025-12-26 19:02:19 +00:00
K900
d25cc41156 Merge remote-tracking branch 'origin/master' into staging-next 2025-12-26 21:09:17 +03:00
sternenseemann
2163a16acc haskell.compiler.ghc{914,HEAD}: fix Cabal Paths_ patch for darwin
Rebased the patch set on the 3.16 branch of Cabal:
https://github.com/sternenseemann/cabal/tree/sterni-cabal-3.16-for-aarch64-darwin
2025-12-26 10:52:38 +01:00
nixpkgs-ci[bot]
5fcf252640 Merge f645b5d050 into haskell-updates 2025-12-23 00:24:27 +00:00
nixpkgs-ci[bot]
b50b03448b Merge staging-next into staging 2025-12-23 00:18:54 +00:00
nixpkgs-ci[bot]
fb7bf4701b Merge master into staging-next 2025-12-23 00:18:10 +00:00
Guillaume Bouchard
9654052789 haskell.compiler.ghc9141: init at 9.14.1
https://www.haskell.org/ghc/blog/20251219-ghc-9.14.1-released.html

Co-authored-by: sternenseemann <sternenseemann@systemli.org>
2025-12-22 22:34:14 +01:00
sternenseemann
986510af9f Merge haskell-updates PR #466258 into staging 2025-12-20 22:50:32 +01:00
OPNA2608
370df1e30d haskell.compiler.ghc966DebianBinary: init at 9.6.6
Yoinked the ppc64 build from Debian, because there are no bindists for this.
2025-12-19 22:34:50 +01:00
Stefan Frijters
a43b8f3285 haskell.compiler.ghc*Binary: fix build with structuredAttrs 2025-12-14 20:17:19 +01:00
Alexandre Esteves
9bcfd5b7df pkgsStatic.haskellPackages: support Template Haskell via iserv-proxy
Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-11-30 19:14:32 +01:00
Stefan Frijters
c17b54ecd7 ghc: set sourceProvenance for binary bootstrap packages 2025-11-19 15:07:46 +01:00
sternenseemann
866c9d08ef Merge haskell-updates PR #452254 into staging-next 2025-11-02 23:28:12 +01:00
nixpkgs-ci[bot]
a9ac86e773 Merge 92661251e0 into haskell-updates 2025-11-01 00:24:19 +00:00
nixpkgs-ci[bot]
39f48e45c5 Merge staging-next into staging 2025-10-31 18:07:11 +00:00
Slava Gorbunov
44f1db823f Use the same CPP flags as ghc-9.12 2025-10-31 15:40:36 +03:00
Slava Gorbunov
c316b3deab Restrict to ghc < 9.12 2025-10-30 14:18:34 +03:00
Slava Gorbunov
1f167aa460 ghc: provide JavaScript CPP command for ghcjs build 2025-10-28 11:07:47 +03:00
Alexandre Esteves
b4de5e3714 haskellPackages: fix executable builds on pkgsCross.ucrt64 2025-10-23 23:04:12 +01:00
Emily
2a59d27e69 haskell.compiler.ghc{948,967,984,9102,9103,9121,9122}: backport patches for LLVM support
LLVM 12–17 have been dropped for Nixpkgs 25.11. As discussed recently
on Matrix, this backports upstream changes to allow the use of
LLVM 20 for all GHC versions from 9.4.8 onward.

I looked over GHC commits mentioning LLVM since the release of 9.4.8,
and read the discussions and issues around the relevant bumps, and
attempted to be quite thorough, but I obviously cannot guarantee that
this is wholly comprehensive. It seems like upstream generally bumps
the upper bound on the basis of “it builds successfully for me”,
with specific adaptations for new versions being fairly uncommon and
only coming for obvious build blockers or reactively in response to
bug reports. I have backported both kinds of changes here.

For some commits, trivial conflict resolutions and adaptations
were required. It would be possible to pass the affected files to
`fetchpatch` as `excludes` and keep smaller fix‐up patches in tree in
some cases, but I opted to keep it simple and vendor complete backport
patches instead. I did not attempt to backport every single change to
the LLVM backend, only those that seemed directly relevant to support
for newer versions; if you’d get the same issue with the older LLVM,
that’s just a GHC bug.

These changes should actually make it easier to cross‐compile for
new architectures, as more recent LLVMs will have better support for
newer platforms, and it will be easier to backport GHC changes to
enable new platforms with less drift in the backend.

These patches do result in two breaking changes. Firstly, the minimum
LLVM version is bumped to 13 across the board. This is irrelevant for
Nixpkgs as we pin a specific LLVM version anyway, and versions below
LLVM 18 will be removed imminently. Secondly, support for the hidden
`-fno-llvm-tbaa` flag is dropped. This can be replaced with custom
`-optlo` flags to control the passes more directly, but the main
use of this undocumented flag appears to have been to [work around]
the lack of support for newer LLVM versions, anyway.

[work around]: <https://gitlab.haskell.org/ghc/ghc/-/issues/22220>

I successfully built the following on `aarch64-linux`:

* `pkgsCross.armv7l-hf-multiplatform.buildPackages.haskell.compiler.ghc948`
* `pkgsCross.armv7l-hf-multiplatform.buildPackages.haskell.compiler.ghc967`
* `pkgsCross.armv7l-hf-multiplatform.buildPackages.haskell.compiler.ghc984`
* `pkgsCross.armv7l-hf-multiplatform.buildPackages.haskell.compiler.ghc9102`
* `pkgsCross.armv7l-hf-multiplatform.buildPackages.haskell.compiler.ghc9121`
* `pkgsCross.armv7l-hf-multiplatform.buildPackages.haskell.compiler.ghc9122`
* `pkgsCross.riscv64.haskell.compiler.ghc948`

The GHC 9.4.8 with an ARMv7 host platform segfaults when I try to run
GHC, though e.g. `ghc-pkg --help` runs successfully. The GHC 9.10.3
build targeting ARMv7 crashed inside `llc(1)`, so I tried RISC‐V,
which has some platform mismatch issue relating to `libffi`, so I
tried z/Architecture, which failed with an invalid floating point
constant in the LLVM IR, so I tried 64‐bit MIPS, which failed with
a different `libffi` issue, so I tried 32‐bit MIPS, which failed
to compile `compiler-rt`, so I gave up. I confirmed that both of the
ARMv7 issues reproduce with 944e8fd4f4,
the revision before they were bumped from their old versions of LLVM,
so these are not regressions.

I built a test program with the ARMv7 cross‐compilers and
confirmed that they run on the AArch64 builder. I also confirmed
that the cross‐compiled RISC‐V GHC successfully runs under
`qemu-riscv64(1)`. It will only try to build programs via the C
backend, though, as that is the only option for unregisterised™
targets, so it’s not clear to me how useful LLVM support in 9.4.8
really is for bootstrapping new platforms; I guess even RISC‐V
would require more backporting work to produce a cross‐compiled
GHC that will use LLVM to compile its own input. I didn’t bother
setting up all the binfmt machinery to get it through compiling and
running a test program, but it at least makes the attempt.

(cherry picked from commit b6be8a03a7)
2025-10-23 10:42:16 +02:00
Emily
fc742b53b9 haskell.compiler.ghc948: don’t patch both aclocal.m4 and configure
`autoreconfHook` will handle the latter now.

(cherry picked from commit 5923f1f1e2)
2025-10-23 10:42:15 +02:00
Emily
96a8023166 haskell.compiler.ghc948: use autoreconfHook
This matches the Hadrian build, and will be required for the LLVM
support backports.

(cherry picked from commit 6664f3137c)
2025-10-23 10:42:14 +02:00
Emily
b9a4cdcafd haskell.compiler.ghc948: drop obsolete configure patch
This string is not present in GHC 9.4.8’s `configure` script.

(cherry picked from commit 7d28e619b4)
2025-10-23 10:42:11 +02:00
sternenseemann
3bd7971889 haskell.compiler.ghc{948,967,984,9102,9103,9121,9122}: backport patches for LLVM support (#440774) 2025-10-18 23:05:44 +00:00
Emily
b6be8a03a7 haskell.compiler.ghc{948,967,984,9102,9103,9121,9122}: backport patches for LLVM support
LLVM 12–17 have been dropped for Nixpkgs 25.11. As discussed recently
on Matrix, this backports upstream changes to allow the use of
LLVM 20 for all GHC versions from 9.4.8 onward.

I looked over GHC commits mentioning LLVM since the release of 9.4.8,
and read the discussions and issues around the relevant bumps, and
attempted to be quite thorough, but I obviously cannot guarantee that
this is wholly comprehensive. It seems like upstream generally bumps
the upper bound on the basis of “it builds successfully for me”,
with specific adaptations for new versions being fairly uncommon and
only coming for obvious build blockers or reactively in response to
bug reports. I have backported both kinds of changes here.

For some commits, trivial conflict resolutions and adaptations
were required. It would be possible to pass the affected files to
`fetchpatch` as `excludes` and keep smaller fix‐up patches in tree in
some cases, but I opted to keep it simple and vendor complete backport
patches instead. I did not attempt to backport every single change to
the LLVM backend, only those that seemed directly relevant to support
for newer versions; if you’d get the same issue with the older LLVM,
that’s just a GHC bug.

These changes should actually make it easier to cross‐compile for
new architectures, as more recent LLVMs will have better support for
newer platforms, and it will be easier to backport GHC changes to
enable new platforms with less drift in the backend.

These patches do result in two breaking changes. Firstly, the minimum
LLVM version is bumped to 13 across the board. This is irrelevant for
Nixpkgs as we pin a specific LLVM version anyway, and versions below
LLVM 18 will be removed imminently. Secondly, support for the hidden
`-fno-llvm-tbaa` flag is dropped. This can be replaced with custom
`-optlo` flags to control the passes more directly, but the main
use of this undocumented flag appears to have been to [work around]
the lack of support for newer LLVM versions, anyway.

[work around]: <https://gitlab.haskell.org/ghc/ghc/-/issues/22220>

I successfully built the following on `aarch64-linux`:

* `pkgsCross.armv7l-hf-multiplatform.buildPackages.haskell.compiler.ghc948`
* `pkgsCross.armv7l-hf-multiplatform.buildPackages.haskell.compiler.ghc967`
* `pkgsCross.armv7l-hf-multiplatform.buildPackages.haskell.compiler.ghc984`
* `pkgsCross.armv7l-hf-multiplatform.buildPackages.haskell.compiler.ghc9102`
* `pkgsCross.armv7l-hf-multiplatform.buildPackages.haskell.compiler.ghc9121`
* `pkgsCross.armv7l-hf-multiplatform.buildPackages.haskell.compiler.ghc9122`
* `pkgsCross.riscv64.haskell.compiler.ghc948`

The GHC 9.4.8 with an ARMv7 host platform segfaults when I try to run
GHC, though e.g. `ghc-pkg --help` runs successfully. The GHC 9.10.3
build targeting ARMv7 crashed inside `llc(1)`, so I tried RISC‐V,
which has some platform mismatch issue relating to `libffi`, so I
tried z/Architecture, which failed with an invalid floating point
constant in the LLVM IR, so I tried 64‐bit MIPS, which failed with
a different `libffi` issue, so I tried 32‐bit MIPS, which failed
to compile `compiler-rt`, so I gave up. I confirmed that both of the
ARMv7 issues reproduce with 944e8fd4f4,
the revision before they were bumped from their old versions of LLVM,
so these are not regressions.

I built a test program with the ARMv7 cross‐compilers and
confirmed that they run on the AArch64 builder. I also confirmed
that the cross‐compiled RISC‐V GHC successfully runs under
`qemu-riscv64(1)`. It will only try to build programs via the C
backend, though, as that is the only option for unregisterised™
targets, so it’s not clear to me how useful LLVM support in 9.4.8
really is for bootstrapping new platforms; I guess even RISC‐V
would require more backporting work to produce a cross‐compiled
GHC that will use LLVM to compile its own input. I didn’t bother
setting up all the binfmt machinery to get it through compiling and
running a test program, but it at least makes the attempt.
2025-10-15 16:25:12 +01:00
Wolfgang Walther
0b63c854c7 haskell.compiler.ghc9121: drop
Latest 9.12.x minor release is 9.12.2, which is also in Stackage Nightly
2025-09-01.

Thus, dropping according to the GHC Deprecation Policy.
2025-10-15 15:12:33 +02:00
sternenseemann
149b99fab0 haskell.compiler.ghc984Binary: drop unnecessary libnuma dep
ghc902Binary's rts.conf indeed prescribes linking against numa for
aarch64-linux, but this is not the case with the later bindists we have
been providing numa for.

(cherry picked from commit 347062bef5)
2025-10-15 15:05:56 +02:00
Emily
58799a0f1a haskell.compiler.ghc924Binary: drop
(cherry picked from commit c9c7344657)
2025-10-15 15:05:53 +02:00
Wolfgang Walther
95d6e417ca haskell.compiler.ghc963Binary: drop
This bootstraps mostly from ghc984Binary, at least for the major
platforms. The bootstrap paths for darwin become much shorter.
Unfortunately, the bootstrap paths for i686-linux become a bit longer,
so it's a trade-off.

(cherry picked from commit 5df6c9a28f)
2025-10-15 15:05:40 +02:00
Wolfgang Walther
ab3b9e8495 haskell.compiler.ghc9101: drop
Latest 9.10.x minor release is 9.10.2, which is also in Stackage 24.8.

Thus, dropping according to the GHC Deprecation Policy.

(cherry picked from commit ac5228c6c0)
2025-10-15 15:05:21 +02:00
Wolfgang Walther
2cf9e1aaae compilers/ghc/common-hadrian: remove unused condition
Hadrian is only used for GHC 9.6+ anyway.

(cherry picked from commit 14488d4051)
2025-10-15 15:05:13 +02:00
ghpzin
9c6b1bde8f haskell.compiler.ghc{948,967,984,9101,9121,9122}: fix build with gcc15
- add patch from fedora (rebase of latest fix from upstream):
https://gitlab.haskell.org/ghc/ghc/-/issues/25662
https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13863

ghc versions excluded from patch:
9.10.2 - has previous fix with `extern void* malloc(size_t);`
9.10.3 - has latest fix with `#include <stdlib.h>`
9.12.3 - has latest fix with `#include <stdlib.h>`

Fixes build failure with gcc15, building utils/hp2ps/Utilities.c:
```
utils/hp2ps/Utilities.c:6:14: error:
warning: conflicting types for built-in function ‘malloc’;
expected ‘void *(long unsigned int)’ [-Wbuiltin-declaration-mismatch]
        6 | extern void* malloc();
          |              ^~~~~~
...
utils/hp2ps/Utilities.c:92:18: error:
warning: conflicting types for built-in function ‘realloc’;
expected ‘void *(void *, long unsigned int)’ [-Wbuiltin-declaration-mismatch]
       92 |     extern void *realloc();
          |                  ^~~~~~~
```

(cherry picked from commit 02746ead92)
2025-10-15 15:05:12 +02:00
Wolfgang Walther
33735c24b9 Merge branch 'haskell-updates' into staging 2025-10-15 13:54:11 +02:00
sternenseemann
347062bef5 haskell.compiler.ghc984Binary: drop unnecessary libnuma dep
ghc902Binary's rts.conf indeed prescribes linking against numa for
aarch64-linux, but this is not the case with the later bindists we have
been providing numa for.
2025-10-14 11:52:20 +02:00
Emily
5923f1f1e2 haskell.compiler.ghc948: don’t patch both aclocal.m4 and configure
`autoreconfHook` will handle the latter now.
2025-10-13 22:02:27 +01:00
Emily
6664f3137c haskell.compiler.ghc948: use autoreconfHook
This matches the Hadrian build, and will be required for the LLVM
support backports.
2025-10-13 22:01:55 +01:00
Emily
7d28e619b4 haskell.compiler.ghc948: drop obsolete configure patch
This string is not present in GHC 9.4.8’s `configure` script.
2025-10-13 22:00:42 +01:00
Emily
c9c7344657 haskell.compiler.ghc924Binary: drop 2025-10-13 18:37:53 +01:00
Wolfgang Walther
5df6c9a28f haskell.compiler.ghc963Binary: drop
This bootstraps mostly from ghc984Binary, at least for the major
platforms. The bootstrap paths for darwin become much shorter.
Unfortunately, the bootstrap paths for i686-linux become a bit longer,
so it's a trade-off.
2025-10-13 18:23:47 +02:00
Wolfgang Walther
ac5228c6c0 haskell.compiler.ghc9101: drop
Latest 9.10.x minor release is 9.10.2, which is also in Stackage 24.8.

Thus, dropping according to the GHC Deprecation Policy.
2025-10-13 18:23:30 +02:00