pkgsrc/lang/ghc84/BOOTSTRAP.txt
pho bc5fe965ff Import ghc-8.4.4
GHC: The Glasgow Haskell Compiler.

The Glasgow Haskell Compiler is a robust, fully-featured, optimising
compiler for the functional programming language Haskell 98
(http://www.haskell.org). GHC compiles Haskell to either native code
or C. It implements numerous experimental language extensions to
Haskell, including concurrency, a foreign language interface, several
type-system extensions, exceptions, and so on. GHC comes with a
generational garbage collector, a space and time profiler, and a
comprehensive set of libraries.

This package provides the 8.4.x release series, which is the last
version that can bootstrap with 8.0.2. It will probably be removed
once we make a separate package for GHC 8.8.x and get enough bootstrap
kits for it.
2020-01-07 16:52:08 +00:00

21 lines
1,007 B
Plaintext

GHC requires itself to build, and unfortunately the only way to get a
working GHC for a foreign target is to do a cross-compilation.
In order to build a bootkit for a new platform, you need to manually
set up a cross-building C compiler and binutils, libc, libterminfo,
and libiconv for the target. Then you can follow instructions in
https://gitlab.haskell.org/ghc/ghc/wikis/building/cross-compiling
Once you get a working GHC for the target platform, install it
somewhere in your PATH, run "cd lang/ghc84; make clean; make bootstrap"
on the target platform and you'll have a bootkit for the target.
--
GHC in fact has never supported bootstrapping only with a C compiler.
Prior to GHC 7, it had a thing called "HC source", which was a set of
C source files compiled from Haskell source, but it wasn't actually
cross-platform. It was because HC files were generated with many
assumptions about the platform, such as the layout of libc structs,
the size of off_t and time_t, byte-order, word size, etc.