[U-Boot] [PATCH v2] sandbox: Build with -fPIC
Andy Shevchenko
andriy.shevchenko at linux.intel.com
Mon Sep 3 09:08:10 UTC 2018
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 at linux.intel.com>
Reported-by: Simon Glass <sjg at chromium.org>
Tested-by: Bin Meng <bmeng.cn at gmail.com>
---
- rebased on top of latest u-boot/master
- added Bin's Tb tag
arch/sandbox/config.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk
index 2babcde881..95f9e3ff63 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
# Define this to avoid linking with SDL, which requires SDL libraries
--
2.18.0
More information about the U-Boot
mailing list