summaryrefslogtreecommitdiffstats
path: root/arch/sandbox
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-07-02 15:46:50 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-07-05 16:18:33 +0200
commit927d55370fffbc81e42d3e0a99c7312001176c0c (patch)
treea4166e90cc4c3529d7479c550dd0a08f8b1cbffb /arch/sandbox
parent27b482a47a2383291289adfb1cb6acf69f4de6ff (diff)
downloadbarebox-927d55370fffbc81e42d3e0a99c7312001176c0c.tar.gz
barebox-927d55370fffbc81e42d3e0a99c7312001176c0c.tar.xz
sandbox: fix generation of broken binaries
Code under arch/sandbox/os is meant to link against the libc primitives of the OS, not the barebox counterparts (e.g. for malloc). 54d47eb7e912 ("sandbox: support forcing 32-bit x86") broke this rendering the sandbox architecture unusable. Fix this. Reported-by: Peter Mamonov <pmamonov@gmail.com> Fixes: 54d47eb7e912 ("sandbox: support forcing 32-bit x86") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/os/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/sandbox/os/Makefile b/arch/sandbox/os/Makefile
index ed921443e0..b2f95087dc 100644
--- a/arch/sandbox/os/Makefile
+++ b/arch/sandbox/os/Makefile
@@ -6,9 +6,13 @@ KBUILD_CPPFLAGS = $(patsubst %,-I$(srctree)/%include,$(machdirs))
KBUILD_CPPFLAGS += -DCONFIG_MALLOC_SIZE=$(CONFIG_MALLOC_SIZE)
-KBUILD_CFLAGS += -Wall
+KBUILD_CFLAGS := -Wall
NOSTDINC_FLAGS :=
+ifeq ($(CONFIG_SANDBOX_LINUX_I386),y)
+KBUILD_CFLAGS += -m32
+endif
+
obj-y = common.o tap.o
CFLAGS_sdl.o = $(shell pkg-config sdl --cflags)