2 Commits

3 changed files with 44 additions and 1 deletions

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Mar 27 16:16:26 UTC 2025 - Andreas Schwab <schwab@suse.de>
- test-binary-format.patch: Use efi-app-$EFI_ARCH also for aarch64 and
riscv64
- Use -ffat-lto-objects to fix testsuite on arm
-------------------------------------------------------------------
Sun Apr 02 14:29:25 UTC 2023 - bjorn.lie@gmail.com

View File

@@ -1,7 +1,7 @@
#
# spec file for package sbsigntools
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -23,6 +23,7 @@ Version: 0.9.5
Release: 0
URL: http://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git
Source: %{name}-%{version}.tar.gz
Patch0: test-binary-format.patch
BuildRequires: binutils-devel
BuildRequires: libuuid-devel
BuildRequires: openssl-devel
@@ -44,6 +45,9 @@ binaries and drivers.
%prep
%autosetup -p1
# Needed for tests/test.elf which is linked by calling ld directly
%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects
%build
NOCONFIGURE=1 ./autogen.sh
CFLAGS="%optflags -Wno-error=maybe-uninitialized"

32
test-binary-format.patch Normal file
View File

@@ -0,0 +1,32 @@
From 9b72031f830f943e0e6695b5228a7068f5b4edee Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@suse.de>
Date: Fri, 28 Mar 2025 21:45:03 +0100
Subject: [PATCH] Use efi-app for testing also on aarch64 and riscv64
Current binutils implement the efi-app target also for aarch64 and
riscv64, and gnu-efi is using it by default as of version 4.0.0. This
means that crt0-efi-$(EFI_ARCH) no longer contains the PE header, and
linking as binary produces an unrecognizable object. Switch to using
efi-app-$(EFI_ARCH) to ensure the PE header is included in the output.
Signed-off-by: Andreas Schwab <schwab@suse.de>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 8a5340a..00c15bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,7 +68,7 @@ PKG_CHECK_MODULES(uuid, uuid,
dnl gnu-efi headers require extra include dirs
EFI_ARCH=$(uname -m | sed 's/i.86/ia32/;s/arm.*/arm/')
-AM_CONDITIONAL(TEST_BINARY_FORMAT, [ test "$EFI_ARCH" = "arm" -o "$EFI_ARCH" = "aarch64" -o "$EFI_ARCH" = riscv64 ])
+AM_CONDITIONAL(TEST_BINARY_FORMAT, [ test "$EFI_ARCH" = "arm" ])
##
# no consistent view of where gnu-efi should dump the efi stuff, so find it
--
2.49.0