diff --git a/system/boot/efivar/actions.py b/system/boot/efivar/actions.py index 548332c51f..9f5791e59e 100644 --- a/system/boot/efivar/actions.py +++ b/system/boot/efivar/actions.py @@ -11,8 +11,8 @@ from pisi.actionsapi import get def build(): shelltools.export("CFLAGS", "-Os -O2 -Wno-stringop-truncation") - pisitools.dosed("Make.defaults","-O0","-Os") - shelltools.system("sed -i -e 's/-Werror //' gcc.specs || die") + # pisitools.dosed("Make.defaults","-O0","-Os") + # shelltools.system("sed -i -e 's/-Werror //' gcc.specs || die") pisitools.dosed("src/test/Makefile","-rpath=$(TOPDIR)/src/","-rpath=$(libdir)|g") autotools.make("libdir=/usr/lib bindir=/usr/bin includedir=/usr/include/ V=1 -j1") diff --git a/system/boot/efivar/files/fedora/0001-Fix-the-march-issue-for-riscv64.patch b/system/boot/efivar/files/fedora/0001-Fix-the-march-issue-for-riscv64.patch new file mode 100644 index 0000000000..62e2c86764 --- /dev/null +++ b/system/boot/efivar/files/fedora/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/system/boot/efivar/files/fedora/0002-Fix-glibc-2.36-build-mount.h-conflicts.patch b/system/boot/efivar/files/fedora/0002-Fix-glibc-2.36-build-mount.h-conflicts.patch new file mode 100644 index 0000000000..fa6a36aef1 --- /dev/null +++ b/system/boot/efivar/files/fedora/0002-Fix-glibc-2.36-build-mount.h-conflicts.patch @@ -0,0 +1,56 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Robbie Harwood +Date: Thu, 28 Jul 2022 16:11:24 -0400 +Subject: [PATCH] Fix glibc 2.36 build (mount.h conflicts) + +glibc has decided that sys/mount.h and linux/mount.h are no longer +usable at the same time. This broke the build, since linux/fs.h itself +includes linux/mount.h. For now, fix the build by only including +sys/mount.h where we need it. + +See-also: https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E +Resolves: #227 +Signed-off-by: Robbie Harwood +(cherry picked from commit bc65d63ebf8fe6ac8a099ff15ca200986dba1565) +--- + src/gpt.c | 1 + + src/linux.c | 1 + + src/util.h | 1 - + 3 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/gpt.c b/src/gpt.c +index 1eda049..21413c3 100644 +--- a/src/gpt.c ++++ b/src/gpt.c +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/src/linux.c b/src/linux.c +index 47e45ae..1780816 100644 +--- a/src/linux.c ++++ b/src/linux.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/src/util.h b/src/util.h +index 3300666..1e67e44 100644 +--- a/src/util.h ++++ b/src/util.h +@@ -23,7 +23,6 @@ + #include + #include + #include +-#include + #include + #include + #include diff --git a/system/boot/efivar/pspec.xml b/system/boot/efivar/pspec.xml index 7db18a9645..61aab9609d 100644 --- a/system/boot/efivar/pspec.xml +++ b/system/boot/efivar/pspec.xml @@ -12,21 +12,13 @@ app:console Tools and library to manipulate EFI variables Tools and library to manipulate EFI variables. - https://github.com/rhinstaller/efivar/releases/download/37/efivar-37.tar.bz2 + https://github.com/rhinstaller/efivar/releases/download/38/efivar-38.tar.bz2 popt-devel - fedora/0001-util.h-add-unlikely-and-likely-macros.patch - fedora/0002-dp.h-make-format_guid-handle-misaligned-guid-pointer.patch - fedora/0003-linux-pci-root-remove-an-unused-assignment.patch - fedora/0004-Fix-all-the-places-Werror-address-of-packed-member-c.patch - fedora/0005-Get-rid-of-the-arrows-in-our-debug-messages.patch - fedora/0006-Define-strdupa-if-it-is-not-defined.patch - fedora/0007-Android-inital-porting-of-libefivar.patch - fedora/0008-Remove-an-unused-function.patch - fedora/0009-Fix-another-error-of-Werror-address-of-packed-member.patch - fedora/0010-Update-generated-ABI.patch + fedora/0001-Fix-the-march-issue-for-riscv64.patch + fedora/0002-Fix-glibc-2.36-build-mount.h-conflicts.patch @@ -54,6 +46,13 @@ + + 2023-03-12 + 38 + Version bump. + Mustafa Cinasal + muscnsl@gmail.com + 2021-07-16 37