blaise/stdlib
Graeme Geldenhuys a545e86026 fix(stdlib): memory streams use the RTL allocator, not libc malloc/free
streams.pas bound malloc/free/realloc to libc by name, which left an undefined
reference under --static (libc-free) — the memory streams are reachable from the
compiler, so a static self-host link failed on 'free'.

Bind them to the RTL's own mmap-backed allocator
(_BlaiseGetMem/_BlaiseFreeMem/_BlaiseReallocMem) instead.  Same signatures, so
the call sites are unchanged; memcpy stays the C name (libc, or runtime.cstub
under --static).  The streams now allocate from the same heap as everything else
and carry no libc dependency.

With this, free()/malloc()/realloc() are resolved and the compiler links fully
--static.  Verified: blaise --static builds the compiler itself into a libc-free
ET_EXEC (no PT_INTERP, not a dynamic executable) that compiles + runs a program;
FIXPOINT_OK, NATIVE_FIXPOINT_OK, NATIVE_INTERNAL_OK; full suite 0 assertion
failures (residual EUnitNotFound errors are a local search-path artifact).
2026-06-26 19:30:42 +01:00
..
src fix(stdlib): memory streams use the RTL allocator, not libc malloc/free 2026-06-26 19:30:42 +01:00
project.xml feat(stdlib): add JSON library (writer, DOM, parser, reader) 2026-06-22 20:07:34 +01:00