]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: Build with -fPIC
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 3 Sep 2018 09:08:10 +0000 (12:08 +0300)
committerSimon Glass <sjg@chromium.org>
Tue, 18 Sep 2018 06:01:18 +0000 (00:01 -0600)
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>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
arch/sandbox/config.mk

index 2babcde8815d3987ea4ea6c50fdb4448a61aeba6..95f9e3ff63f2dd389734e0b1176ca7f891d95c00 100644 (file)
@@ -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