[Git][ghc/ghc][wip/ghc-9.8-forward-ports] 23 commits: ghc-toolchain: Initial commit

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Tue Jul 25 13:29:46 UTC 2023



Ben Gamari pushed to branch wip/ghc-9.8-forward-ports at Glasgow Haskell Compiler / GHC


Commits:
83cbc672 by Ben Gamari at 2023-07-24T07:40:49+00:00
ghc-toolchain: Initial commit

- - - - -
31dcd26c by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00
ghc-toolchain: Toolchain Selection

This commit integrates ghc-toolchain, the brand new way of configuring
toolchains for GHC, with the Hadrian build system, with configure, and
extends and improves the first iteration of ghc-toolchain.

The general overview is

* We introduce a program invoked `ghc-toolchain --triple=...` which, when run,
  produces a file with a `Target`. A `GHC.Toolchain.Target.Target`
  describes the properties of a target and the toolchain (executables
  and configured flags) to produce code for that target

* Hadrian was modified to read Target files, and will both
  * Invoke the toolchain configured in the Target file as needed
  * Produce a `settings` file for GHC based on the Target file for that stage

* `./configure` will invoke ghc-toolchain to generate target files, but
  it will also generate target files based on the flags configure itself
  configured (through `.in` files that are substituted)

  * By default, the Targets generated by configure are still (for now) the ones used by Hadrian

  * But we additionally validate the Target files generated by
    ghc-toolchain against the ones generated by configure, to get a head
    start on catching configuration bugs before we transition
    completely.

  * When we make that transition, we will want to drop a lot of the
    toolchain configuration logic from configure, but keep it otherwise.

* For each compiler stage we should have 1 target file (up to a stage compiler we can't run in our machine)
  * We just have a HOST target file, which we use as the target for stage0
  * And a TARGET target file, which we use for stage1 (and later stages, if not cross compiling)
  * Note there is no BUILD target file, because we only support cross compilation where BUILD=HOST
  * (for more details on cross-compilation see discussion on !9263)

See also
* Note [How we configure the bundled windows toolchain]
* Note [ghc-toolchain consistency checking]
* Note [ghc-toolchain overview]

Ticket: #19877
MR: !9263

- - - - -
a732b6d3 by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00
Add flag to enable/disable ghc-toolchain based configurations

This flag is disabled by default, and we'll use the
configure-generated-toolchains by default until we remove the toolchain
configuration logic from configure.

- - - - -
61eea240 by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00
Split ghc-toolchain executable to new packge

In light of #23690, we split the ghc-toolchain executable out of the
library package to be able to ship it in the bindist using Hadrian.

Ideally, we eventually revert this commit.

- - - - -
38e795ff by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00
Ship ghc-toolchain in the bindist

Add the ghc-toolchain binary to the binary distribution we ship to
users, and teach the bindist configure to use the existing ghc-toolchain.

- - - - -
32cae784 by Matthew Craven at 2023-07-24T16:48:24-04:00
Kill off gen_bytearray_addr_access_ops.py

The relevant primop descriptions are now
generated directly by genprimopcode.

This makes progress toward fixing #23490, but it is not
a complete fix since there is more than one way in which
cabal-reinstall (hadrian/build build-cabal) is broken.

- - - - -
02e6a6ce by Matthew Pickering at 2023-07-24T16:49:00-04:00
compiler: Remove unused `containers.h` include

Fixes #23712

- - - - -
822ef66b by Matthew Pickering at 2023-07-25T08:44:50-04:00
Fix pretty printing of WARNING pragmas

There is still something quite unsavoury going on with WARNING pragma
printing because the printing relies on the fact that for decl
deprecations the SourceText of WarningTxt is empty. However, I let that
lion sleep and just fixed things directly.

Fixes #23465

- - - - -
e7b38ede by Matthew Pickering at 2023-07-25T08:45:28-04:00
ci-images: Bump to commit which has 9.6 image

The test-bootstrap job has been failing for 9.6 because we accidentally
used a non-master commit.

- - - - -
bb408936 by Matthew Pickering at 2023-07-25T08:45:28-04:00
Update bootstrap plans for 9.6.2 and 9.4.5

- - - - -
a7e7b83b by Ben Gamari at 2023-07-25T09:25:58-04:00
hadrian: Ensure that way-flags are passed to CC

Previously the way-specific compilation flags (e.g. `-DDEBUG`,
`-DTHREADED_RTS`) would not be passed to the CC invocations. This meant
that C dependency files would not correctly reflect
dependencies predicated on the way, resulting in the rather
painful #23554.

Closes #23554.

- - - - -
251e7852 by Ben Gamari at 2023-07-25T09:26:02-04:00
Bump deepseq submodule to 1.5.

And bump bounds

(cherry picked from commit 1228d3a4a08d30eaf0138a52d1be25b38339ef0b)

- - - - -
2aaafb94 by Ben Gamari at 2023-07-25T09:26:02-04:00
configure: Bump minimal boot GHC version to 9.4

(cherry picked from commit d3ffdaf9137705894d15ccc3feff569d64163e8e)

- - - - -
f84ac0d2 by Ben Gamari at 2023-07-25T09:26:02-04:00
template-haskell: Bump version to 2.21.0.0

(cherry picked from commit bf57fc9aea1196f97f5adb72c8b56434ca4b87cb)

- - - - -
7adcac75 by Ben Gamari at 2023-07-25T09:26:02-04:00
base: Bump version to 4.19

Updates all boot library submodules.

(cherry picked from commit 433d99a3c24a55b14ec09099395e9b9641430143)

- - - - -
c5c8f4d3 by Ben Gamari at 2023-07-25T09:26:02-04:00
testsuite: Normalise versions more aggressively

In backpack hashes can contain `+` characters.

(cherry picked from commit 024861af51aee807d800e01e122897166a65ea93)

- - - - -
3e00f1f5 by Ben Gamari at 2023-07-25T09:26:02-04:00
testsuite: Declare bkpcabal08 as fragile

Due to spurious output changes described in #23648.

(cherry picked from commit c046a2382420f2be2c4a657c56f8d95f914ea47b)

- - - - -
c8b51063 by Ben Gamari at 2023-07-25T09:26:02-04:00
gitlab-ci: Only mark linker_unload_native as broken in static jobs

This test passes on dynamically-linked Alpine.

(cherry picked from commit f356a7e8ec8ec3d6b2b30fd175598b9b80065d87)

- - - - -
5946a39e by Ben Gamari at 2023-07-25T09:26:24-04:00
Update generate_bootstrap_plans

(cherry picked from commit c86a40553b37ba24d53586b3fe1f081ee32fae90)

- - - - -
6a242e4b by Ben Gamari at 2023-07-25T09:26:38-04:00
hadrian/bootstrap: Drop GHC 9.2 plans

(cherry picked from commit d58049efefd632e668b276357d6469b270587209)

- - - - -
f318dec2 by Ben Gamari at 2023-07-25T09:27:09-04:00
hadrian/bootstrap: Add 9.6.2 plans

(cherry picked from commit a79d1806ed887a64f79fea25921711caef2ae108)

- - - - -
c03d8b45 by Ben Gamari at 2023-07-25T09:28:07-04:00
hadrian/bootstrap: Regenerate existing plans

(cherry picked from commit 4f142ee9ab0cca0274c33df6c49972cb40744a6c)

- - - - -
5398fa6f by Ben Gamari at 2023-07-25T09:28:08-04:00
testsuite: Update base-exports

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- − compiler/GHC/Builtin/gen_bytearray_addr_access_ops.py
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Data/Word64Map.hs
- compiler/GHC/Data/Word64Map/Internal.hs
- compiler/GHC/Data/Word64Map/Lazy.hs
- compiler/GHC/Data/Word64Map/Strict.hs
- compiler/GHC/Data/Word64Map/Strict/Internal.hs
- compiler/GHC/Data/Word64Set.hs
- compiler/GHC/Data/Word64Set/Internal.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Linker/Static.hs
- compiler/GHC/Platform.hs
- compiler/GHC/Unit/Module/Warnings.hs
- compiler/GHC/Utils/Containers/Internal/BitUtil.hs
- compiler/GHC/Utils/Containers/Internal/StrictPair.hs
- compiler/ghc.cabal.in
- configure.ac
- distrib/configure.ac.in
- ghc/ghc-bin.cabal.in
- hadrian/.gitignore
- hadrian/bindist/Makefile
- hadrian/bindist/config.mk.in
- hadrian/bootstrap/generate_bootstrap_plans
- − hadrian/bootstrap/plan-9_2_1.json
- − hadrian/bootstrap/plan-9_2_2.json
- − hadrian/bootstrap/plan-9_2_3.json
- − hadrian/bootstrap/plan-9_2_4.json


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3f4768efb9c857cfc97a12fa8ce568d71e5bbe65...5398fa6f924da36cf16c2b5544002344499108c8

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3f4768efb9c857cfc97a12fa8ce568d71e5bbe65...5398fa6f924da36cf16c2b5544002344499108c8
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230725/830003e9/attachment-0001.html>


More information about the ghc-commits mailing list