Skip to content

Tracking: upstream status of stable-ghc-9.14 patches #175

@angerman

Description

@angerman

Summary

Reorders all 92 commits on stable-ghc-9.14 (from base 902339d332) so that upstreamable patches come first, followed by bridge commits, then fork-specific commits. This makes it easy to identify, extract, and submit patches upstream.

Tree is identical to origin/stable-ghc-9.14git diff is empty (old: 05e1a0c to new: 7968d7c). The AArch64 NCG commits were squashed from 3 → 1. Two commits became empty during reordering (their content was already incorporated by earlier commits in the new order) and were dropped, bringing the total from 96 → 92.


Part A — Upstreamable (52 commits)

Patches that are either already upstream, pending upstream, or candidates for upstreaming to GHC HEAD.

A1. Compiler & Bootstrap Compatibility (6 commits)

# Hash Subject Upstream Status
1 749b7fbd46 Conditionalize ghc-internal dependency on ghc version Not yet
2 b16af54c68 Allow building with boot compiler without ghc-internal Not yet
3 7ba3136768 Allow Core plugins to access unoptimized Core (#23337) ✅ Merged — !14759
4 0d3ead9626 Print fully qualified unit names in name mismatch Not yet
5 2ea64e70ca Better 'could not execute' error message Not yet
6 5295374c8e system-cxx-std-lib: use cxx instead of c Not yet (prior attempt: !10116)

A2. Tooling Improvements (4 commits)

# Hash Subject Upstream Status
7 7103d3c8ea ghc-pkg: mermaid diagram generation Not yet
8 046f672e3f ghc-pkg: --target support Not yet
9 d527f4b766 ghc-pkg: add unitDataDir field Not yet
10 3c34ec9c8e deriveConstant: support .bss section symbols (#26393) ✅ Merged — !14795

A3. Platform & Config (3 commits)

# Hash Subject Upstream Status
11 60ff5de9bb Normalise LLVM target triple for Apple platforms Not yet
12 5b701750ee ghc-internal: Add --with-compiler configure option Not yet
13 261d120c09 gitignore: add AI coding assistant files Not yet

A4. Static Linking Feature (13 commits)

# Hash Subject Upstream Status
14 b28d5385eb compiler: add -no-rts flag Not yet
15 95d01932f6 Support statically linking executables properly ✅ Merged — !14935
16 d55306c766 Warn when "-dynamic" mixed with "-staticlib" Part of static linking series
17 05e275c9ed Move wasm "ways" constraints to makeDynFlagsConsistent Part of static linking series
18 d7cad13751 Rename LinkBinary/BinaryLinkMode Part of static linking series
19 9d18299086 Make sure 'extra-libraries-static' consistently defined Part of static linking series
20 ca3303e3a7 Add -exclude-static-external Part of static linking series
21 ae7cf2f389 Add test for -fully-static Part of static linking series
22 5f612650df Fix docs Part of static linking series
23 a0f9a79cc5 Better error handling when linking statically Part of static linking series
24 4a54d221a8 GHC: enable PIC on linux/freebsd x86_64 Part of static linking series
25 17ef33b955 Add test for -static-external Part of static linking series
26 ff15b1dd38 Fix mostly-static test on windows Part of static linking series

A5. Linker Refactoring (3 commits)

# Hash Subject Upstream Status
27 7ddcaa61f9 Build external interpreter program on demand (#24731) ✅ Merged — !15029
28 b9bf745816 Fix comment to match renamed linkExecutable Not yet
29 bb8b9ff4e1 ghc-bin, ghc-iserv: export RTS symbols for dynamic code loading Not yet

A6. RTS Bug Fixes (7 commits)

# Hash Subject Upstream Status
30 e6028886f6 Use modern __atomic builtins in atomic.c Not yet (related: !15434, #26729)
31 d67d39f96a Fix object file format detection in loadArchive Not yet
32 509e1d350c Initialize gc_thread timing fields Not yet
33 1d7b991c45 Add stgCallocAlignedBytes with zeroing semantics Not yet
34 47e5861d31 Fix negative exit_elapsed_ns on Alpine/musl Not yet
35 cf2c0ddd25 rts: fix RTS linker for dynamic GHC builds Not yet
36 8b8324a99e On-demand archive prelinking for GHC internal linker Not yet

A7. AArch64 NCG (1 squashed commit, was 3)

# Hash Subject Upstream Status
37 b22503b15d AArch64 NCG: peephole optimizer, new instructions, codegen improvements Not yet

Squashed from 3 commits: peephole optimizer + inline memcpy/memset fix + @pageoff relocation folding. Includes LDP/STP formation, TBZ/TBNZ, CSEL/CSINC/CSNEG, far branch handling, and pointer tag folding (~34KB binary size reduction).

A8. WASM Backend (6 commits)

# Hash Subject Upstream Status
38 343f0fdd06 On-demand GlobalRegs compilation for WASM Not yet
39 16d6af68ca Fix NCG .functype and .size emission for WASM Not yet
40 6fa2b3853b CLOSURE import annotations for C data in .cmm Not yet
41 6eb9d3e8d7 Guard dladdr/Dl_info against WASM/WASI Not yet
42 982b7224e0 Exclude libffi-clib for WASM/WASI Not yet
43 bc31f0bfe4 Fix clockid_t type for WASI Not yet

A9. Windows (1 commit)

# Hash Subject Upstream Status
44 8d5879c159 Fix PIC jump tables on Windows (#24016) ✅ Merged — !14876

A10. Test & Platform Fixes (8 commits)

# Hash Subject Upstream Status
45 47d9e1c1bc Filter ld garbage on mac Not yet
46 86a8634ccd Bump Cabal submodule (tarball extraction race fix) Not yet
47 b3ddb8ebd8 T20010 broken on darwin/non-dynamic too Not yet
48 6dc6bad1bf T13786 not broken on linux with non-dynamic Not yet
49 f2ba7e1466 Skip uniques test if no git repo Not yet
50 9cd1578e41 Mark T25240 as fragile Not yet
51 338c911d89 Mark T7040_ghci fragile on darwin x86_64 Not yet
52 04a1d2a12c Mark T13786 as fragile on darwin x86_64 Not yet

Part B — Bridge / Maybe-Upstreamable (4 commits)

Commits that serve both upstream and fork needs, or whose upstreamability depends on context.

# Hash Subject
53 699c7b74e7 genprimopcode: add --wrappers/--prim-module
54 18cf7a5aaf rts: check if we need -lm in configure
55 8b176a4795 compiler: fixes for dynamic GHC builds
56 7f21d9367b testsuite: adapt to cabal update, gate plugins-external

Part C — Fork-Specific (36 commits)

Commits specific to the Stable Haskell build system, branding, CI, and infrastructure. Not intended for upstream.

C1. RTS Modularization & Split (5 commits)

# Hash Subject
57 adabe3fdb6 Modularize RTS: extract rts-headers and rts-fs
58 8b181b6e15 unlit: use rts prefix
59 35ce1ff4dc rts: split into sub-libraries
60 a3aa746842 testsuite: rts split adjustments
61 2b07e66afe Link against rts sublib too

C2. Build System (5 commits)

# Hash Subject
62 791e0bdf25 cabal: use feature/cross-compile branch
63 b2be57251a libffi: drop
64 5ebcd7c3a7 Implement cabal-based multi-stage build system
65 4405a8ffd7 Rewrite Makefile build system with improved structure
66 b951f6c337 Add note about stage2

C3. Build Miscellany (6 commits)

# Hash Subject
67 b18cf6de39 Add .envrc
68 2d9ee6a155 ghc-config: add more fields
69 f676c44b76 Ignore LLVM Version
70 6d2caa6b1d Fix FreeBSD stage2/stage3
71 a993682672 docs: consolidate building/contributing into README
72 fd0b99ebf0 [stage1] remove hard ghc-internal/ghc-heap dependency

C4. Submodule Management & libffi (4 commits)

# Hash Subject
73 4d3eee79c9 Add bundled libffi-clib
74 41d22923ec Update cabal to support GHCs new '-fully-static'
75 ebbb3a5962 Remove gitlab submodules
76 1eb1d85c03 Remove the rest of the submodules

C5. Dynamic Builds (3 commits)

# Hash Subject
77 bade0141e0 build: infrastructure for DYNAMIC=1 builds
78 af07a242f8 rts: add dynamic linking support for RTS sublibraries
79 842ff27c2d testsuite: adjustments for RTS split and dynamic GHC builds

C6. Platform Support & Branding (5 commits)

# Hash Subject
80 4b92f9354c Windows support
81 71ad1f2cfe ghc-toolchain hack adding ways
82 9336e48cea Rebrand as Stable Haskell Edition
83 225892f6bd Update test expectations for Stable Haskell bug report URL
84 5464d672bc Bump mac x86 runners to macOS-15-intel

C7. CI, Metrics & Fork-Specific Tests (8 commits)

# Hash Subject
85 cefd9f4624 ci: add dynamic build matrix to GitHub workflows
86 4977f1122f CI: Add release workflow with artifact handling
87 a242842be1 Add build metrics: QUIET mode, timing, CI instrumentation
88 15e3cdc669 TESTS: Add missing EXTRA_HC_OPTS
89 3f2f492be2 Update T20604 stdout
90 9b71ceff52 wasm: fix WASM build configuration in Makefile
91 a193fe382f hsc2hs: batch cross-compilation for massive speedup (#154)
92 7968d7c725 gitignore: add local WASM toolchain artifacts

Verification

git diff origin/stable-ghc-9.14 reorg2/stable-ghc-9.14
# (empty — trees are identical)

Upstream Summary

5 commits already merged upstream:

  • !14759 — Core plugins (#23337)
  • !14795 — deriveConstants .bss (#26393)
  • !14876 — Windows PIC jump tables (#24016)
  • !14935 — Static linking
  • !15029 — Build iserv on demand (#24731)

~47 upstreamable commits remaining, including the AArch64 NCG improvements, WASM backend fixes, RTS bug fixes, and static linking follow-ups.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions