summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-01-08 08:42:54 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-10 21:11:25 +0000
commitf599b6c77f3585c8917f4d685689da4cc8a8bf04 (patch)
tree4a74cc3093ab5257782f47555595ea6aa5ee9adb /meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch
parent2bc3f51a7151880fc7e27abf1762fb43f4e8fe54 (diff)
downloadopenembedded-core-contrib-f599b6c77f3585c8917f4d685689da4cc8a8bf04.tar.gz
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>
Diffstat (limited to 'meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch')
-rw-r--r--meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch9
1 files changed, 2 insertions, 7 deletions
diff --git a/meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch b/meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch
index 9c2d0eb479..74d93618b2 100644
--- a/meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch
+++ b/meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch
@@ -13,11 +13,9 @@ Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Makefile | 2 --
1 file changed, 2 deletions(-)
-diff --git a/Makefile b/Makefile
-index ae68f55..10851fc 100644
--- a/Makefile
+++ b/Makefile
-@@ -145,7 +145,6 @@ GENFLAGS += $(firmware-genflags-y)
+@@ -162,7 +162,6 @@ GENFLAGS += $(firmware-genflags-y)
CFLAGS = -g -Wall -Werror -nostdlib -fno-strict-aliasing -O2
CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
CFLAGS += -mno-save-restore -mstrict-align
@@ -25,7 +23,7 @@ index ae68f55..10851fc 100644
CFLAGS += -mcmodel=$(PLATFORM_RISCV_CODE_MODEL)
CFLAGS += $(GENFLAGS)
CFLAGS += $(platform-cflags-y)
-@@ -158,7 +157,6 @@ CPPFLAGS += $(firmware-cppflags-y)
+@@ -176,7 +175,6 @@ CPPFLAGS += $(firmware-cppflags-y)
ASFLAGS = -g -Wall -nostdlib -D__ASSEMBLY__
ASFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
ASFLAGS += -mno-save-restore -mstrict-align
@@ -33,6 +31,3 @@ index ae68f55..10851fc 100644
ASFLAGS += -mcmodel=$(PLATFORM_RISCV_CODE_MODEL)
ASFLAGS += $(GENFLAGS)
ASFLAGS += $(platform-asflags-y)
---
-2.20.1
-