all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#53609] [PATCH] Add GHC 4 for the Haskell bootstrap
@ 2022-01-28 17:35 Ricardo Wurmus
  2022-01-28 17:48 ` [bug#53609] [PATCH 1/2] gnu: Add perl-5.14 Ricardo Wurmus
  2022-02-05  0:08 ` [bug#53609] [PATCH v2 1/4] gnu: Add perl-5.14 Ricardo Wurmus
  0 siblings, 2 replies; 9+ messages in thread
From: Ricardo Wurmus @ 2022-01-28 17:35 UTC (permalink / raw)
  To: 53609

This patch adds GHC 4.08.2.  GHC 4.08.2 is sufficient to build GHC 6.0.

GHC 6.6 was released in April 2007. To build 6.6 you need GHC > 5.04
(http://web.archive.org/web/20070426051520/http://hackage.haskell.org:80/trac/ghc/wiki/Building/Prerequisites)
or maybe 6.0
(http://web.archive.org/web/20071224035747/http://hackage.haskell.org:80/trac/ghc/wiki/Building/Prerequisites)

To build 6.8.* you need GHC >= 6.4
To build 6.10.* you need GHC >= 6.6
To build 7.4.* you need GHC >= 6.12
To build 7.6.* you need GHC >= 7.0.1

So with this chain we should be able to bootstrap GHC:
4.08.2 -> 6.0 -> 6.6 -> 6.12(?) -> 7.4 -> 7.6

Back to 4.08.2.  It’s ancient and it’s not possible to build it even
with GCC 4.9; it will not fail, but it will print a bunch of serious
errors.  So I’m using GCC 2.95, which we already have for the
early GCC bootstrap.  That’s why all of this is in commencement.scm — it
may be worth exporting GCC 2.95, so that this whole GHC bootstrap can go
to haskell.scm instead of cluttering up commencement.scm.

I also need to use Perl 5.14, as one of the Perl scripts uses $*, which
used to enable multi-line regexp matching.  It’s not easy to just remove
this and update the regular expressions with the /s or /m modifiers
because there are dozens of non-trivial regexes there that are affected
by $*.  It would be very nice to patch this though.

Building with a more recent (but not latest) Perl works, but prints a
warning.  That’s not okay, because $* simply has no effect in these
versions of Perl.  Later this silent change was turned into a visible
error, which is why the build would fail with the latest Perl.

I used the “--enable-hc-boot” configure flag, which lets us bootstrap
from hc files.  I don’t see a reason not to use them as they are proper
code; they don’t look generated nor are they unintelligible.

Comments on all this would be very welcome!

-- 
Ricardo




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-02-05 14:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-28 17:35 [bug#53609] [PATCH] Add GHC 4 for the Haskell bootstrap Ricardo Wurmus
2022-01-28 17:48 ` [bug#53609] [PATCH 1/2] gnu: Add perl-5.14 Ricardo Wurmus
2022-01-28 17:48   ` [bug#53609] [PATCH 2/2] gnu: Add ghc-4 Ricardo Wurmus
2022-01-29 18:56     ` Ricardo Wurmus
2022-02-05  0:08 ` [bug#53609] [PATCH v2 1/4] gnu: Add perl-5.14 Ricardo Wurmus
2022-02-05  0:08   ` [bug#53609] [PATCH v2 2/4] gnu: Add gcc-2.95-wrapper Ricardo Wurmus
2022-02-05  0:08   ` [bug#53609] [PATCH v2 3/4] gnu: Add glibc-2.2.5 Ricardo Wurmus
2022-02-05 14:44     ` Maxime Devos
2022-02-05  0:08   ` [bug#53609] [PATCH v2 4/4] gnu: Add ghc-4 Ricardo Wurmus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.