From b654e2921abdb0fb6e78308bc501d6c0eb05d9d6 Mon Sep 17 00:00:00 2001 From: Robbie Harwood Date: Fri, 8 Apr 2022 15:15:50 +0000 Subject: [PATCH] Apply fix for risxv64 (wefu) Closes: #3 Signed-off-by: Robbie Harwood --- 0001-Fix-the-march-issue-for-riscv64.patch | 35 ++++++++++++++++++++++ efivar.patches | 1 + efivar.spec | 7 +++-- 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 0001-Fix-the-march-issue-for-riscv64.patch diff --git a/0001-Fix-the-march-issue-for-riscv64.patch b/0001-Fix-the-march-issue-for-riscv64.patch new file mode 100644 index 0000000..62e2c86 --- /dev/null +++ b/0001-Fix-the-march-issue-for-riscv64.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Wei Fu +Date: Sat, 2 Apr 2022 22:53:36 +0800 +Subject: [PATCH] Fix the -march issue for riscv64 + +There is an issue on riscv64 system when compiling it natively: +gcc: error: '-march=native': ISA string must begin with rv32 or rv64 + +This patch set HOST_MARCH= like ia64 to resolve the issue. + +Signed-off-by: Wei Fu +(cherry picked from commit aab4e9b10ac9e98588a1b19771cf6f4c8c0a3096) +--- + src/include/defaults.mk | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/include/defaults.mk b/src/include/defaults.mk +index 632b155..b8cc590 100644 +--- a/src/include/defaults.mk ++++ b/src/include/defaults.mk +@@ -73,10 +73,14 @@ override SOFLAGS = $(_SOFLAGS) \ + + HOST_ARCH=$(shell uname -m) + ifneq ($(HOST_ARCH),ia64) ++ifneq ($(HOST_ARCH),riscv64) + HOST_MARCH=-march=native + else + HOST_MARCH= + endif ++else ++ HOST_MARCH= ++endif + HOST_CPPFLAGS ?= $(CPPFLAGS) + override _HOST_CPPFLAGS := $(HOST_CPPFLAGS) + override HOST_CPPFLAGS = $(_HOST_CPPFLAGS) \ diff --git a/efivar.patches b/efivar.patches index e69de29..3bb7841 100644 --- a/efivar.patches +++ b/efivar.patches @@ -0,0 +1 @@ +Patch0001: 0001-Fix-the-march-issue-for-riscv64.patch diff --git a/efivar.spec b/efivar.spec index 7dd5704..1073b86 100644 --- a/efivar.spec +++ b/efivar.spec @@ -1,6 +1,6 @@ Name: efivar Version: 38 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Tools to manage UEFI variables License: LGPL-2.1-only URL: https://github.com/rhboot/efivar @@ -84,7 +84,10 @@ make abicheck %{_libdir}/*.so.* %changelog -* Thu Jan 20 2022 Fedora Release Engineering +* Fri Apr 08 2022 Robbie Harwood 38-3 +- Apply fix for risxv64 (wefu) + +* Thu Jan 20 2022 Fedora Release Engineering - 38-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jan 14 2022 Robbie Harwood - 38-1