1 # Bootstrapping cabal-install
3 This utility is only intended for use in building cabal-install
4 on a new platform. If you already have a functional (if dated) cabal-install
5 please rather run `cabal v2-install`.
7 The typical usage is porting to a new linux architecture,
8 then the `linux-ghcvec.json` file is available in `bootstrap/` folder:
10 On a (linux) system you are bootstrapping, run
12 ./bootstrap/bootstrap.py -d ./bootstrap/linux-ghcver.json -w /path/to-ghc
14 from the top directory of the source checkout.
16 To generate the `platform-ghcver` files for other platforms, do:
18 1. On a system with functional cabal-install, install the same GHC version
19 as you will use to bootstrap on the host system.
21 2. Build a dependency description file (`platform-ghcver.json`, e.g. `linux-8.8.3.json`) by running:
24 cabal v2-build --with-compiler=/path/to/ghc --dry-run cabal-install:exe:cabal
25 cp dist-newstyle/cache/plan.json bootstrap/platform-ghcver.plan.json
26 cabal v2-build --builddir=dist-newstyle-bootstrap --project=cabal.project.bootstrap cabal-bootstrap-gen
27 cabal v2-run -vnormal+stderr --builddir=dist-newstyle-bootstrap --project=cabal.project.bootstrap cabal-bootstrap-gen -- bootstrap/platform-ghcver.plan.json | tee bootstrap/platform-ghcver.json
30 3. You may need to tweak `bootstrap/platform-ghcver.json` file manually,
31 for example toggle flags.
33 There are rules in top-level `Makefile` for generation of these files.