Sets up the cc-free fresh-checkout flow without yet committing the
stage-0 binaries. The pieces are in place; flipping the switch is
one `git add -f` away when the compiler is judged stable.
bootstrap/<arch>/{ww,6c,6a,6l} stage-0 binaries (gitignored)
bootstrap/README.md layout + workflow
Two new targets:
make bootstrap-snapshot populates bootstrap/$(ARCH)/ from the
currently-built wwstage
make nocc starts from bootstrap/$(ARCH)/, rebuilds
the wwstage from source, gates on
stage-0 == rebuilt byte-for-byte. Lands
in $(OUT)/nocc/ so $(OUT)/ stays
untouched. cc is never invoked.
The fixed-point gate has the same shape as `make bootstrap`, just
the entry point flipped: that target trusts cstage; nocc trusts
the checked-in (or local-snapshot) stage-0 binaries.
Implementation notes:
- libwwrt.a is assembled with stage-0 6a, members ordered to match
$(RT_OBJ) so the embedded symbol table reproduces the cstage
build byte-for-byte.
- The driver's default lib path is $self_dir/../../lib, which under
$(NOCC_BIN) resolves to $(NOCC_OUT)/lib (libwwrt only). Each
ww-build invocation passes -I $(CURDIR)/lib so `use os` etc.
resolve to source.
- Stage-0 binaries are duplicated under both natural names (ww/6c/
6a/6l) and _ww-suffixed names so the wwstage driver's
hard-coded join_path_lit(self_dir, "6c_ww") still finds them.
When cmd/wwc/ gets deleted at v1.0, that duplication and the
_ww suffix in the driver both go away.
31 lines
1.0 KiB
Plaintext
31 lines
1.0 KiB
Plaintext
# Build outputs.
|
|
/out/
|
|
|
|
# Stray executables produced by ad-hoc `ww build` runs in the project
|
|
# root. Real source for these lives under selfhost/test/ as .ww files.
|
|
/loop
|
|
/sym_link
|
|
|
|
# Per-module build artifacts. The .combined.ww files under selfhost/
|
|
# are intentionally tracked — they're frozen bootstrap inputs.
|
|
selfhost/**/*.o
|
|
selfhost/**/*.s
|
|
|
|
# Test-probe leftovers. `ww build` drops .combined.ww next to the
|
|
# source; the selfhost/test/ probes don't need them tracked.
|
|
selfhost/test/*.combined.ww
|
|
|
|
# examples/ build outputs. Each example has its own Makefile that
|
|
# leaves the .s/.o/.combined.ww plus a stripped binary behind.
|
|
examples/**/*.o
|
|
examples/**/*.s
|
|
examples/**/*.combined.ww
|
|
examples/snake/snake
|
|
|
|
# Stage-0 binaries under bootstrap/<arch>/. Untracked by default —
|
|
# committing them is the v1.0 lock per PLAN.md (the new trust
|
|
# surface). `make bootstrap-snapshot` populates the dir from the
|
|
# current wwstage; `make nocc` verifies they self-reproduce.
|
|
# To ship, `git add -f bootstrap/amd64/{ww,6c,6a,6l}` explicitly.
|
|
bootstrap/*/*
|