ww: finish initialization validation parity

This commit is contained in:
2026-08-14 20:03:11 +09:00
parent 25da54936d
commit c59a7c11de
26 changed files with 528 additions and 143 deletions

View File

@@ -81,14 +81,14 @@ main(void)
}
/* #93 sep layout: build an explicit command source via `ww build`,
* then independently link <stem>.sepwork/__root.o with both linkers.
* then independently link <stem>.sepwork/__root.a with both linkers.
* The direct getpid call guarantees one dynamic libc relocation. */
char cmd[4096], src[256], stem[256], scratch[320];
char obj[384], co[256], wo[256];
char archive[384], co[256], wo[256];
snprintf(src, sizeof src, "%s/dyn.ww", td);
snprintf(stem, sizeof stem, "%s/built", td);
snprintf(scratch, sizeof scratch, "%s.sepwork", stem);
snprintf(obj, sizeof obj, "%s/__root.o", scratch);
snprintf(archive, sizeof archive, "%s/__root.a", scratch);
snprintf(co, sizeof co, "%s/c", td);
snprintf(wo, sizeof wo, "%s/w", td);
@@ -125,7 +125,7 @@ main(void)
snprintf(cmd, sizeof cmd,
"%s/w6l -o %s %s -L %s "
"-l c %s/out/lib/libwwrt.a 2>/dev/null",
bin, co, obj, libdir, cwd);
bin, co, archive, libdir, cwd);
if (runwait(cmd) != 0) {
fprintf(stderr, "w6l_ww-dyn FAIL: C w6l errored\n");
rc = 1;
@@ -135,7 +135,7 @@ main(void)
snprintf(cmd, sizeof cmd,
"%s/w6l_ww -o %s %s -L %s "
"-l c %s/out/lib/libwwrt.a 2>/dev/null",
bin, wo, obj, libdir, cwd);
bin, wo, archive, libdir, cwd);
if (runwait(cmd) != 0) {
fprintf(stderr, "w6l_ww-dyn FAIL: ww w6l errored\n");
rc = 1;