gnu-efi/gnu-efi-ar-stable-order.patch

35 lines
1.0 KiB
Diff

From 61859152d807ff7f6afabc0bb6072399e6396f8a Mon Sep 17 00:00:00 2001
From: Nigel Croxon <ncroxon@redhat.com>
Date: Thu, 1 Jun 2017 07:47:37 -0400
Subject: [PATCH] This commit inserts the libefi.a objects in a stable order.
When building libefi.a with "make -jN", the object files in libefi.a
will be inserted in a random order. Although it won't hurt the functionality,
it could make the EFI image irreproducible and invalidate the detached
signature after rebuilding libefi.a without any change in the source
code.
Signed-off-by: Gary Lin <glin@suse.com>
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
---
lib/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/Makefile b/lib/Makefile
index a687495..b8d1ce7 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -74,7 +74,8 @@ all: libsubdirs libefi.a
libsubdirs:
for sdir in $(SUBDIRS); do mkdir -p $$sdir; done
-libefi.a: $(patsubst %,libefi.a(%),$(OBJS))
+libefi.a: $(OBJS)
+ $(AR) rv -U $@ $^
clean:
rm -f libefi.a *~ $(OBJS) */*.o
--
2.13.0