LeonOS Documentation

SDK Make migration report

Scope

The Make production graph now builds both the relocatable musl SDK and the complete LeonOS4-Developer-SDK.zip without invoking Python, Ninja, or Meson. The developer archive is assembled from the new musl/runtime/PAM/auth outputs, selected new-chain userland libraries, generated component metadata, and the hand-written devtools documentation, examples, templates, and linker files.

The delivered compiler wrapper is the C program tools/host/sdk/leonos-musl-cc.c. It finds its SDK relative to its own binary, passes user arguments directly through execvp, preserves the LeonOS startup objects/link order, and resets -x before appending binary link inputs.

Recovery and publication

Both SDK stages publish through temporary directories. Make names required headers, startup objects, libraries, and the compiler wrapper as grouped outputs. Deleting include/stdio.h or lib/crt1.o therefore rebuilds the stage even when its archive is newer. The full developer ZIP is written to a temporary path and renamed only after the staged tree passes completeness checks.

Compatibility payload

The full archive retains the SDK Makefile, documentation, examples, public LeonOS/UAPI/musl headers, startup objects, compiler-rt builtins, libc, mimalloc, libleonos, zlib, libpng, PAM, libxcrypt, pkg-config files, licenses, component metadata, and enabled ncurses, libmagic, Lua, SQLite, PortableGL, and StardustUI development files. Optional libraries follow LEONOS_COMPONENTS_ENABLED.

Verification (isolated output)

Output directory: build/sdk-agent

The top-level Makefile still has a later-phase failure recipe attached to sdk. Integration must remove sdk from that stub target list; mk/sdk.mk already supplies the real sdk prerequisites and target.