You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sbsigntools/sbsigntools-gnuefi.patch

42 lines
2.1 KiB

diff -up sbsigntools-0.9.1/configure.ac.orig sbsigntools-0.9.1/configure.ac
--- sbsigntools-0.9.1/configure.ac.orig 2018-02-21 17:48:52.000000001 +0100
+++ sbsigntools-0.9.1/configure.ac 2018-07-25 11:08:39.869451195 +0200
@@ -64,13 +64,13 @@ PKG_CHECK_MODULES(uuid, uuid,
AC_MSG_ERROR([libuuid (from the uuid package) is required]))
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" ])
+EFI_ARCH=$(uname -m | sed -e 's/i.86/ia32/;s/arm.*/arm/' -e 's/x86_64/x64/' -e 's/aarch64/aa64/')
+AM_CONDITIONAL(TEST_BINARY_FORMAT, [ test "$EFI_ARCH" = "arm" -o "$EFI_ARCH" = "aa64" ])
##
# no consistent view of where gnu-efi should dump the efi stuff, so find it
##
-for path in /lib /lib64 /usr/lib /usr/lib64 /usr/lib32 /lib/efi /lib64/efi /usr/lib/efi /usr/lib64/efi; do
+for path in /lib /lib64 /usr/lib /usr/lib64 /usr/lib32 /lib/efi /lib64/efi /usr/lib/efi /usr/lib64/efi /usr/lib/gnuefi /usr/lib64/gnuefi ; do
if test -e $path/crt0-efi-$EFI_ARCH.o; then
CRTPATH=$path
fi
diff -up sbsigntools-0.9.1/tests/Makefile.am.orig sbsigntools-0.9.1/tests/Makefile.am
--- sbsigntools-0.9.1/tests/Makefile.am.orig 2018-02-21 17:48:52.000000001 +0100
+++ sbsigntools-0.9.1/tests/Makefile.am 2018-07-25 12:20:00.188006224 +0200
@@ -14,7 +14,7 @@ if TEST_BINARY_FORMAT
EFILDFLAGS = --defsym=EFI_SUBSYSTEM=0x0a
FORMAT = -O binary
else
-FORMAT = --target=efi-app-$(EFI_ARCH)
+FORMAT = --target=efi-app-$(EFI_ARCH:x64=x86_64)
endif
check_DATA = $(test_key) $(test_cert)
check_SCRIPTS = test-wrapper.sh
@@ -27,7 +27,7 @@ check_SCRIPTS = test-wrapper.sh
$(FORMAT) $^ $@
.$(OBJEXT).elf:
- $(LD) $(EFILDFLAGS) -nostdlib -L $(CRTPATH) -shared -Bsymbolic $(CRTPATH)/crt0-efi-$(EFI_ARCH).o -T elf_$(EFI_ARCH)_efi.lds $< -o $@ -lefi -lgnuefi
+ $(LD) $(EFILDFLAGS) -nostdlib -L $(CRTPATH) -shared -Bsymbolic $(CRTPATH)/crt0-efi-$(EFI_ARCH).o -T elf_$(EFI_ARCH)_efi.lds $< -o $@ @libdir@/libefi.a @libdir@/libgnuefi.a
AM_CFLAGS=-fpic -I/usr/include/efi -I/usr/include/efi/$(EFI_ARCH)