mirror of
https://git.yoctoproject.org/poky
synced 2026-05-01 15:32:12 +02:00
gnu-efi: Fix build break on riscv64
(From OE-Core rev: 41b54ac83c756897f444b8fe651953e4feaa4571) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
From 1de509497826faa0ad84b82f5e2c3d21ee613459 Mon Sep 17 00:00:00 2001
|
||||
From: Moody Liu <mooodyhunter@outlook.com>
|
||||
Date: Sat, 13 May 2023 17:39:16 +0100
|
||||
Subject: [PATCH] riscv64: adjust type definitions
|
||||
|
||||
CHAR8 needs to be defined while BOOLEAN should be removed
|
||||
here to prevent typedef conflicts
|
||||
|
||||
Upstream-Status: Backport [https://sourceforge.net/p/gnu-efi/code/ci/1de509497826faa0ad84b82f5e2c3d21ee613459/]
|
||||
Signed-off-by: Moody Liu <mooodyhunter@outlook.com>
|
||||
---
|
||||
inc/riscv64/efibind.h | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/inc/riscv64/efibind.h b/inc/riscv64/efibind.h
|
||||
index 4fdf81d..d8b4f39 100644
|
||||
--- a/inc/riscv64/efibind.h
|
||||
+++ b/inc/riscv64/efibind.h
|
||||
@@ -32,11 +32,9 @@ typedef uint16_t UINT16;
|
||||
typedef int16_t INT16;
|
||||
typedef uint8_t UINT8;
|
||||
typedef int8_t INT8;
|
||||
+typedef char CHAR8;
|
||||
typedef wchar_t CHAR16;
|
||||
#define WCHAR CHAR16
|
||||
-#ifndef BOOLEAN
|
||||
-typedef uint8_t BOOLEAN;
|
||||
-#endif
|
||||
#undef VOID
|
||||
typedef void VOID;
|
||||
typedef int64_t INTN;
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 708f66acfec9a86f237726d45095cbd380fd83ca Mon Sep 17 00:00:00 2001
|
||||
From: Callum Farmer <gmbr3@opensuse.org>
|
||||
Date: Wed, 21 Jun 2023 11:32:28 +0100
|
||||
Subject: [PATCH] riscv64: ignore unknown relocs
|
||||
|
||||
Sometimes ld emits relocs such as R_RISCV_64 for unwind symbols
|
||||
these don't need to be handled yet so just can be skipped otherwise
|
||||
the binary will never load
|
||||
|
||||
Upstream-Status: Backport [https://sourceforge.net/p/gnu-efi/code/ci/708f66acfec9a86f237726d45095cbd380fd83ca/]
|
||||
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
||||
---
|
||||
gnuefi/reloc_riscv64.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gnuefi/reloc_riscv64.c b/gnuefi/reloc_riscv64.c
|
||||
index 0b02d83..e429602 100644
|
||||
--- a/gnuefi/reloc_riscv64.c
|
||||
+++ b/gnuefi/reloc_riscv64.c
|
||||
@@ -81,8 +81,7 @@ EFI_STATUS EFIAPI _relocate(long ldbase, Elf_Dyn *dyn)
|
||||
*addr = ldbase + rel->r_addend;
|
||||
break;
|
||||
default:
|
||||
- /* Panic */
|
||||
- while (1) ;
|
||||
+ break;
|
||||
}
|
||||
rel = (Elf_Rela *)((char *)rel + relent);
|
||||
relsz -= relent;
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -15,6 +15,8 @@ LIC_FILES_CHKSUM = "file://gnuefi/crt0-efi-arm.S;beginline=4;endline=16;md5=e582
|
||||
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/files/${BP}.tar.bz2 \
|
||||
file://parallel-make-archives.patch \
|
||||
file://gnu-efi-3.0.9-fix-clang-build.patch \
|
||||
file://0001-riscv64-adjust-type-definitions.patch \
|
||||
file://0001-riscv64-ignore-unknown-relocs.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "7807e903349343a7a142ebb934703a2872235e89688cf586c032b0a1087bcaf4"
|
||||
|
||||
Reference in New Issue
Block a user