diff mbox

[meta-oe,1/3] acpica: fix parallel build

Message ID 1377513195-21664-2-git-send-email-fathi.boudra@linaro.org
State Accepted
Commit 24fd2dc97991f972fed128c2529b6d149ec0f9da
Headers show

Commit Message

Fathi Boudra Aug. 26, 2013, 10:33 a.m. UTC
The compilation of the iasl utility fails when `make -j<N>' > 1.  This
commit cleans up the rules in generate/unix/iasl such that a `make -j'
will succeed.

Signed-off-by: Andrew McDermott <andrew.mcdermott@linaro.org>
---
 meta-oe/recipes-extended/acpica/acpica_20130626.bb |  3 +-
 .../acpica/files/fix-parallel-build.patch          | 80 ++++++++++++++++++++++
 2 files changed, 82 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/acpica/files/fix-parallel-build.patch
diff mbox

Patch

diff --git a/meta-oe/recipes-extended/acpica/acpica_20130626.bb b/meta-oe/recipes-extended/acpica/acpica_20130626.bb
index 65eadac..bf38fa3 100644
--- a/meta-oe/recipes-extended/acpica/acpica_20130626.bb
+++ b/meta-oe/recipes-extended/acpica/acpica_20130626.bb
@@ -17,7 +17,8 @@  PR="r1"
 
 SRC_URI="https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz \
     file://cross-compile.patch \
-    file://no-werror.patch"
+    file://no-werror.patch \
+    file://fix-parallel-build.patch"
 
 SRC_URI[md5sum] = "b7112b3deffef8fe25aac7810cc419a9"
 SRC_URI[sha256sum] = "888dda6227265c396a686624f971c51693c2bba84f24c634536234c8dca7b465"
diff --git a/meta-oe/recipes-extended/acpica/files/fix-parallel-build.patch b/meta-oe/recipes-extended/acpica/files/fix-parallel-build.patch
new file mode 100644
index 0000000..42e3fb1
--- /dev/null
+++ b/meta-oe/recipes-extended/acpica/files/fix-parallel-build.patch
@@ -0,0 +1,80 @@ 
+diff --git a/generate/unix/iasl/Makefile b/generate/unix/iasl/Makefile
+index e9520ed..1b73d7a 100644
+--- a/generate/unix/iasl/Makefile
++++ b/generate/unix/iasl/Makefile
+@@ -212,13 +212,10 @@ INTERMEDIATES = \
+ MISC = \
+ 	$(OBJDIR)/aslcompilerparse.h\
+ 	$(OBJDIR)/aslcompiler.y.h\
+-	$(OBJDIR)/aslcompilerparse.output\
+ 	$(OBJDIR)/dtparserparse.h\
+ 	$(OBJDIR)/dtparser.y.h\
+-	$(OBJDIR)/dtparserparse.output\
+ 	$(OBJDIR)/prparserparse.h\
+-	$(OBJDIR)/prparser.y.h\
+-	$(OBJDIR)/prparserparse.output
++	$(OBJDIR)/prparser.y.h
+ 
+ #
+ # Flags specific to iASL compiler
+@@ -240,21 +237,29 @@ include ../Makefile.rules
+ $(OBJDIR)/aslcompilerlex.c :   $(ASL_COMPILER)/aslcompiler.l $(ASL_COMPILER)/aslsupport.l
+ 	$(LEX) $(LFLAGS) -PAslCompiler -o$@ $(ASL_COMPILER)/aslcompiler.l
+ 
+-$(OBJDIR)/aslcompilerparse.c $(OBJDIR)/aslcompilerparse.h : $(ASL_COMPILER)/aslcompiler.y
++$(OBJDIR)/aslcompilerparse.c : $(ASL_COMPILER)/aslcompiler.y
+ 	$(YACC) $(YFLAGS) -pAslCompiler -o$@ $?
+ 
+ $(OBJDIR)/dtparserlex.c :      $(ASL_COMPILER)/dtparser.l
+ 	$(LEX) $(LFLAGS) -PDtParser -o$@ $?
+ 
+-$(OBJDIR)/dtparserparse.c $(OBJDIR)/dtparserparse.h : $(ASL_COMPILER)/dtparser.y
++$(OBJDIR)/dtparserparse.c : $(ASL_COMPILER)/dtparser.y
+ 	$(YACC) $(YFLAGS) -pDtParser -o$@ $?
+ 
+ $(OBJDIR)/prparserlex.c :      $(ASL_COMPILER)/prparser.l
+ 	$(LEX) $(LFLAGS) -PPrParser -o$@ $?
+ 
+-$(OBJDIR)/prparserparse.c $(OBJDIR)/prparserparse.h : $(ASL_COMPILER)/prparser.y
++$(OBJDIR)/prparserparse.c : $(ASL_COMPILER)/prparser.y
+ 	$(YACC) $(YFLAGS) -pPrParser -o$@ $?
+ 
++$(OBJDIR)/aslcompilerparse.h : $(OBJDIR)/aslcompilerparse.c
++	touch $@
++
++$(OBJDIR)/dtparserparse.h : $(OBJDIR)/dtparserparse.c
++	touch $@
++
++$(OBJDIR)/prparserparse.h:  $(OBJDIR)/prparserparse.c
++	touch $@
+ 
+ #
+ # Rename the headers produced by bison/yacc
+@@ -279,19 +284,21 @@ $(OBJDIR)/prparser.y.h: $(OBJDIR)/prparserparse.h
+ # by the utilities above and they are not necessarily ANSI C, etc.
+ #
+ $(OBJDIR)/aslcompilerlex.o :   $(OBJDIR)/aslcompilerlex.c
+-	$(CC) -c $(CFLAGS) -Wall -o$@ $?
++	$(CC) -c $(CFLAGS) -Wall -o$@ $<
+ 
+ $(OBJDIR)/aslcompilerparse.o : $(OBJDIR)/aslcompilerparse.c
+-	$(CC) -c $(CFLAGS) -Wall -o$@ $?
++	$(CC) -c $(CFLAGS) -Wall -o$@ $<
+ 
+ $(OBJDIR)/dtparserlex.o :      $(OBJDIR)/dtparserlex.c
+-	$(CC) -c $(CFLAGS) -Wall -o$@ $?
++	$(CC) -c $(CFLAGS) -Wall -o$@ $<
+ 
+ $(OBJDIR)/dtparserparse.o :    $(OBJDIR)/dtparserparse.c
+-	$(CC) -c $(CFLAGS) -Wall -o$@ $?
++	$(CC) -c $(CFLAGS) -Wall -o$@ $<
+ 
+ $(OBJDIR)/prparserlex.o :      $(OBJDIR)/prparserlex.c
+-	$(CC) -c $(CFLAGS) -Wall -o$@ $?
++	$(CC) -c $(CFLAGS) -Wall -o$@ $<
+ 
+ $(OBJDIR)/prparserparse.o :    $(OBJDIR)/prparserparse.c
+-	$(CC) -c $(CFLAGS) -Wall -o$@ $?
++	$(CC) -c $(CFLAGS) -Wall -o$@ $<
++
++$(OBJECTS): $(HEADERS)