Skip to content

Build GHC with cabal-install and a Makefile #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 169 commits into
base: tmp/make-build-offset
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 94 commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
3b6e7b1
Add github workflow
hsyl20 Nov 15, 2024
7ef5f05
Build GHC with cabal-install and a Makefile
hsyl20 Nov 27, 2024
a03c95c
Generate proper settings for ghc-boot
hsyl20 Nov 27, 2024
b9d460f
Build stage0 tools: ghc-pkg, deriveConstants, genprimopcode
hsyl20 Nov 27, 2024
af7a7ce
Generate proper stage1 settings
hsyl20 Nov 27, 2024
38f96a9
Fix installation of stage1 programs. WIP using stage1 compiler
hsyl20 Nov 28, 2024
4137c76
Fix path to stage1 package db
hsyl20 Nov 28, 2024
304d917
Progress towards building the RTS
hsyl20 Nov 28, 2024
ff24e40
Fix CPP for Cmm
hsyl20 Nov 28, 2024
cd7e255
Apply suggestions
hsyl20 Nov 29, 2024
b878f1a
Allow specifying custom cabal
hsyl20 Dec 3, 2024
07abc0d
Start with deriveConstants
hsyl20 Dec 3, 2024
8b4cdfc
Generate DerivedConstants.h with a hack
hsyl20 Dec 3, 2024
c3eac1b
Pass -this-unit-id because cabal doesn't when it compiles Cmm files
hsyl20 Dec 3, 2024
5fadf5f
Try using per source flags
hsyl20 Dec 11, 2024
a15c85d
Fix rts per file flags
hsyl20 Dec 11, 2024
0b275d3
Generate AutoApply*.cmm
hsyl20 Dec 13, 2024
4388e76
Build libffi
hsyl20 Dec 16, 2024
fce763a
Progress building ghc-prim
hsyl20 Dec 18, 2024
2abe03e
Build ghc-prim
hsyl20 Dec 18, 2024
51994a3
refactor: avoid hack when checking size of struct MD5Context
andreabedini Dec 19, 2024
ad48a08
Build ghc-bignum
hsyl20 Dec 18, 2024
af0275d
WIP: build ghc-internal
hsyl20 Jan 7, 2025
13f1d3c
Fix new error while bootstrapping
hsyl20 Jan 8, 2025
3589356
Fix more stuff
hsyl20 Jan 8, 2025
a63608f
Build base
hsyl20 Jan 8, 2025
3c0c08d
Build statically linked stage0 programs.
hsyl20 Jan 10, 2025
e2397b4
Add Haskell build script
hsyl20 Jan 10, 2025
4fee186
Build stage1 boot libraries with Build.hs
hsyl20 Jan 13, 2025
c9aa65d
Add timing to messages
hsyl20 Jan 13, 2025
cc421cf
Fix messages
hsyl20 Jan 13, 2025
7b0e5ca
Don't wire in the compiler
hsyl20 Jan 14, 2025
dbada6e
Fix options
hsyl20 Jan 14, 2025
d611659
Fix compiler path
hsyl20 Jan 14, 2025
8822716
Minor refactor
hsyl20 Jan 14, 2025
7fd82b1
Fix Makefile to use Build.hs
hsyl20 Jan 14, 2025
d49d25d
Fix Setup scripts
hsyl20 Jan 14, 2025
999b935
Add Alex
hsyl20 Jan 14, 2025
e6e97c7
Use the Makefile in CI
hsyl20 Jan 14, 2025
9da37f0
Comments
hsyl20 Jan 15, 2025
4ff9370
Cleanup
hsyl20 Jan 15, 2025
fd3029f
Generate cabal.project files for easier maintenance and parameterization
hsyl20 Jan 16, 2025
c8fd283
Fix passing ghc-options to the rts when building Cmm
hsyl20 Jan 16, 2025
872ec28
Fix hard-wired paths
hsyl20 Jan 16, 2025
cc91b7e
Fix fs.h for unlit
hsyl20 Jan 20, 2025
2ece465
Build all the boot libraries at once, including the rts
hsyl20 Jan 20, 2025
cc3e24c
Dump logs into files
hsyl20 Jan 20, 2025
5bc6c2d
Fix a few things found while trying to use "cabal install --lib"
hsyl20 Jan 20, 2025
a7570d2
Move Cabal submodule to our patched version
andreabedini Jan 21, 2025
fa5b181
Add patched cabal to Makefile
andreabedini Jan 21, 2025
8a91f42
Add TODO list
andreabedini Jan 21, 2025
0f029f9
Simplify Build.hs dependencies
andreabedini Jan 21, 2025
92816b6
Progress towards cabal-install install --lib
hsyl20 Jan 21, 2025
7e61646
Fix timestamps
hsyl20 Jan 21, 2025
cb88067
Use cabal install --lib to build boot libraries
hsyl20 Jan 22, 2025
9eaa75e
Parse package env
hsyl20 Jan 22, 2025
3e48043
Do not hardcode GHC version into Makefile
andreabedini Jan 23, 2025
9ceb814
chore: add Build.hs to hie.yaml
andreabedini Jan 23, 2025
650c647
Display output from cabal build
andreabedini Jan 23, 2025
ea16e5e
Separate cabal from GHC in GitHub workflow
andreabedini Jan 23, 2025
2e79dba
No need to recache a newly initialised packagedb
andreabedini Jan 24, 2025
d942040
Use GHC 9.8.4 on CI
hsyl20 Jan 24, 2025
f89fd48
Revert "Display output from cabal build"
hsyl20 Jan 24, 2025
678821b
Revert "Do not hardcode GHC version into Makefile"
hsyl20 Jan 24, 2025
461b108
Show logs on failure when building boot libs
hsyl20 Jan 24, 2025
2ee86bd
Add xxhash.h
hsyl20 Jan 24, 2025
733f9e1
Fix after merge of ghc-prim into ghc-internal
hsyl20 Jan 27, 2025
f92289a
Workaround environment file parsing
hsyl20 Jan 27, 2025
768340e
Better fix to package env without package dbs...
hsyl20 Jan 27, 2025
0c2ae8c
Prepare stage1's package db
hsyl20 Jan 27, 2025
f247074
Progress towards building more boot libraries and building stage2
hsyl20 Jan 27, 2025
77c6ed4
Fix package copy
hsyl20 Jan 27, 2025
652d447
Enable TNTC to avoid link issue for now
hsyl20 Jan 27, 2025
c35ce29
Workaround cabal bug with multiple flags
hsyl20 Jan 28, 2025
e25b51a
Try adding ffi to extra-libraries-static
hsyl20 Jan 28, 2025
706168f
Fix FS_NAMESPACE for the rts
hsyl20 Jan 28, 2025
8aae70a
Enable the internal interpreter in stage2 compiler
hsyl20 Jan 29, 2025
bb262b9
Fully enable internal-interpreter in stage2 (it works!)
hsyl20 Jan 29, 2025
a831d53
Build ghc-toolchain
hsyl20 Jan 30, 2025
dfd1b1b
Add TODO
hsyl20 Jan 31, 2025
2e5dff4
ghc-toolchain: allow generation of settings file instead of Target
hsyl20 Jan 31, 2025
ae8d29f
Factor ghcTargetArchOS
hsyl20 Jan 31, 2025
92472a2
Use ghc-toolchain to generate settings
hsyl20 Jan 31, 2025
0b8e217
Build auxiliary programs to allow running the testsuite
hsyl20 Feb 3, 2025
871d635
Build shallow libraries on top of ghc-internal
hsyl20 Feb 3, 2025
83b45c9
Try to add template-haskell and explain what's failing
hsyl20 Feb 3, 2025
7c5fdd8
Allow hsc2hs to find template-hsc.h in GHC's lib directory
hsyl20 Feb 4, 2025
88e70bd
Use custom version of hsc2hs with debug print
hsyl20 Feb 4, 2025
daf7768
Fix typo...
hsyl20 Feb 4, 2025
9c0efcf
Revert "Use custom version of hsc2hs with debug print"
hsyl20 Feb 4, 2025
4ac8ec7
GHC: support compilation without ghcversion.h
hsyl20 Feb 4, 2025
70d1c87
Try to enable template-haskell again
hsyl20 Feb 4, 2025
2f31e55
Remove old comment
hsyl20 Feb 4, 2025
c6f9ab0
Install more boot libraries
hsyl20 Feb 5, 2025
3e1f417
Create bindist dir
hsyl20 Feb 10, 2025
4dea638
Try to upload bindist and to run tests on CI
hsyl20 Feb 10, 2025
22dae31
Add Happy as a source package
hsyl20 Feb 10, 2025
fca96b0
Run stage1 compiler from _build/stage1 instead of _build/stage0 + misc
hsyl20 Feb 10, 2025
11d8e40
Install more tools
hsyl20 Feb 10, 2025
08b61ea
Comment
hsyl20 Feb 10, 2025
a2d9f9b
Fix github url to use https
hsyl20 Feb 10, 2025
7eea216
Install happy directly...
hsyl20 Feb 11, 2025
2e4305d
Use happy from Hackage
hsyl20 Feb 11, 2025
8fdb2f0
Install GHC lib
hsyl20 Feb 11, 2025
31c186f
Install ghc-platform
hsyl20 Feb 11, 2025
4bcba6e
Normalize testsuite backtrace paths
hsyl20 Feb 11, 2025
63abcb6
Upload test results
hsyl20 Feb 11, 2025
004e485
Upload test results always
hsyl20 Feb 11, 2025
5e3672c
Build iserv
hsyl20 Feb 12, 2025
2dbee36
Build ghc-experimental
hsyl20 Feb 12, 2025
83970a3
Reduce verbosity
hsyl20 Feb 12, 2025
5a2f2c9
Copy usage files
hsyl20 Feb 12, 2025
d98596b
Normalise callstacks in both and stderr and stdout
hsyl20 Feb 12, 2025
16affa6
Use same options for ghc-lib when building ghc and boot libs
hsyl20 Feb 12, 2025
666f824
Fix encodingAllocations test
hsyl20 Feb 12, 2025
35442b0
Build system-cxx-std-lib package
hsyl20 Feb 13, 2025
4a04f48
Build and install runghc
hsyl20 Feb 13, 2025
2004ddd
Build and install ghc-compact
hsyl20 Feb 13, 2025
4980798
Use cabal from stable-haskell repository
hsyl20 Feb 13, 2025
3e82764
Distribute ghc-toolchain lib (used by some tests)
hsyl20 Feb 13, 2025
42bc76e
Fix stage2 build to support plugins
hsyl20 Feb 13, 2025
6d0d864
Remove useless boot-lib-reinstall
hsyl20 Feb 13, 2025
d031938
Remove useless flags
hsyl20 Feb 13, 2025
8d8d9a5
Only run compact sanity tests when the debug rts is available
hsyl20 Feb 17, 2025
643072e
Flush C buffers in T7388
hsyl20 Feb 17, 2025
d1ccf00
Fix RTS report of host arch/os for the testsuite
hsyl20 Feb 17, 2025
2f4dc99
Properly skip more tests
hsyl20 Feb 18, 2025
3f6299a
Fix InternalCounters test
hsyl20 Feb 19, 2025
6073c29
Use C++ compiler to link code depending on system-cxx-std-lib
hsyl20 Feb 19, 2025
0cc3338
Fix stack_misc_closures
hsyl20 Feb 19, 2025
b6a2d46
Update Cabal: don't build Setup with -threaded
hsyl20 Feb 21, 2025
ab56989
Ensure that we use vanilla rts
hsyl20 Feb 21, 2025
7996993
Drop libffi; Stop shipping a copy of libffi
angerman Feb 24, 2025
1ec1198
[build] drop ffi
angerman Feb 24, 2025
a57e5f0
[UX] Add quotes around missing tools
angerman Feb 24, 2025
5990cca
Update cabal
angerman Feb 24, 2025
538f827
Add otool, and install_name_tool to lib/settings
angerman Feb 24, 2025
a84ee3e
aarch64-apple-darwin support
angerman Feb 24, 2025
316032c
[test] add THREADS
angerman Feb 24, 2025
6d7ff27
Make sure cabal update was run before cabal was built.
angerman Feb 24, 2025
e6ab8dd
Logic to track boot
angerman Feb 24, 2025
e72d357
Let's try to set CC and CXX
angerman Feb 24, 2025
ee031be
Add link to cabal issue
hsyl20 Feb 24, 2025
43d7f9b
Fix triple warning
hsyl20 Feb 26, 2025
420310e
Fix libffi linking
hsyl20 Feb 26, 2025
6c9548c
Display unit-id on module name mistmatch
hsyl20 Feb 26, 2025
b0e6937
Replace $CC with cc
hsyl20 Feb 26, 2025
afb7aa1
Mark T25382 as broken
hsyl20 Feb 26, 2025
ee0edb6
Skip more tests by adding rts-way-related predicates
hsyl20 Feb 26, 2025
7a5e21e
Fix flushing in more tests
hsyl20 Feb 26, 2025
75f7d87
Indicate that T22012 is fragile due to GHC#23043
hsyl20 Feb 26, 2025
5a0bf30
Testsuite: remove expect_broken for static config
hsyl20 Feb 26, 2025
5359ecc
More unexpected passes fixed (see previous commit)
hsyl20 Feb 26, 2025
1696993
Fix type name for plugin loading failure
hsyl20 Feb 26, 2025
a6742b9
Fix test output
hsyl20 Feb 27, 2025
6911016
Add comment
hsyl20 Feb 27, 2025
db67fa3
Add zig cc support
hsyl20 Apr 7, 2025
1f9479d
Fix build without polluting the global store
hsyl20 Apr 10, 2025
c088e30
Use zig to cross-compile to aarch64-linux
hsyl20 Apr 15, 2025
cc44de7
Revert "Fix libffi linking"
hsyl20 Apr 15, 2025
109e4b9
Revert "[build] drop ffi"
hsyl20 Apr 15, 2025
1fd397e
Revert "Drop libffi; Stop shipping a copy of libffi"
hsyl20 Apr 15, 2025
4eed2ea
Cross build libffi with zig
hsyl20 Apr 29, 2025
27abce3
Disable ubsan and properly install libCffi
hsyl20 Apr 30, 2025
fae5819
Progress towards fixing the build of cross libraries
hsyl20 Apr 30, 2025
bc31fb9
Finally build hackily install libffi
hsyl20 Apr 30, 2025
8dfd49d
Deal with unlit path
hsyl20 Apr 30, 2025
680b9c5
Use libffi adjustors on aarch64
hsyl20 Apr 30, 2025
1a56bf1
Add multi-target support
hsyl20 May 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

# Trigger the workflow on push or pull request, but only for the master branch
on:
pull_request:
types:
- opened
- synchronize
push:
branches: [master]

jobs:
cabal:
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc: ['9.8.4'] # bootstrapping compiler

steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"

- uses: haskell-actions/setup@v2
id: setup
name: Setup Haskell tools
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: "latest"
cabal-update: true

- name: Configure the build
run: ./boot

- name: Build patched cabal
run: make cabal

- name: Build the bindist
run: make
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
ignore = untracked
[submodule "libraries/Cabal"]
path = libraries/Cabal
url = https://gitlab.haskell.org/ghc/packages/Cabal.git
url = https://github.com/hsyl20/cabal
ignore = untracked
branch = hsyl20/per-file-extra-source-options
[submodule "libraries/containers"]
path = libraries/containers
url = https://gitlab.haskell.org/ghc/packages/containers.git
Expand Down
Loading
Loading