diff --git a/0003-lib-use-proper-linking-method-to-avoid-parallel-buil.patch b/0003-lib-use-proper-linking-method-to-avoid-parallel-buil.patch new file mode 100644 index 0000000..a3347b6 --- /dev/null +++ b/0003-lib-use-proper-linking-method-to-avoid-parallel-buil.patch @@ -0,0 +1,63 @@ +From 8e0e7b65dea3b9f71e8658f0e417fac6409b4c2c Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 25 May 2016 16:34:55 +0200 +Subject: [PATCH] lib: use proper linking method to avoid parallel build issue + +Using _LDFLAGS = -l is correct when is an +external library. However, when it is built by the same package, and +especially in the same directory, this is wrong and can cause parallel +build issues. In lib/Makefile.am, there was: + +libirrecord_la_LDFLAGS = -llirc + +But the liblirc library is built in the same directory. Or, due to the +using of _LDFLAGS, make is not aware of the build dependency +between libirrecord and liblirc. + +To solve this, _LIBADD should be used instead, as follows: + +libirrecord_la_LIBADD = liblirc.la + +This fixes parallel build issues seen by automated build tests +conducted by the Buildroot project, such as: + + http://autobuild.buildroot.org/results/eb4/eb47d57de8182d25b1dacbf0ac3726ed20063d04/build-end.log + +Signed-off-by: Thomas Petazzoni +--- + lib/Makefile.am | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/lib/Makefile.am b/lib/Makefile.am +index ce5c94c..fc77a60 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -29,7 +29,7 @@ liblirc_la_SOURCES = config_file.c \ + transmit.c \ + util.c + +-libirrecord_la_LDFLAGS = -llirc ++libirrecord_la_LIBADD = -llirc + libirrecord_la_SOURCES = irrecord.c + + liblirc_client_la_LDFLAGS = -version-info 4:0:4 +@@ -98,10 +98,16 @@ input_map.lo: lirc/input_map.inc + + input_map.inc: lirc/input_map.inc + ++if BSD ++lirc/input_map.inc: ++ touch $@ ++ touch touch input_map.inc ++else + lirc/input_map.inc: + ln -s . lirc || : + $(top_srcdir)/tools/lirc-make-devinput -i > input_map.inc + $(top_srcdir)/tools/lirc-make-devinput -i > $@ ++endif + + checkfiles: + ../git-tools/checkfiles $(SOURCES) $(HEADERS) +-- +2.5.5 +