support building with gnu-efi 3.0.11

include epoch in gnu-efi version requirement
f38
Dominik 'Rathann' Mierzejewski 5 years ago
parent 89f9516402
commit 9d1ecfd537

@ -1,7 +1,7 @@
diff -up sbsigntools-0.9.2/configure.ac.orig sbsigntools-0.9.2/configure.ac
--- sbsigntools-0.9.2/configure.ac.orig 2019-02-28 01:20:11.000000000 +0100
+++ sbsigntools-0.9.2/configure.ac 2019-02-28 10:55:56.214136475 +0100
@@ -64,8 +64,8 @@ PKG_CHECK_MODULES(uuid, uuid,
diff -up sbsigntools-0.9.3/configure.ac.gnu-efi sbsigntools-0.9.3/configure.ac
--- sbsigntools-0.9.3/configure.ac.gnu-efi 2020-02-03 09:38:56.000000000 +0100
+++ sbsigntools-0.9.3/configure.ac 2020-02-04 09:48:53.011259075 +0100
@@ -64,19 +64,30 @@ PKG_CHECK_MODULES(uuid, uuid,
AC_MSG_ERROR([libuuid (from the uuid package) is required]))
dnl gnu-efi headers require extra include dirs
@ -12,9 +12,43 @@ diff -up sbsigntools-0.9.2/configure.ac.orig sbsigntools-0.9.2/configure.ac
##
# no consistent view of where gnu-efi should dump the efi stuff, so find it
diff -up sbsigntools-0.9.2/tests/Makefile.am.orig sbsigntools-0.9.2/tests/Makefile.am
--- sbsigntools-0.9.2/tests/Makefile.am.orig 2019-02-28 01:20:11.000000000 +0100
+++ sbsigntools-0.9.2/tests/Makefile.am 2019-02-28 10:55:14.399450851 +0100
##
-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
+AC_MSG_CHECKING([gnu-efi crt path])
+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 /usr/lib/gnuefi/$EFI_ARCH ; do
+ if test -e $path/crt0.o; then
CRTPATH=$path
+ CRT=crt0.o
+ LDS=efi.lds
+ EFI_PATH=$path
+ elif test -e $path/crt0-efi-$EFI_ARCH.o; then
+ CRTPATH=$path
+ CRT=crt0-efi-${EFI_ARCH}.o
+ LDS=elf_${EFI_ARCH}_efi.lds
+ EFI_PATH=$libdir
fi
done
if test -z "$CRTPATH"; then
AC_MSG_ERROR([cannot find the gnu-efi crt path])
+else
+ AC_MSG_RESULT($CRTPATH)
fi
EFI_CPPFLAGS="-I/usr/include/efi -I/usr/include/efi/$EFI_ARCH \
@@ -88,6 +99,9 @@ CPPFLAGS="$CPPFLAGS_save"
AC_SUBST(EFI_CPPFLAGS, $EFI_CPPFLAGS)
AC_SUBST(EFI_ARCH, $EFI_ARCH)
AC_SUBST(CRTPATH, $CRTPATH)
+AC_SUBST(CRT, $CRT)
+AC_SUBST(LDS, $LDS)
+AC_SUBST(EFI_PATH, $EFI_PATH)
AC_CONFIG_FILES([Makefile src/Makefile lib/ccan/Makefile]
[docs/Makefile tests/Makefile])
diff -up sbsigntools-0.9.3/tests/Makefile.am.gnu-efi sbsigntools-0.9.3/tests/Makefile.am
--- sbsigntools-0.9.3/tests/Makefile.am.gnu-efi 2020-02-03 09:38:56.000000000 +0100
+++ sbsigntools-0.9.3/tests/Makefile.am 2020-02-04 09:47:44.786665340 +0100
@@ -14,7 +14,7 @@ if TEST_BINARY_FORMAT
EFILDFLAGS = --defsym=EFI_SUBSYSTEM=0x0a
FORMAT = -O binary
@ -29,7 +63,7 @@ diff -up sbsigntools-0.9.2/tests/Makefile.am.orig sbsigntools-0.9.2/tests/Makefi
.$(OBJEXT).elf:
- $(LD) $(EFILDFLAGS) -nostdlib -L /usr/lib -L /usr/lib64 -L $(CRTPATH) -shared -Bsymbolic $(CRTPATH)/crt0-efi-$(EFI_ARCH).o -T elf_$(EFI_ARCH)_efi.lds $< -o $@ -lefi -lgnuefi
+ $(LD) $(EFILDFLAGS) -nostdlib -L /usr/lib -L /usr/lib64 -L $(CRTPATH) -shared -Bsymbolic $(CRTPATH)/crt0-efi-$(EFI_ARCH).o -T elf_$(EFI_ARCH)_efi.lds $< -o $@ @libdir@/libefi.a @libdir@/libgnuefi.a
+ $(LD) $(EFILDFLAGS) -nostdlib -L /usr/lib -L /usr/lib64 -L $(CRTPATH) -shared -Bsymbolic $(CRTPATH)/$(CRT) -T $(LDS) $< -o $@ $(EFI_PATH)/libefi.a $(EFI_PATH)/libgnuefi.a
AM_CFLAGS=-fpic -I/usr/include/efi -I/usr/include/efi/$(EFI_ARCH)

@ -19,7 +19,7 @@ ExclusiveArch: x86_64 aarch64 %{arm} %{ix86}
BuildRequires: automake
BuildRequires: binutils-devel
BuildRequires: gcc
BuildRequires: gnu-efi-devel >= 3.0.8-3
BuildRequires: gnu-efi-devel >= 1:3.0.8-3
BuildRequires: help2man
BuildRequires: libuuid-devel
%if %{with check}
@ -82,6 +82,7 @@ make check
* Mon Feb 03 2020 Dominik Mierzejewski <dominik@greysector.net> - 0.9.3-1
- update to 0.9.3
- update bundled CCAN components list
- support building with gnu-efi 3.0.11
* Thu Feb 28 2019 Dominik Mierzejewski <dominik@greysector.net> - 0.9.2-1
- update to 0.9.2

Loading…
Cancel
Save