Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 1 | From 48b2cdbcd761105e8ebad412fcbf23db1ac4ef7c Mon Sep 17 00:00:00 2001 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2 | From: Saul Wold <sgw@linux.intel.com> |
| 3 | Date: Sun, 9 Mar 2014 15:22:15 +0200 |
| 4 | Subject: [PATCH 1/3] Fix parallel make failure for archives |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 | Signed-off-by: Saul Wold <sgw@linux.intel.com> |
| 17 | Signed-off-by: Darren Hart <dvhart@linux.intel.com> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 18 | [Rebased for 3.0.6] |
| 19 | Signed-off-by: California Sullivan <california.l.sullivan@intel.com> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 20 | [Rebased for 3.0.8] |
| 21 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 22 | --- |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 23 | gnuefi/Makefile | 3 ++- |
| 24 | lib/Makefile | 2 +- |
| 25 | 2 files changed, 3 insertions(+), 2 deletions(-) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 26 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 27 | diff --git a/gnuefi/Makefile b/gnuefi/Makefile |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 28 | index 2a61699..89b560a 100644 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 29 | --- a/gnuefi/Makefile |
| 30 | +++ b/gnuefi/Makefile |
| 31 | @@ -54,7 +54,8 @@ TARGETS = crt0-efi-$(ARCH).o libgnuefi.a |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 32 | |
| 33 | all: $(TARGETS) |
| 34 | |
| 35 | -libgnuefi.a: $(patsubst %,libgnuefi.a(%),$(OBJS)) |
| 36 | +libgnuefi.a: $(OBJS) |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 37 | + $(AR) $(ARFLAGS) $@ $(OBJS) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 38 | |
| 39 | clean: |
| 40 | rm -f $(TARGETS) *~ *.o $(OBJS) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 41 | diff --git a/lib/Makefile b/lib/Makefile |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 42 | index 0e6410d..048751a 100644 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 43 | --- 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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 49 | - $(AR) $(ARFLAGS) $@ $^ |
| 50 | + $(AR) $(ARFLAGS) $@ $(OBJS) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 51 | |
| 52 | clean: |
| 53 | rm -f libefi.a *~ $(OBJS) */*.o |
| 54 | -- |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 55 | 2.7.4 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 56 | |