GaspardMake for GaspardOS x64¶
GaspardMake ports GNU Make 4.4 to GaspardOS's LP64 newlib SDK.
The output is GaspardMake/build/GaspardMake.elf, a static AMD64 ELF64 file.
This is currently a Makefile parser and dry-run port. External recipes are refused: the kernel's process API does not provide child exit statuses. The binary must not assume a compiler succeeded simply because it exited.
Build¶
From the repository root in MSYS2 MINGW64:
bash GaspardMake/build-gaspardos.sh
# After C-only changes, reuse the configuration:
bash GaspardMake/build-gaspardos.sh --rebuild
Requires the installed build-x64-install GaspardOS cross compiler, host Make,
bash and Python. Logs are under GaspardMake/build/gaspardos.
The build verifies ELF architecture, static linkage and undefined symbols.
Run¶
Copy the ELF to /AHCIDISK0/apps/GaspardMake.elf. From GaspardTerminal:
run /AHCIDISK0/apps/GaspardMake.elf --version
run /AHCIDISK0/apps/GaspardMake.elf -C /AHCIDISK0/project -f Makefile -n all
run /AHCIDISK0/apps/GaspardMake.elf -C /AHCIDISK0/project -B -n all CC=/usr/bin/gcc
Use an absolute -C: the terminal's working directory and environment are
not inherited. Pass Make variable assignments explicitly as arguments.
Makefiles, includes, conditionals, dependencies, pattern rules, variables and
GFS2 wildcard directory enumeration are provided by GNU Make and the native
directory adapter. GNU's recursive or + recipes may request execution even
under -n; the port refuses those as well.
Limits¶
- External commands, recursive Make, pipelines and redirections cannot run. A recipe attempt fails instead of reporting a false success.
$(shell ...)and!=assignments stop with an explicit diagnostic.- No native jobserver or guaranteed parallel execution; avoid
-jand-O. - Newlib currently returns zero file modification timestamps. Incremental
rebuild decisions are therefore unreliable; use
-B -nto inspect recipes. The missing POSIX clock may also produce a timestamp warning. - No user database, NLS, Guile or dynamic plugin loading.
The port adds GFS2 opendir/readdir/closedir adapters with UTF-16 to UTF-8
conversion, corrects configure probes and uses the CRT's two-argument main.
POSIX calls missing from the SDK return explicit errors.
Completing native compilation requires per-child exit statuses, working
directory/environment propagation, a recipe shell and valid modification
timestamps. Syscalls 150–152 alone cannot supply these semantics:
process_status counts live children.
Validate¶
python tests/gaspardos64/verify_elf.py GaspardMake/build/GaspardMake.elf
python GaspardMake/tests/gaspardos_runtime.py --kernel C:/path/to/GaspardOS_X64
The runtime probes link the real Make objects into test entry points and boot
them in QEMU. They check includes, variables, GFS2 wildcards, dry-run order,
version output and explicit recipe/shell failures. They also spawn the actual
GaspardMake.elf to verify its unmodified entry point and dry-run output.
The tests use a disposable GFS2 image with QEMU snapshots; no physical disk is
accessed. Serial logs are saved
under GaspardMake/build/runtime. The full upstream POSIX test suite has not
been validated on GaspardOS. Original upstream licenses remain in GaspardMake.