summary_m2make-bootstrap.md 1.2 KB

Step: M2make-driven bootstrap + explicit cross-stage FileIO

Tags v3-m2make-bootstrap. Suite 111/111.

What changed

bootstrap/fixpoint.sh now drives the fixpoint with M2make (the build-order front-end) instead of a hand-written session file list, and makes the stage-dependent FileIO choice explicit:

  • Stage 1 (gm2): compiler/build.sh with the host FileIO (compiler/src/FileIO.def/.mod, GNU-Modula-2 specific).
  • Stage 2/3 (V3): the compiler sources are regenerated without -m (real FORWARDs) and staged without compiler/src/FileIO*, with runtime/syslib on the -I path — so M2make resolves FileIO to the self-hosted runtime/syslib/FileIO. M2make orders the session and runs M2 + qbe + cc.

M2make is built if missing (tools/m2make/build_m2.sh, b_v3/M2make).

Result

=== Stage 1: gm2 build (host FileIO, CR -m) ===
=== m2s2 built by /tmp/opencode/m2s1 ===
=== m2s3 built by /tmp/opencode/m2s2 ===
FIXPOINT OK: stage2.ssa == stage3.ssa (1991297 bytes)

(The image is a little smaller than the earlier hand-written session's 1,991,439 bytes because M2make's topological order differs — irrelevant to the fixpoint, which compares the two V3 stages.)

Files

bootstrap/fixpoint.sh.