aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Rini <tom_rini@mentor.com>2011-07-09 08:04:49 -0700
committerTom Rini <tom_rini@mentor.com>2011-07-09 08:09:29 -0700
commit75abeb98e09b045d972b54f831ee6fc30300c257 (patch)
treece157b3ba125fcd37d14ba5e6380b6c659318ad5
parent0d424b1eb89b3d50d2da006cc47a4def009b4a31 (diff)
downloadopenembedded-75abeb98e09b045d972b54f831ee6fc30300c257.tar.gz
openembedded-75abeb98e09b045d972b54f831ee6fc30300c257.tar.bz2
openembedded-75abeb98e09b045d972b54f831ee6fc30300c257.zip
bluez4: Fix a build race on generated headers
Submitting this patch upstream now. Without it, it's possible to hit a race with a sufficiently large make -j number. Signed-off-by: Tom Rini <tom_rini@mentor.com>
-rw-r--r--recipes/bluez/bluez4/fix-build-races.patch29
-rw-r--r--recipes/bluez/bluez4_4.91.bb4
2 files changed, 32 insertions, 1 deletions
diff --git a/recipes/bluez/bluez4/fix-build-races.patch b/recipes/bluez/bluez4/fix-build-races.patch
new file mode 100644
index 0000000000..47c355e90e
--- /dev/null
+++ b/recipes/bluez/bluez4/fix-build-races.patch
@@ -0,0 +1,29 @@
+Add 'local_headers' to BUILT_SOURCES so that they're treated correctly
+and we don't have a race on generating these versus using them.
+---
+ Makefile.am | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+Index: bluez-4.91/Makefile.am
+===================================================================
+--- bluez-4.91.orig/Makefile.am
++++ bluez-4.91/Makefile.am
+@@ -47,6 +47,8 @@ lib_headers = lib/bluetooth.h lib/hci.h
+ lib/rfcomm.h lib/bnep.h lib/cmtp.h lib/hidp.h
+ local_headers = $(foreach file,$(lib_headers), lib/bluetooth/$(notdir $(file)))
+
++BUILT_SOURCES = $(local_headers)
++
+ include_HEADERS += $(lib_headers)
+
+ lib_LTLIBRARIES += lib/libbluetooth.la
+@@ -56,9 +58,6 @@ lib_libbluetooth_la_SOURCES = $(lib_head
+ lib_libbluetooth_la_LDFLAGS = -version-info 14:0:11
+ lib_libbluetooth_la_DEPENDENCIES = $(local_headers)
+
+-CLEANFILES += $(local_headers)
+-
+-
+ if SBC
+ noinst_LTLIBRARIES += sbc/libsbc.la
+
diff --git a/recipes/bluez/bluez4_4.91.bb b/recipes/bluez/bluez4_4.91.bb
index 95d1d8c64a..33f0422ac1 100644
--- a/recipes/bluez/bluez4_4.91.bb
+++ b/recipes/bluez/bluez4_4.91.bb
@@ -3,13 +3,15 @@ require bluez4.inc
SRC_URI[md5sum] = "3059b7ef5168c84cd0c6a67034ce79f9"
SRC_URI[sha256sum] = "11e9279e2669db996afd464b96d2c68f41f157f6eb9b8842a0bbcad8a4eac18d"
+SRC_URI += "file://fix-build-races.patch"
+
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_angstrom = "1"
DEFAULT_PREFERENCE_shr = "1"
DEPENDS += "libsndfile1"
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
# Not all distros have a recent enough udev
BTUDEV = " --disable-udevrules"