* [PATCH master] sandbox: fix generation of broken binaries
@ 2020-07-02 13:46 Ahmad Fatoum
2020-07-05 14:18 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2020-07-02 13:46 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum, Peter Mamonov
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>
---
Hello Sascha,
ARCH=sandbox is runtime-broken in master. Please add this patch there
to fix this.
Cheers,
Ahmad
---
arch/sandbox/os/Makefile | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/sandbox/os/Makefile b/arch/sandbox/os/Makefile
index ed921443e0fd..b2f95087dcc4 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)
--
2.27.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH master] sandbox: fix generation of broken binaries
2020-07-02 13:46 [PATCH master] sandbox: fix generation of broken binaries Ahmad Fatoum
@ 2020-07-05 14:18 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2020-07-05 14:18 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox, Peter Mamonov
On Thu, Jul 02, 2020 at 03:46:50PM +0200, Ahmad Fatoum wrote:
> 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>
> ---
> Hello Sascha,
>
> ARCH=sandbox is runtime-broken in master. Please add this patch there
> to fix this.
Did that, thanks
Sascha
>
> Cheers,
> Ahmad
> ---
> arch/sandbox/os/Makefile | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/arch/sandbox/os/Makefile b/arch/sandbox/os/Makefile
> index ed921443e0fd..b2f95087dcc4 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)
> --
> 2.27.0
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-05 14:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-02 13:46 [PATCH master] sandbox: fix generation of broken binaries Ahmad Fatoum
2020-07-05 14:18 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox