From: Simon Glass <simon.glass@canonical.com> The examples_ulib target invokes the standalone Makefile in examples/ulib/ which uses sandbox-specific headers and linking flags (e.g. -lpthread, -ldl, arch/sandbox/include). Running this for non-sandbox builds like qemu-x86 causes compilation failures due to missing sandbox-specific CONFIG symbols and GD_SIZE mismatches. Non-sandbox architectures already build ulib examples via the kbuild path (examples/ulib/Kbuild + arch-specific re-linking), so guard the standalone Makefile target with CONFIG_SANDBOX. Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index e61e1c7fe94..f1fdace661d 100644 --- a/Makefile +++ b/Makefile @@ -1061,11 +1061,13 @@ ifeq ($(NO_LIBS),) INPUTS-$(CONFIG_ULIB_SHARED_LIB) += libu-boot.so test/ulib/ulib_test INPUTS-$(CONFIG_ULIB) += libu-boot.a ifdef CONFIG_EXAMPLES +ifdef CONFIG_SANDBOX INPUTS-$(CONFIG_ULIB) += examples_ulib examples_rust endif endif endif endif +endif LDFLAGS_u-boot += $(LDFLAGS_FINAL) -- 2.43.0