selfhost-verify: run_rustc all COMPLETO — toolchain rust stage-3 self-hosted (musl)
Con el stage0 musl-host, run_rustc all terminó: rustc stage-3 (host=musl, LLVM 20.1.8, 1.90.0-stable-mrustc) + cargo 1.90.0 + sysroot (294 rlibs) construidos y verificados corriendo. El muro de proc-macros quedó roto (tinystr/displaydoc/icu nativos). Dos snags finales arreglados (en run_rustc.patch, vs be69c74): - Makefile:262 (hello_world FINAL): mismos flags CRT que la 172 (--target + -C target-feature=-crt-static -C link-self-contained=no); solo aflora al completar stage-2/3. - Makefile:235 (cargo FINAL): --features vendored-openssl (openssl-sys no halla openssl del sistema en el devfs hermético; openssl-src lo compila desde fuente). README documenta ambos como snags #4 y #2(262). NEXT: climb 1.90 -> 1.91.0 -> 1.91.1. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Delta semántico
Ninguna definición cambió: el cambio es de texto, documentación o datos.
2 archivos · +19 −2
diff --git a/scripts/rust-frontier/README.md b/scripts/rust-frontier/README.md
index 54aebdce..936e2d3d 100644
--- a/scripts/rust-frontier/README.md
+++ b/scripts/rust-frontier/README.md
@@ -65,7 +65,15 @@ to bootstrap a usable rust there:
can't be reassigned by the makefile, so the `-musl` suffix append is skipped and
the build contaminates the gnu output dir. Let it default.
-4. **minicargo OUT_DIR host/target split** (only when building the musl stage0's
+4. **final cargo needs vendored OpenSSL.** The fully-bootstrapped `prefix/bin/cargo`
+ rule (Makefile:235) builds cargo with default features, so `openssl-sys` looks
+ for a system OpenSSL via pkg-config and fails (the hermetic musl devfs has none,
+ and no `openssl.pc`). Fix: add `--features vendored-openssl` to that cargo build
+ so `openssl-src` compiles OpenSSL from source — same approach the stage0 cargo
+ build uses. Real cargo (unlike minicargo) handles the OUT_DIR fine, so snag #4
+ doesn't recur here. Only surfaces after the final hello_world (snag #2/262) passes.
+
+5. **minicargo OUT_DIR host/target split** (only when building the musl stage0's
cargo). With `RUSTC_TARGET` set, minicargo runs each cargo build-script under
`cargo-build/host/build_X/`, but the *target* crate's `include!` /
`include_bytes!(concat!(env!("OUT_DIR"), "/.."))` resolves `OUT_DIR` to
diff --git a/scripts/rust-frontier/run_rustc.patch b/scripts/rust-frontier/run_rustc.patch
index 67e2d199..0c7f6bde 100644
--- a/scripts/rust-frontier/run_rustc.patch
+++ b/scripts/rust-frontier/run_rustc.patch
@@ -1,5 +1,5 @@
diff --git a/run_rustc/Makefile b/run_rustc/Makefile
-index e78d8c5..00162a7 100644
+index e78d8c5..6acc615 100644
--- a/run_rustc/Makefile
+++ b/run_rustc/Makefile
@@ -108,7 +108,7 @@ CARGO_FLAGS := --target $(RUSTC_TARGET) -j $(PARLEVEL) --release --verbose
@@ -29,6 +29,15 @@ index e78d8c5..00162a7 100644
# ---
# Stage 2: Build a proper libstd (which includes dynamc libraries too)
+@@ -232,7 +232,7 @@ endif
+ #
+ $(BINDIR)cargo: $(BINDIR)rustc
+ @echo [CARGO] $(RUST_SRC_RUSTC)Cargo.toml '>' $(OUTDIR)build-rustc/
+- $VTMPDIR=$(abspath $(PREFIX)tmp) $(CARGO_ENV_RUSTC) $(BINDIR_S)cargo build $(CARGO_FLAGS) --manifest-path $(RUST_SRC_CARGO)Cargo.toml
++ $VTMPDIR=$(abspath $(PREFIX)tmp) $(CARGO_ENV_RUSTC) $(BINDIR_S)cargo build $(CARGO_FLAGS) --features vendored-openssl --manifest-path $(RUST_SRC_CARGO)Cargo.toml
+ $Vcp $(CARGO_OUTDIR_RUSTC)cargo $(BINDIR)cargo
+
+
@@ -259,7 +259,7 @@ endif
$(BINDIR)hello_world: $(RUST_SRC_HELLO) $(BINDIR)rustc $(LIBDIR)libstd.rlib
@mkdir -p $(dir $@)