You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The emscripten build for SYSTEM mode embeds build/minimal.dtb via
--embed-file in CFLAGS_emcc, but after commit c6638da which fixed DTB
compilation to be conditional, the DTB was not being built before the
linker tried to embed it.
Root cause: The $(BIN) target (linking stage) uses CFLAGS_emcc which
contains --embed-file build/minimal.dtb, but had no dependency on the
DTB files. Adding DTB to deps_emcc only affects .o file compilation,
not the final linking step.
Solution:
1. Add $(BUILD_DTB) and $(BUILD_DTB2C) to deps_emcc for .o compilation
2. Add explicit $(BIN) dependency on DTB files for the linking stage
3. Guard both with: CC_IS_EMCC=1 AND SYSTEM=1 AND ELF_LOADER=0
The CC_IS_EMCC guard prevents DTB from being built during
`make distclean ENABLE_SYSTEM=1` when CC is not emcc (e.g., macOS
workflow running distclean between builds with different compilers).
Fixes emscripten build errors:
error: build/minimal.dtb@/minimal.dtb does not exist
emcc: error: 'file_packager ... --embed build/minimal.dtb ...' failed
Fixes macOS workflow regression where `make distclean ENABLE_SYSTEM=1`
incorrectly triggered DTB compilation when CC was not emcc.
0 commit comments