Skip to contentSkip to conversation

sandbox: Build with -fPIC

PATCH New Andy Shevchenko 2 participants 3 messages Sep 3, 2018 – Sep 28, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 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")

---

- rebased on top of latest u-boot/master
- added Bin's Tb tag

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

PATCH v2 1/1 sandbox: Build with -fPIC

Quoted 9 lines · Andy Shevchenko

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")
Quoted 7 lines

---

- rebased on top of latest u-boot/master
- added Bin's Tb tag

 arch/sandbox/config.mk | 1 +
 1 file changed, 1 insertion(+)
#2 lore raw

PATCH v2 1/1 sandbox: Build with -fPIC

Quoted 13 lines · Simon Glass
Quoted 11 lines · Andy Shevchenko

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")

---

Quoted 8 lines
Quoted 5 lines

- rebased on top of latest u-boot/master
- added Bin's Tb tag

 arch/sandbox/config.mk | 1 +
 1 file changed, 1 insertion(+)

Applied to u-boot-dm, and now in mainline, thanks!