]> code.ossystems Code Review - openembedded-core.git/commit
opensbi: Use -ffreestanding compiler options
authorKhem Raj <raj.khem@gmail.com>
Wed, 8 Jan 2020 16:42:54 +0000 (08:42 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 10 Jan 2020 21:11:25 +0000 (21:11 +0000)
commitf599b6c77f3585c8917f4d685689da4cc8a8bf04
tree4a74cc3093ab5257782f47555595ea6aa5ee9adb
parent2bc3f51a7151880fc7e27abf1762fb43f4e8fe54
opensbi: Use -ffreestanding compiler options

This usually helps compiler to not use built-in optimizations
for string functions and mem* functions unnecessarily, since OE's
compiler is hosted for linux cross compile, this also means we instruct
it rightly for building a baremetal application

Refresh the patches to apply without fuzz
Fixes linking errors e.g.

platform/qemu/virt/lib/libplatsbi.a(sbi_string.o): in function `sbi_memset':
| /mnt/b/yoe/build/tmp/work/riscv64-yoe-linux/opensbi/0.5-r0/git/lib/sbi/sbi_string.c:102: undefined reference to `memset'
| collect2: error: ld returned 1 exit status

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch
meta/recipes-bsp/opensbi/files/0001-build-Use-ffreestanding.patch [new file with mode: 0644]
meta/recipes-bsp/opensbi/opensbi_0.5.bb