Skip to contentSkip to conversation

sandbox: Build with -fPIC

PATCH Superseded Andy Shevchenko 2 participants 2 messages Sep 3, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sandbox: Build with -fPIC

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")
---
 arch/sandbox/config.mk | 1 +
 1 file changed, 1 insertion(+)
arch/sandbox/config.mk +1 -0
index 5e7077bfe7..4599839791 100644
@@ -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
Signature · 1 line
2.18.0
#1 lore raw

PATCH 1/1 sandbox: Build with -fPIC

Hi Andy,

Quoted 4 lines · Andy Shevchenko

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

Quoted 8 lines

Thus, build it with -fPIC explicitly.

Fixes 16940f720f9b ("Makefile: Don't generate position independent code")
---
 arch/sandbox/config.mk | 1 +
 1 file changed, 1 insertion(+)

This patch does not apply on top of u-boot/master. Can you please rebase?

Manually applied the changes, and tested Sandbox on my Ubuntu 16.04 machine, although it does not expose the issue that Simon was seeing on 18.04.

FWIW

Regards,
Bin