unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: 53609@debbugs.gnu.org
Subject: [bug#53609] [PATCH] Add GHC 4 for the Haskell bootstrap
Date: Fri, 28 Jan 2022 18:35:06 +0100	[thread overview]
Message-ID: <8735l7hi2k.fsf@elephly.net> (raw)

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




             reply	other threads:[~2022-01-28 17:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28 17:35 Ricardo Wurmus [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735l7hi2k.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=53609@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).