tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ghc bootstrap kits



As some people are already aware, lang/ghc is many versions behind
upstream. Updating is a problem because ghc is self-hosting and can
only be built with recent versions of itself; furthermore, the scheme
we have been using up to now to bootstrap has been deprecated
upstream.

Consequently we need to switch from a C bootstrap kit (ghc-output C
files to be compiled with the pkgsrc C compiler) to a binary bootstrap
kit (an already-built ghc binary) and to update to a reasonably
current version we will have to update the bootstrap kits and main ghc
packages in lockstep several times.

I now have a package for generating bootstrap kits (more on that in a
moment) but I need developers(*) who have access to suitable
systems(**) on which to build bootstrap kits for the platforms we want
to continue to support ghc packages on.

The current lang/ghc package claims to support NetBSD, FreeBSD,
OpenBSD, MacOS, and Solaris for i386 (32-bit x86), and there's a
decent chance it might work on Linux as well. (Has anyone tried?)
I will take care of the NetBSD bootstrap kits, but I need volunteers
to handle the others.

Note that if we drop support for one or more of these platforms now,
adding it back later will require either cross-compiling ghc, or
reverting pkgsrc and doing a lot of builds; neither of these will be
much fun.

(*) for legal and paranoia reasons, the official TNF bootstrap kits to
be used in lang/ghc really need to be prepared by NetBSD developers,
and have a derivation chain that has been directly supervised by
NetBSD developers. In particular, with all due respect to the person
who handles them, the wip/ghc bootstrap kits, or any ghc binaries
derived from them, really aren't adequate.

(**) and they really need to be prepared on trustworthy machines that
have been secured to the best extent reasonably possible.


The bootstrap kits generated by the lang/ghc-bootstrap package (which
I will commit in the next few days unless I run into fatal problems)
are just cut-down ghc binary packages. This is different from the old
lang/ghc bootstrap kits (which as noted above are C files spit out by
ghc, not binaries) and also from the wip/ghc bootstrap kits, which
appear to be ghc source trees that have been configured and built but
not installed.

All you have to do to prepare a bootstrap kit with this scheme is to
build ghc and then use it to build ghc-bootstrap; the ghc-bootstrap
package *is* the bootstrap kit. But you need to start with the current
ghc-6.8.3nb4 that uses the old C bootstrap kit.

It might be possible to generate a C bootstrap kit for amd64 for ghc
6.8; however, this is likely to require tinkering and fiddling. My
current inclination is to not bother trying but to generate an amd64
ghc using a crosscompiling bootstrap kit. Since one can run an i386 ->
amd64 crosscompiler on amd64 (at least on NetBSD) this should not be
all that painful. However, that won't get us a 64-bit ghc for
non-NetBSD platforms; if anyone cares a lot about that, please contact
me.

My plan is to first modify the ghc 6.8 package so it builds with the
new bootstrap kit (to make sure that it works with a minimum of other
changes going on at the same time) but then commit only ghc-bootstrap
so people can build the bootstrap kits with what's in pkgsrc. Once
that's been done, then I'll look into the first update.

I'm also going to change OWNER to me unless kristerw objects.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index