public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v1] sandbox: Build with -fPIC
@ 2018-09-03  8:33 Andy Shevchenko
  2018-09-03  8:56 ` Bin Meng
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2018-09-03  8:33 UTC (permalink / raw)
  To: u-boot

Sandbox is not a real bootloader and it does require
a position independent code to be supported.

Thus, build it with -fPIC explicitly.

Fixes: 16940f720f9b ("Makefile: Don't generate position independent code")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reported-by: Simon Glass <sjg@chromium.org>
---
 arch/sandbox/config.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk
index 5e7077bfe7..4599839791 100644
--- a/arch/sandbox/config.mk
+++ b/arch/sandbox/config.mk
@@ -3,6 +3,7 @@
 
 PLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE
 PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM
+PLATFORM_CPPFLAGS += -fPIC
 PLATFORM_LIBS += -lrt
 
 LDFLAGS_FINAL += --gc-sections
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-03  8:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-03  8:33 [U-Boot] [PATCH v1] sandbox: Build with -fPIC Andy Shevchenko
2018-09-03  8:56 ` Bin Meng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox