6e12388d103f1773d087f4c1cbfd9ac394af627d
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / gnu-efi / 0002-Fix-parallel-make-failure-for-archives.patch
1 From 7e9a26b0fc0bd8ed64a5eced5ea78bcea8ae3bbc Mon Sep 17 00:00:00 2001
2 From: Romain Naour <romain.naour@openwide.fr>
3 Date: Sat, 17 Jan 2015 18:44:04 +0100
4 Subject: [PATCH 2/2] Fix parallel make failure for archives
5
6 Upstream-Status: Pending
7
8 The lib and gnuefi makefiles were using the lib.a() form which compiles
9 and ar's as a pair instead of compiling all and then ar'ing which can
10 parallelize better. This was resulting in build failures on larger values
11 of -j.
12
13 See http://www.chemie.fu-berlin.de/chemnet/use/info/make/make_toc.html#TOC105
14 for details.
15
16 [Romain:
17  - rebase on top of 3.0.1 release]
18
19 Signed-off-by: Saul Wold <sgw@linux.intel.com>
20 Signed-off-by: Darren Hart <dvhart@linux.intel.com>
21 Signed-off-by: Romain Naour <romain.naour@openwide.fr>
22 ---
23  gnuefi/Makefile | 3 ++-
24  lib/Makefile    | 3 ++-
25  2 files changed, 4 insertions(+), 2 deletions(-)
26
27 diff --git a/gnuefi/Makefile b/gnuefi/Makefile
28 index d234ac0..d29575d 100644
29 --- a/gnuefi/Makefile
30 +++ b/gnuefi/Makefile
31 @@ -54,7 +54,8 @@ TARGETS       = crt0-efi-$(ARCH).o libgnuefi.a
32  
33  all:   $(TARGETS)
34  
35 -libgnuefi.a: $(patsubst %,libgnuefi.a(%),$(OBJS))
36 +libgnuefi.a: $(OBJS)
37 +       $(AR) rv $@ $(OBJS)
38  
39  clean:
40         rm -f $(TARGETS) *~ *.o $(OBJS)
41 diff --git a/lib/Makefile b/lib/Makefile
42 index 019ad57..c6abcae 100644
43 --- a/lib/Makefile
44 +++ b/lib/Makefile
45 @@ -73,7 +73,8 @@ all: libsubdirs libefi.a
46  libsubdirs:
47         for sdir in $(SUBDIRS); do mkdir -p $$sdir; done
48  
49 -libefi.a: $(patsubst %,libefi.a(%),$(OBJS))
50 +libefi.a: $(OBJS)
51 +       $(AR) rv $@ $(OBJS)
52  
53  clean:
54         rm -f libefi.a *~ $(OBJS) */*.o
55 -- 
56 1.9.3
57