Commit Graph

198 Commits

Author SHA1 Message Date
liberodark
43bb5f368b haskell.compiler: apply LLVM split sections fix unconditionally 2026-08-27 10:46:34 +02:00
Weijia Wang
6c974ba260 ghc: apply patch for LLVM backend split sections on loongarch64-linux 2026-08-26 22:56:28 +02:00
darkyzhou
a23aa37dcf ghc: add GHCi enablement patches for loongarch64-linux 2026-08-26 22:56:21 +02:00
liberodark
ec9226fa62 haskell.compiler.ghc9103: fix LLVM split sections on riscv64 2026-08-24 20:35:52 +02:00
liberodark
07a19b2043 haskell: follow ghc enableProfiledLibs 2026-08-23 18:36:48 +02:00
SandaruKasa
7e0419cf17 ghc: meta: add changelog 2026-07-25 00:28:38 +03:00
nixpkgs-ci[bot]
2bf9083cd3 Merge master into staging-next 2026-05-15 16:42:24 +00:00
Kirill Radzikhovskyy
94fda3c5d0 ghc: fix c++ linkage and c standard for < 9.10 on darwin 2026-05-15 11:56:14 +10:00
nixpkgs-ci[bot]
9618398486 Merge 025c852a89 into haskell-updates 2026-04-18 00:33:53 +00:00
nixpkgs-ci[bot]
fe636a301d Merge master into staging-next 2026-04-17 06:39:17 +00:00
Alexandre Esteves
4c83b2b646 haskell.compiler.ghc: relax native requirement with 'canExecute' 2026-04-11 14:13:05 +01:00
Wolfgang Walther
19885395bb haskell.compiler.ghc9122: drop
Latest 9.12.x minor release is 9.12.4, which is also in Stackage Nightly
already, so will never be the latest in a Stackage major version.

Thus, dropping according to the GHC Deprecation Policy.
2026-04-10 10:50:02 +02:00
Wolfgang Walther
6a42f32f4b ghc/common-hadrian: skip .1 on versionOlder checks
This makes it a tad clearer that this matches only the prior major
versions.
2026-04-10 10:38:57 +02:00
Wolfgang Walther
e28db541d4 haskell.compiler.ghc9102: drop
Latest 9.10.x minor release is 9.10.3, which is also in Stackage 24.12+.

Thus, dropping according to the GHC Deprecation Policy.
2026-04-10 10:38:56 +02:00
K900
1d02ed1988 Merge remote-tracking branch 'origin/staging-next' into staging 2026-03-29 15:20:39 +03:00
sternenseemann
471b76f833 haskell.compiler.ghc9124: init at 9.12.4
https://www.haskell.org/ghc/blog/20260327-ghc-9.12.4-released.html
2026-03-29 13:46:32 +02:00
sternenseemann
2b2e1c60eb haskell.compiler.ghcHEAD: stop applying upstreamed sphinx 9 patch 2026-03-28 23:02:23 +01:00
Michael Daniels
58d09c8cda Merge branch 'staging-next' into staging 2026-03-23 17:22:18 -04:00
sternenseemann
0dad55e848 pkgsCross.ghcjs.ghc: fix rts/Types.h missing for GHC >= 9.12.3 2026-03-23 01:02:16 +01:00
Alexandre Esteves
ce35c1b37c haskell.compiler.ghcHEAD: 9.15.20251225 -> 9.15.20260218 2026-02-18 23:52:55 +00:00
Michael Daniels
518574dbaa Merge commit '24c32abce296e4e182b1cbd0f1236ba65703a711' into haskell-updates 2026-02-17 19:57:04 -05:00
nixpkgs-ci[bot]
3013e353b1 Merge master into staging-next 2026-02-16 10:39:48 +00:00
sternenseemann
e176f25e6c haskell.compiler.ghc9123: apply patch for incorrect subword division
This is a simple revert, so easy to apply. Unfortunately, it seems
like it'll be some time until 9.12.4 is released…

Debian and Fedora seem to have opted for patching this issue, too.
2026-02-15 18:14:02 +01:00
sternenseemann
3c04c957b1 Merge haskell-updates PR #485516 into staging 2026-02-08 14:12:07 +01:00
sternenseemann
fb534f7edc haskell.compiler.*: fix user's guide build with Sphinx 9 2026-02-01 17:41:04 +01:00
Alexandre Esteves
b6af0dc28e haskellPackages: allow configuring gmp when cross compiling
Fixes error:
  linux: iserv-proxy-interpreter: Failed to lookup symbol: __gmpn_cmp
2026-01-31 02:10:27 +00:00
Alexandre Esteves
c83edba0a5 haskellPackages: prepend triple to targetPrefix only when the target is a different triple 2026-01-28 00:25:37 +00:00
Alexandre Esteves
461141205e haskellPackages: enable ncurses when compiling for same triple rather than same platform 2026-01-28 00:25:37 +00:00
Michael Daniels
3378ed55e9 Merge "$(git merge-base master staging)" (565e0c1f0f) into haskell-updates 2026-01-23 20:01:43 -05:00
OPNA2608
12ebd346e5 haskell.compiler.ghc9123: Don't apply backported ppc64 ELFv1 patch 2026-01-21 12:14:30 +01:00
Alexandre Esteves
616400cc84 haskellPackages: restrict version range of upstreamed ghc patches 2026-01-18 03:31:54 +00:00
Alexandre Esteves
46e08b5776 haskellPackages: apply some recent cross fixes only on ghc 9.10+ 2026-01-13 21:34:59 +00:00
Wolfgang Walther
0cc1b420d0 haskell.compiler: use structured attrs for hadrianFlags (#475546) 2026-01-11 21:13:54 +00:00
sternenseemann
9e1e793038 haskell.compiler: use structured attrs for hadrianFlags 2026-01-11 22:04:08 +01:00
Alexandre Esteves
43cc9f578a haskellPackages: unconditionally apply GHC patches waiting on upstream developments 2026-01-10 22:32:01 +00:00
Wolfgang Walther
f57fd108e9 haskell.compiler: Apply patches to fix PPC64 ELFv2 support (#462247) 2026-01-10 10:45:37 +00:00
OPNA2608
fddddd0db2 haskell.compiler: Apply patches to fix PPC64 ELFv2 support 2025-12-29 13:50:34 +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
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
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
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
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