Andreas Klebinger pushed to branch wip/andreask/9.10.4-batch1 at Glasgow Haskell Compiler / GHC
Commits:
315d8125 by sheaf at 2026-05-26T14:31:37+02:00
RecordCon lookup: don't allow a TyCon
This commit adds extra logic when looking up a record constructor.
If GHC.Rename.Env.lookupOccRnConstr returns a TyCon (as it may, due to
the logic explained in Note [Pattern to type (P2T) conversion]),
we emit an error saying that the data constructor is not in scope.
This avoids the compiler falling over shortly thereafter, in the call to
'lookupConstructorInfo' inside 'GHC.Rename.Env.lookupRecFieldOcc',
because the record constructor would not have been a ConLike.
Fixes #25056
(cherry picked from commit da306610b9e58cfb7cf2530ebeec7ee8ad17183a)
- - - - -
01f42448 by Andrew Lelechenko at 2026-05-26T14:32:47+02:00
Bump submodule deepseq to 1.5.1.0
(cherry picked from commit 8e462f4d4bdf2a6c34c249e7be8084565600d300)
- - - - -
e65f2a82 by Wang Xin at 2026-05-26T14:32:47+02:00
Add -mcmodel=medium moduleflag to generated LLVM IR on LoongArch platform
With the Medium code model, the jump range of the generated jump
instruction is larger than that of the Small code model. It's a
temporary fix of the problem descriped in https://gitlab.haskell
.org/ghc/ghc/-/issues/25495. This commit requires that the LLVM
used contains the code of commit 9dd1d451d9719aa91b3bdd59c0c6679
83e1baf05, i.e., version 8.0 and later. Actually we should not
rely on LLVM, so the only way to solve this problem is to implement
the LoongArch backend.
Add new type for codemodel
(cherry picked from commit e70d41406b5d5638b42c4d8222cd03e76bbfeb86)
- - - - -
4418341c by Peng Fan at 2026-05-26T14:32:47+02:00
Pass the mcmodel=medium parameter to CC via GHC
Ensure that GHC-driver builds default to mcmodel=medium, so that GHC
passes this default parameter to CC without having to add it to the
compiled project.
Commit e70d41406b5d5638b42c4d8222cd03e76bbfeb86 does not ensure that all
GHC-built object files have a default model of medium, and will raise an
R_LARCH_B26 overflow error.
(cherry picked from commit 1a3f11314cc7b8dbf9af03dd2ae2cb066a998d63)
- - - - -
6db1e81c by Ben Gamari at 2026-05-26T14:32:47+02:00
rts: Dynamically initialize built-in closures
To resolve #26166 we need to eliminate references to undefined symbols
in the runtime system. One such source of these is the runtime's
static references to `I#` and `C#` due the `stg_INTLIKE` and
`stg_CHARLIKE` arrays.
To avoid this we make these dynamic, initializing them during RTS
start-up.
(cherry picked from commit 39eaaaba5356e3fc9218d8e27375d6de24778cbc)
- - - - -
d0966d37 by Rodrigo Mesquita at 2026-05-26T14:32:47+02:00
Move code-gen aux symbols from ghc-internal to rts
These symbols were all previously defined in ghc-internal and made the
dependency structure awkward, where the rts may refer to some of these
symbols and had to work around that circular dependency the way
described in #26166.
Moreover, the code generator will produce code that uses these symbols!
Therefore, they should be available in the rts:
PRINCIPLE: If the code generator may produce code which uses this
symbol, then it should be defined in the rts rather than, say,
ghc-internal.
That said, the main motivation is towards fixing #26166.
Towards #26166. Pre-requisite of !14892
(cherry picked from commit ba3e5bddb222008591edb6c3d433d93084170571)
(cherry picked from commit f687ce93a4ef71aebac5d5eb891e72a090092ec0)
- - - - -
4ab3132f by Ben Gamari at 2026-05-26T14:32:47+02:00
rts: Avoid static symbol references to ghc-internal
This resolves #26166, a bug due to new constraints placed by Apple's
linker on undefined references.
One source of such references in the RTS is the many symbols referenced
in ghc-internal. To mitigate #26166, we make these references dynamic,
as described in Note [RTS/ghc-internal interface].
Fixes #26166
Co-authored-by: Rodrigo Mesquita
Co-authored-by: Cheng Shao
(cherry picked from commit f31de2a9c2405d6645998460e4b501f9279606b3)
- - - - -
31db96c5 by Ben Gamari at 2026-05-26T14:32:47+02:00
compiler: Rename isMathFun -> isLibcFun
This set includes more than just math functions.
(cherry picked from commit 43fdfddc25c36ef4811941231d5755bad065796d)
(cherry picked from commit 99291e88f0498f11317e0f45c4968583c8c6ef0f)
- - - - -
2c27a1e1 by Ben Gamari at 2026-05-26T14:32:47+02:00
compiler: Add libc allocator functions to libc_funs
Prototypes for these are now visible from `Prim.h`, resulting in
multiple-declaration warnings in the unregisterised job.
(cherry picked from commit 4ed5138f7af532731f88380f98103487a9f15c5a)
(cherry picked from commit d5d081e38f6abf445ad50b355585d2edddfc8173)
- - - - -
e1911282 by Ben Gamari at 2026-05-26T14:32:47+02:00
rts: Minimize header dependencies of Prim.h
Otherwise we will end up with redundant and incompatible declarations
resulting in warnings during the unregisterised build.
(cherry picked from commit 9a0a076b80d6fb68d7722d2bb72c17c90ba22cd1)
(cherry picked from commit ef442bd152400dc550fba2ba5fd90fb0f5454614)
- - - - -
2eeee45d by sheaf at 2026-05-26T14:32:48+02:00
Use x86_64-unknown-windows-gnu target for LLVM on Windows
(cherry picked from commit 21aaa34b703a77f68d3f94e0e9e39ea25499faa2)
- - - - -
679cba7e by sheaf at 2026-05-26T14:32:48+02:00
LLVM: use -relocation-model=pic on Windows
This is necessary to avoid the segfaults reported in #22487.
Fixes #22487
(cherry picked from commit 992a7624817cdab4b566387f2e877f420f7b27d4)
- - - - -
062c10a7 by Andreas Klebinger at 2026-05-26T14:32:48+02:00
rts: CCS.h - Backport CCS_SYSTEM_OR_NULL macro
- - - - -
93a33fc3 by Andreas Klebinger at 2026-05-27T10:35:01+02:00
Accept T20604 changes for now
- - - - -
68 changed files:
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/CmmToAsm/Wasm/FromCmm.hs
- compiler/GHC/CmmToC.hs
- compiler/GHC/CmmToLlvm.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/HsToCore/Foreign/C.hs
- compiler/GHC/Linker/Dynamic.hs
- compiler/GHC/Linker/Static.hs
- hadrian/src/Settings/Packages.hs
- libraries/deepseq
- + libraries/ghc-internal/cbits/RtsIface.c
- libraries/ghc-internal/ghc-internal.cabal.in
- + libraries/ghc-internal/include/RtsIfaceSymbols.h
- libraries/ghc-prim/ghc-prim.cabal
- llvm-targets
- m4/fptools_set_c_ld_flags.m4
- m4/ghc_llvm_target.m4
- + rts/BuiltinClosures.c
- + rts/BuiltinClosures.h
- rts/CloneStack.h
- rts/Compact.cmm
- rts/ContinuationOps.cmm
- rts/Exception.cmm
- rts/Prelude.h
- rts/PrimOps.cmm
- rts/RtsAPI.c
- rts/RtsStartup.c
- rts/RtsSymbols.c
- + rts/RtsToHsIface.c
- rts/StgMiscClosures.cmm
- rts/StgStdThunks.cmm
- rts/configure.ac
- − rts/external-symbols.list.in
- rts/include/Rts.h
- rts/include/RtsAPI.h
- rts/include/Stg.h
- rts/include/rts/Constants.h
- + rts/include/rts/RtsToHsIface.h
- rts/include/rts/Types.h
- rts/include/rts/prof/CCS.h
- rts/include/stg/MiscClosures.h
- rts/include/stg/Prim.h
- rts/posix/Signals.c
- libraries/ghc-prim/cbits/atomic.c → rts/prim/atomic.c
- libraries/ghc-prim/cbits/bitrev.c → rts/prim/bitrev.c
- libraries/ghc-prim/cbits/bswap.c → rts/prim/bswap.c
- libraries/ghc-prim/cbits/clz.c → rts/prim/clz.c
- libraries/ghc-prim/cbits/ctz.c → rts/prim/ctz.c
- + rts/prim/int64x2minmax.c
- libraries/ghc-prim/cbits/longlong.c → rts/prim/longlong.c
- libraries/ghc-prim/cbits/mulIntMayOflo.c → rts/prim/mulIntMayOflo.c
- libraries/ghc-prim/cbits/pdep.c → rts/prim/pdep.c
- libraries/ghc-prim/cbits/pext.c → rts/prim/pext.c
- libraries/ghc-prim/cbits/popcnt.c → rts/prim/popcnt.c
- + rts/prim/vectorQuotRem.c
- libraries/ghc-prim/cbits/word2float.c → rts/prim/word2float.c
- − rts/rts.buildinfo.in
- rts/rts.cabal
- rts/wasm/JSFFI.c
- rts/wasm/scheduler.cmm
- rts/win32/libHSghc-internal.def
- testsuite/tests/driver/T20604/T20604.stdout
- + testsuite/tests/llvm/should_run/T22487.hs
- + testsuite/tests/llvm/should_run/T22487.stdout
- testsuite/tests/llvm/should_run/all.T
- testsuite/tests/typecheck/should_fail/all.T
- utils/deriveConstants/Main.hs
- utils/llvm-targets/gen-data-layout.sh
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/381d513d5d7d88409bc8dce211068b4...
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/381d513d5d7d88409bc8dce211068b4...
You're receiving this email because of your account on gitlab.haskell.org.