diff mbox series

[U-Boot,v2] sandbox: Build with -fPIC

Message ID 20180903090810.4568-1-andriy.shevchenko@linux.intel.com
State Accepted
Commit e599c4e7d8e1bd6e923838a77d01271935709cfd
Delegated to: Simon Glass
Headers show
Series [U-Boot,v2] sandbox: Build with -fPIC | expand

Commit Message

Andy Shevchenko Sept. 3, 2018, 9:08 a.m. UTC
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>
---

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

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

Comments

Simon Glass Sept. 15, 2018, 2:03 a.m. UTC | #1
On 3 September 2018 at 11:08, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> 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>
> ---
>
> - rebased on top of latest u-boot/master
> - added Bin's Tb tag
>
>  arch/sandbox/config.mk | 1 +
>  1 file changed, 1 insertion(+)

Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Simon Glass Sept. 28, 2018, 3:55 p.m. UTC | #2
On 14 September 2018 at 19:03, Simon Glass <sjg@chromium.org> wrote:
> On 3 September 2018 at 11:08, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
>> 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>
>> ---
>>
>> - rebased on top of latest u-boot/master
>> - added Bin's Tb tag
>>
>>  arch/sandbox/config.mk | 1 +
>>  1 file changed, 1 insertion(+)
>
> Acked-by: Simon Glass <sjg@chromium.org>
> Tested-by: Simon Glass <sjg@chromium.org>

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

Patch

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