mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>,
	Peter Mamonov <pmamonov@gmail.com>
Subject: [PATCH master] sandbox: fix generation of broken binaries
Date: Thu,  2 Jul 2020 15:46:50 +0200	[thread overview]
Message-ID: <20200702134650.19767-1-a.fatoum@pengutronix.de> (raw)

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

             reply	other threads:[~2020-07-02 13:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02 13:46 Ahmad Fatoum [this message]
2020-07-05 14:18 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200702134650.19767-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=pmamonov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox