blob: a9806cfdf62ef214ad200f8fd9ed2bf1ad9a8cba [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 48b2cdbcd761105e8ebad412fcbf23db1ac4ef7c Mon Sep 17 00:00:00 2001
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002From: Saul Wold <sgw@linux.intel.com>
3Date: Sun, 9 Mar 2014 15:22:15 +0200
4Subject: [PATCH 1/3] Fix parallel make failure for archives
Patrick Williamsc124f4f2015-09-15 14:41:29 -05005
6Upstream-Status: Pending
7
8The lib and gnuefi makefiles were using the lib.a() form which compiles
9and ar's as a pair instead of compiling all and then ar'ing which can
10parallelize better. This was resulting in build failures on larger values
11of -j.
12
13See http://www.chemie.fu-berlin.de/chemnet/use/info/make/make_toc.html#TOC105
14for details.
15
16Signed-off-by: Saul Wold <sgw@linux.intel.com>
17Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Brad Bishopd7bf8c12018-02-25 22:55:05 -050018[Rebased for 3.0.6]
19Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080020[Rebased for 3.0.8]
21Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050022---
Brad Bishopd7bf8c12018-02-25 22:55:05 -050023 gnuefi/Makefile | 3 ++-
24 lib/Makefile | 2 +-
25 2 files changed, 3 insertions(+), 2 deletions(-)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026
Brad Bishopd7bf8c12018-02-25 22:55:05 -050027diff --git a/gnuefi/Makefile b/gnuefi/Makefile
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080028index 2a61699..89b560a 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050029--- a/gnuefi/Makefile
30+++ b/gnuefi/Makefile
31@@ -54,7 +54,8 @@ TARGETS = crt0-efi-$(ARCH).o libgnuefi.a
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032
33 all: $(TARGETS)
34
35-libgnuefi.a: $(patsubst %,libgnuefi.a(%),$(OBJS))
36+libgnuefi.a: $(OBJS)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080037+ $(AR) $(ARFLAGS) $@ $(OBJS)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050038
39 clean:
40 rm -f $(TARGETS) *~ *.o $(OBJS)
Brad Bishopd7bf8c12018-02-25 22:55:05 -050041diff --git a/lib/Makefile b/lib/Makefile
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080042index 0e6410d..048751a 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050043--- a/lib/Makefile
44+++ b/lib/Makefile
45@@ -75,7 +75,7 @@ libsubdirs:
46 for sdir in $(SUBDIRS); do mkdir -p $$sdir; done
47
48 libefi.a: $(OBJS)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080049- $(AR) $(ARFLAGS) $@ $^
50+ $(AR) $(ARFLAGS) $@ $(OBJS)
Brad Bishopd7bf8c12018-02-25 22:55:05 -050051
52 clean:
53 rm -f libefi.a *~ $(OBJS) */*.o
54--
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800552.7.4
Brad Bishopd7bf8c12018-02-25 22:55:05 -050056