[PATCH 2/2] sandbox: os: define referenced config symbols
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Jan 6 22:49:45 PST 2025
We built the sandbox/os/ subdirectory with different compiler flags
to avoid barebox headers masking system provided headers.
This also means that CONFIG_ options aren't defined, but common.c
already references two of them.
Define them manually in the Makefile for now to fix build breakage in
some configurations.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
arch/sandbox/os/Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/sandbox/os/Makefile b/arch/sandbox/os/Makefile
index 055ce1a316a7..7a76fb0290e8 100644
--- a/arch/sandbox/os/Makefile
+++ b/arch/sandbox/os/Makefile
@@ -6,8 +6,11 @@ machdirs := $(patsubst %,arch/sandbox/mach-%/,$(machine-y))
KBUILD_CPPFLAGS = $(patsubst %,-I$(srctree)/%include,$(machdirs))
+cppflags-$(CONFIG_CONSOLE_NONE) += -DCONFIG_CONSOLE_NONE=$(CONFIG_CONSOLE_NONE)
+cppflags-$(CONFIG_ASAN) += -DCONFIG_ASAN=$(CONFIG_ASAN)
+
KBUILD_CPPFLAGS += -DCONFIG_MALLOC_SIZE=$(CONFIG_MALLOC_SIZE) -D_FILE_OFFSET_BITS=64 \
- -DCONFIG_STACK_SIZE=$(CONFIG_STACK_SIZE)
+ -DCONFIG_STACK_SIZE=$(CONFIG_STACK_SIZE) $(cppflags-y)
KBUILD_CFLAGS := -Wall
--
2.39.5
More information about the barebox
mailing list