[Git][ghc/ghc][wip/supersven/hadrian-cross-stage3] 45 commits: Support more x86 extensions: AVX-512 {BW,DQ,VL} and GFNI
Sven Tennie pushed to branch wip/supersven/hadrian-cross-stage3 at Glasgow Haskell Compiler / GHC Commits: 14f485ee by ARATA Mizuki at 2026-02-17T09:09:24+09:00 Support more x86 extensions: AVX-512 {BW,DQ,VL} and GFNI Also, mark AVX-512 ER and PF as deprecated. AVX-512 instructions can be used for certain 64-bit integer vector operations. GFNI can be used to implement bitReverse (currently not used by NCG, but LLVM may use it). Closes #26406 Addresses #26509 - - - - - 016f79d5 by fendor at 2026-02-17T09:16:16-05:00 Hide implementation details from base exception stack traces Ensure we hide the implementation details of the exception throwing mechanisms: * `undefined` * `throwSTM` * `throw` * `throwIO` * `error` The `HasCallStackBacktrace` should always have a length of exactly 1, not showing internal implementation details in the stack trace, as these are vastly distracting to end users. CLC proposal [#387](https://github.com/haskell/core-libraries-committee/issues/387) - - - - - 4f2840f2 by Brian J. Cardiff at 2026-02-17T17:04:08-05:00 configure: Accept happy-2.2 In Jan 2026 happy-2.2 was released. The most sensible change is https://github.com/haskell/happy/issues/335 which didn't trigger in a fresh build - - - - - 10b4d364 by Duncan Coutts at 2026-02-17T17:04:52-05:00 Fix errors in the documentation of the eventlog STOP_THREAD status codes Fix the code for BlockedOnMsgThrowTo. Document all the known historical warts. Fixes issue #26867 - - - - - c5e15b8b by Phil de Joux at 2026-02-18T05:07:36-05:00 haddock: use snippets for all list examples - generate snippet output for docs - reduce font size to better fit snippets - Use only directive to guard html snippets - Add latex snippets for lists - - - - - d388bac1 by Phil de Joux at 2026-02-18T05:07:36-05:00 haddock: Place the snippet input and output together - Put the output seemingly inside the example box - - - - - 016fa306 by Samuel Thibault at 2026-02-18T05:08:35-05:00 Fix linking against libm by moving the -lm option For those systems that need -lm for getting math functions, this is currently added on the link line very early, before the object files being linked together. Newer toolchains enable --as-needed by default, which means -lm is ignored at that point because no object requires a math function yet. With such toolchains, we thus have to add -lm after the objects, so the linker actually includes libm in the link. - - - - - 68bd0805 by Teo Camarasu at 2026-02-18T05:09:19-05:00 ghc-internal: Move GHC.Internal.Data.Bool to base This is a tiny module that only defines bool :: Bool -> a -> a -> a. We can just move this to base and delete it from ghc-internal. If we want this functionality there we can just use a case statement or if-then expression. Resolves 26865 - - - - - 4be6eff8 by Matthew Pickering at 2026-02-19T19:32:30+01:00 Add missing req_interp modifier to T18441fail3 and T18441fail19 These tests require the interpreter but they were failing in a different way with the javascript backend because the interpreter was disabled and stderr is ignored by the test. - - - - - a1cc6956 by Matthew Pickering at 2026-02-19T19:32:30+01:00 Use explicit syntax rather than pure - - - - - 9ceeae6c by Matthew Pickering at 2026-02-19T19:32:30+01:00 packaging: correctly propagate build/host/target to bindist configure script At the moment the host and target which we will produce a compiler for is fixed at the initial configure time. Therefore we need to persist the choice made at this time into the installation bindist as well so we look for the right tools, with the right prefixes at install time. In the future, we want to provide a bit more control about what kind of bindist we produce so the logic about what the host/target will have to be written by hadrian rather than persisted by the configure script. In particular with cross compilers we want to either build a normal stage 2 cross bindist or a stage 3 bindist, which creates a bindist which has a native compiler for the target platform. Fixes #21970 - - - - - 8843ce11 by Matthew Pickering at 2026-02-19T19:32:30+01:00 hadrian: Fill in more of the default.host toolchain file When you are building a cross compiler this file will be used to build stage1 and it's libraries, so we need enough information here to work accurately. There is still more work to be done (see for example, word size is still fixed). - - - - - eaa41a41 by Matthew Pickering at 2026-02-19T19:32:30+01:00 hadrian: Disable docs when cross compiling Before there were a variety of ad-hoc places where doc building was disabled when cross compiling. * Some CI jobs sets --docs=none in gen_ci.hs * Some CI jobs set --docs=none in .gitlab/ci.sh * There was some logic in hadrian to not need the ["docs"] target when making a bindist. Now the situation is simple: * If you are cross compiling then defaultDocsTargets is empty by default. In theory, there is no reason why we can't build documentation for cross compiler bindists, but this is left to future work to generalise the documentation building rules to allow this (#24289) - - - - - b057e7b1 by Matthew Pickering at 2026-02-19T19:32:30+01:00 hadrian: Build stage 2 cross compilers * Most of hadrian is abstracted over the stage in order to remove the assumption that the target of all stages is the same platform. This allows the RTS to be built for two different targets for example. * Abstracts the bindist creation logic to allow building either normal or cross bindists. Normal bindists use stage 1 libraries and a stage 2 compiler. Cross bindists use stage 2 libararies and a stage 2 compiler. * hadrian: Make binary-dist-dir the default build target. This allows us to have the logic in one place about which libraries/stages to build with cross compilers. Fixes #24192 New hadrian target: * `binary-dist-dir-cross`: Build a cross compiler bindist (compiler = stage 1, libraries = stage 2) This commit also contains various changes to make stage2 compilers feasible. ------------------------- Metric Decrease: ManyAlternatives MultiComponentModulesRecomp MultiLayerModulesRecomp T10421 T12425 T12707 T13035 T13379 T15703 T16577 T18698a T18698b T18923 T1969 T21839c T3294 T4801 T5030 T5321Fun T5642 T783 T9198 T9872d T9961 parsing001 T5321FD T6048 T12227 T18140 T18282 T9233 T5631 T9630 ------------------------- Co-authored-by: Sven Tennie <sven.tennie@gmail.com> Fix rebase: settings-use-distro-mingw is now staged - - - - - be8af267 by Matthew Pickering at 2026-02-19T19:32:30+01:00 ci: Test cross bindists We remove the special logic for testing in-tree cross compilers and instead test cross compiler bindists, like we do for all other platforms. - - - - - 5088ca0b by Matthew Pickering at 2026-02-19T19:32:30+01:00 ci: Introduce CROSS_STAGE variable In preparation for building and testing stage3 bindists we introduce the CROSS_STAGE variable which is used by a CI job to determine what kind of bindist the CI job should produce. At the moment we are only using CROSS_STAGE=2 but in the future we will have some jobs which set CROSS_STAGE=3 to produce native bindists for a target, but produced by a cross compiler, which can be tested on by another CI job on the native platform. CROSS_STAGE=2: Build a normal cross compiler bindist CROSS_STAGE=3: Build a stage 3 bindist, one which is a native compiler and library for the target - - - - - a790621a by Matthew Pickering at 2026-02-19T19:32:30+01:00 hadrian: Refactor system-cxx-std-lib rules0 I noticed a few things wrong with the hadrian rules for `system-cxx-std-lib` rules. * For `text` there is an ad-hoc check to depend on `system-cxx-std-lib` outside of `configurePackage`. * The `system-cxx-std-lib` dependency is not read from cabal files. * Recache is not called on the packge database after the `.conf` file is generated, a more natural place for this rule is `registerRules`. Treating this uniformly like other packages is complicated by it not having any source code or a cabal file. However we can do a bit better by reporting the dependency firstly in `PackageData` and then needing the `.conf` file in the same place as every other package in `configurePackage`. Fixes #25303 - - - - - ab28e95d by Sven Tennie at 2026-02-19T19:32:30+01:00 ci: Increase timeout for emulators Test runs with emulators naturally take longer than on native machines. Generate jobs.yml - - - - - 0d0560d1 by Sven Tennie at 2026-02-19T19:32:30+01:00 ghc: Distinguish between having an interpreter and having an internal one Otherwise, we fail with warnings when compiling tools. Actually, these are related but different things: - ghc can run an interpreter (either internal or external) - ghc is compiled with an internal interpreter - - - - - f19f6046 by Matthew Pickering at 2026-02-19T19:32:30+01:00 ci: Javascript don't set CROSS_EMULATOR There is no CROSS_EMULATOR needed to run javascript binaries, so we don't set the CROSS_EMULATOR to some dummy value. - - - - - 7ed62118 by Sven Tennie at 2026-02-19T19:32:30+01:00 Javascript skip T23697 See #22355 about how HSC2HS and the Javascript target don't play well together. - - - - - f737508e by Sven Tennie at 2026-02-19T19:32:30+01:00 Mark T24602 as fragile It was skipped before (due to CROSS_EMULATOR being set, which changed for JS), so we don't make things worse by marking it as fragile. - - - - - adf2a1cf by Sven Tennie at 2026-02-19T19:32:30+01:00 Windows needs NM_STAGE0 as well The stage0 always needs nm. - - - - - ce84d7ad by Sven Tennie at 2026-02-19T19:32:30+01:00 T17912 sometimes works for windows-validate This seems to be timing related. However, just simply increasing the timeout (sleep) statement of this test didn't help. Maybe, it has been flaky on CI before. - - - - - 2595998a by Sven Tennie at 2026-02-19T19:32:30+01:00 Add haddock to `NoEmulatorNeeded TimeoutIncrease` - - - - - 68d3462f by Sven Tennie at 2026-02-19T19:32:30+01:00 Delete done TODO - - - - - 0ad7d3c1 by Sven Tennie at 2026-02-19T19:32:30+01:00 Delete done TODO - - - - - 4b5dfb69 by Sven Tennie at 2026-02-19T19:32:30+01:00 Remove cross special case of performance flavour - - - - - 9ddc73f9 by Sven Tennie at 2026-02-19T19:32:30+01:00 Delete obsolete iserv comment - - - - - ff18fd86 by Sven Tennie at 2026-02-19T19:32:30+01:00 No more cross stage special cases - - - - - 537146ee by Sven Tennie at 2026-02-19T19:32:30+01:00 Delete libffi-tarballs Must have been an accidential commit... - - - - - 08d0f95a by Sven Tennie at 2026-02-19T19:32:30+01:00 Fix commented out code - - - - - 3c41ceea by Sven Tennie at 2026-02-19T19:32:30+01:00 Remove trace log - - - - - 9179f498 by Sven Tennie at 2026-02-19T19:32:30+01:00 configure.ac: Remove unnecessay blank - - - - - a291b7ab by Sven Tennie at 2026-02-19T19:32:30+01:00 Drop Rules.Libffi - - - - - 234aa8ca by Sven Tennie at 2026-02-21T15:23:08+01:00 Delete targetSupportsGhciObjects - - - - - 88af975d by Sven Tennie at 2026-02-21T16:33:44+01:00 Enable stage3 bin-dists - - - - - 47a7b892 by Sven Tennie at 2026-02-21T16:33:45+01:00 Generated cross stage 3 CI jobs - - - - - ba6a9339 by Sven Tennie at 2026-02-21T16:33:45+01:00 Hack - - - - - c24ef23a by Sven Tennie at 2026-02-21T16:33:45+01:00 WIP: Validate script - - - - - c76a9106 by Sven Tennie at 2026-02-21T16:33:45+01:00 Fix stage3 bindist creation - - - - - 393050c9 by Sven Tennie at 2026-02-21T16:33:45+01:00 Adjust jobs.yaml - - - - - 79793b48 by Sven Tennie at 2026-02-21T16:33:45+01:00 Fix final ghc-pkg recache run Sage3 cross-compiler's ghc-pkg cannot run on the build host. Resort to a prior stage's ghc-pkg. - - - - - c0e14c84 by Sven Tennie at 2026-02-21T16:33:45+01:00 Bindist name must start with ghc* - - - - - c52a9b51 by Sven Tennie at 2026-02-21T16:33:45+01:00 Increase generate-ci happyness Pass its checks by adding some metadata. - - - - - 180 changed files: - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - compiler/GHC/CmmToAsm/Config.hs - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/Driver/Config/CmmToAsm.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Linker/Dynamic.hs - compiler/GHC/SysTools/Cpp.hs - configure.ac - distrib/configure.ac.in - docs/users_guide/9.16.1-notes.rst - docs/users_guide/eventlog-formats.rst - docs/users_guide/phases.rst - docs/users_guide/using.rst - ghc/GHC/Driver/Session/Mode.hs - ghc/GHCi/UI.hs - ghc/Main.hs - ghc/ghc-bin.cabal.in - hadrian/README.md - hadrian/bindist/config.mk.in - hadrian/cfg/default.host.target.in - + hadrian/cfg/system.config.host.in - hadrian/cfg/system.config.in - + hadrian/cfg/system.config.target.in - hadrian/hadrian.cabal - hadrian/src/Base.hs - + hadrian/src/BindistConfig.hs - hadrian/src/Builder.hs - hadrian/src/Context.hs - hadrian/src/Expression.hs - hadrian/src/Flavour.hs - hadrian/src/Flavour/Type.hs - hadrian/src/Hadrian/Builder.hs - hadrian/src/Hadrian/Haskell/Cabal/Parse.hs - hadrian/src/Hadrian/Haskell/Cabal/Type.hs - hadrian/src/Hadrian/Haskell/Hash.hs - hadrian/src/Hadrian/Oracles/TextFile.hs - hadrian/src/Oracles/Flag.hs - hadrian/src/Oracles/Flavour.hs - hadrian/src/Oracles/Setting.hs - hadrian/src/Oracles/TestSettings.hs - hadrian/src/Packages.hs - hadrian/src/Rules.hs - hadrian/src/Rules/BinaryDist.hs - hadrian/src/Rules/CabalReinstall.hs - hadrian/src/Rules/Compile.hs - hadrian/src/Rules/Documentation.hs - hadrian/src/Rules/Generate.hs - hadrian/src/Rules/Gmp.hs - hadrian/src/Rules/Library.hs - hadrian/src/Rules/Program.hs - hadrian/src/Rules/Register.hs - hadrian/src/Rules/Test.hs - hadrian/src/Settings.hs - hadrian/src/Settings/Builders/Cabal.hs - hadrian/src/Settings/Builders/Common.hs - hadrian/src/Settings/Builders/Configure.hs - hadrian/src/Settings/Builders/DeriveConstants.hs - hadrian/src/Settings/Builders/Ghc.hs - hadrian/src/Settings/Builders/Hsc2Hs.hs - hadrian/src/Settings/Builders/RunTest.hs - hadrian/src/Settings/Builders/SplitSections.hs - hadrian/src/Settings/Default.hs - hadrian/src/Settings/Flavours/Benchmark.hs - hadrian/src/Settings/Flavours/Development.hs - hadrian/src/Settings/Flavours/GhcInGhci.hs - hadrian/src/Settings/Flavours/Performance.hs - hadrian/src/Settings/Flavours/Quick.hs - hadrian/src/Settings/Flavours/QuickCross.hs - hadrian/src/Settings/Flavours/Quickest.hs - hadrian/src/Settings/Flavours/Validate.hs - hadrian/src/Settings/Packages.hs - hadrian/src/Settings/Program.hs - hadrian/src/Settings/Warnings.hs - libraries/base/changelog.md - libraries/base/src/Data/Bool.hs - libraries/base/src/Data/List.hs - libraries/base/src/Data/List/NubOrdSet.hs - libraries/base/src/GHC/Exts.hs - libraries/base/tests/IO/all.T - libraries/base/tests/all.T - libraries/ghc-internal/ghc-internal.cabal.in - − libraries/ghc-internal/src/GHC/Internal/Data/Bool.hs - libraries/ghc-internal/src/GHC/Internal/Data/Foldable.hs - libraries/ghc-internal/src/GHC/Internal/Data/Function.hs - libraries/ghc-internal/src/GHC/Internal/Data/Type/Bool.hs - libraries/ghc-internal/src/GHC/Internal/Data/Type/Ord.hs - libraries/ghc-internal/src/GHC/Internal/Data/Version.hs - libraries/ghc-internal/src/GHC/Internal/Exception.hs - libraries/ghc-internal/src/GHC/Internal/IO/FD.hs - libraries/ghc-internal/src/GHC/Internal/JS/Prim.hs - libraries/ghc-internal/src/GHC/Internal/STM.hs - libraries/ghc-internal/src/GHC/Internal/System/IO/OS.hs - libraries/ghc-internal/src/GHC/Internal/TH/Lift.hs - libraries/ghc-internal/src/GHC/Internal/TypeError.hs - + libraries/ghc-internal/tests/backtraces/T15395.hs - + libraries/ghc-internal/tests/backtraces/T15395.stdout - libraries/ghc-internal/tests/backtraces/all.T - libraries/ghc-internal/tests/stack-annotation/ann_frame005.stdout - m4/fp_find_nm.m4 - m4/fptools_happy.m4 - m4/fptools_set_platform_vars.m4 - m4/prep_target_file.m4 - testsuite/driver/cpu_features.py - testsuite/ghc-config/ghc-config.hs - testsuite/tests/arrows/should_compile/T21301.stderr - testsuite/tests/codeGen/should_gen_asm/all.T - + testsuite/tests/codeGen/should_gen_asm/avx512-int64-minmax.asm - + testsuite/tests/codeGen/should_gen_asm/avx512-int64-minmax.hs - + testsuite/tests/codeGen/should_gen_asm/avx512-int64-mul.asm - + testsuite/tests/codeGen/should_gen_asm/avx512-int64-mul.hs - + testsuite/tests/codeGen/should_gen_asm/avx512-word64-minmax.asm - + testsuite/tests/codeGen/should_gen_asm/avx512-word64-minmax.hs - testsuite/tests/deSugar/should_fail/DsStrictFail.stderr - testsuite/tests/deSugar/should_run/T20024.stderr - testsuite/tests/deSugar/should_run/dsrun005.stderr - testsuite/tests/deSugar/should_run/dsrun007.stderr - testsuite/tests/deSugar/should_run/dsrun008.stderr - testsuite/tests/deriving/should_run/T9576.stderr - testsuite/tests/ghc-e/should_fail/all.T - testsuite/tests/ghci/scripts/Defer02.stderr - testsuite/tests/ghci/scripts/T15325.stderr - testsuite/tests/javascript/closure/all.T - testsuite/tests/patsyn/should_run/ghci.stderr - testsuite/tests/quotes/LiftErrMsgDefer.stderr - testsuite/tests/safeHaskell/safeLanguage/SafeLang15.stderr - testsuite/tests/simd/should_run/all.T - testsuite/tests/type-data/should_run/T22332a.stderr - testsuite/tests/typecheck/should_run/T10284.stderr - testsuite/tests/typecheck/should_run/T13838.stderr - testsuite/tests/typecheck/should_run/T9497a-run.stderr - testsuite/tests/typecheck/should_run/T9497b-run.stderr - testsuite/tests/typecheck/should_run/T9497c-run.stderr - testsuite/tests/unsatisfiable/T23816.stderr - testsuite/tests/unsatisfiable/UnsatDefer.stderr - utils/haddock/doc/.gitignore - utils/haddock/doc/Makefile - + utils/haddock/doc/_static/haddock-custom.css - utils/haddock/doc/conf.py - utils/haddock/doc/markup.rst - + utils/haddock/doc/snippets/.gitignore - + utils/haddock/doc/snippets/Lists.hs - + utils/haddock/doc/snippets/Makefile - + utils/haddock/doc/snippets/Snippet-List-Bulleted.html - + utils/haddock/doc/snippets/Snippet-List-Bulleted.tex - + utils/haddock/doc/snippets/Snippet-List-Definition.html - + utils/haddock/doc/snippets/Snippet-List-Definition.tex - + utils/haddock/doc/snippets/Snippet-List-Enumerated.html - + utils/haddock/doc/snippets/Snippet-List-Enumerated.tex - + utils/haddock/doc/snippets/Snippet-List-Indentation.html - + utils/haddock/doc/snippets/Snippet-List-Indentation.tex - + utils/haddock/doc/snippets/Snippet-List-Multiline-Item.html - + utils/haddock/doc/snippets/Snippet-List-Multiline-Item.tex - + utils/haddock/doc/snippets/Snippet-List-Nested-Item.html - + utils/haddock/doc/snippets/Snippet-List-Nested-Item.tex - + utils/haddock/doc/snippets/Snippet-List-Not-Newline.html - + utils/haddock/doc/snippets/Snippet-List-Not-Newline.tex - + utils/haddock/doc/snippets/Snippet-List-Not-Separated.html - + utils/haddock/doc/snippets/Snippet-List-Not-Separated.tex - utils/haddock/html-test/ref/A.html - utils/haddock/html-test/ref/Bug1004.html - utils/haddock/html-test/ref/Bug1033.html - utils/haddock/html-test/ref/Bug1103.html - utils/haddock/html-test/ref/Bug548.html - utils/haddock/html-test/ref/Bug923.html - utils/haddock/html-test/ref/ConstructorPatternExport.html - utils/haddock/html-test/ref/FunArgs.html - utils/haddock/html-test/ref/Hash.html - utils/haddock/html-test/ref/Instances.html - utils/haddock/html-test/ref/LinearTypes.html - utils/haddock/html-test/ref/RedactTypeSynonyms.html - utils/haddock/html-test/ref/T23616.html - utils/haddock/html-test/ref/Test.html - utils/haddock/html-test/ref/TypeFamilies3.html - + validate-riscv-bindist.sh The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3a1e1c2b56d150d95d51e54a2e5cf4b... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3a1e1c2b56d150d95d51e54a2e5cf4b... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Sven Tennie (@supersven)