aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/busybox/makefile-libbb-race.patch
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2016-09-14 10:05:46 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-14 22:34:34 +0100
commita866a05e2c7d090a77aa6e95339c93e3592703a6 (patch)
tree89c79e4752f88e3aacd98279f81f66164eab0256 /meta/recipes-core/busybox/busybox/makefile-libbb-race.patch
parentd3d2d213076b50e88ddc7d4e418ea2ab61b92e67 (diff)
downloadopenembedded-core-contrib-a866a05e2c7d090a77aa6e95339c93e3592703a6.tar.gz
busybox: Avoid race building libbb
When building busybox, an occasional error was observed. The error is consistently the same: libbb/appletlib.c:164:13: error: 'NUM_APPLETS' undeclared (first use in this function) while (i < NUM_APPLETS) { The reason is the include file where NUM_APPLETS is defined is not yet generated (or is being modified) at the time libbb/appletlib.c is compiled. The attached patchset fixes the problem by assuring libb is compiled as the last directory. [YOCTO#10116] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/busybox/busybox/makefile-libbb-race.patch')
-rw-r--r--meta/recipes-core/busybox/busybox/makefile-libbb-race.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/busybox/makefile-libbb-race.patch b/meta/recipes-core/busybox/busybox/makefile-libbb-race.patch
new file mode 100644
index 0000000000..97278ab973
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/makefile-libbb-race.patch
@@ -0,0 +1,34 @@
+There is a potential race when building libbb, as some header files
+needed by libbb are not generated yet (or are being modified) at the time
+libbb is compiled.
+This patch avoids this scenario by building libbb as the last directory.
+
+Upstream-Status: Submitted
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+
+Index: busybox-1.24.1/Makefile
+===================================================================
+diff --git a/Makefile b/Makefile
+index 5cfc763..69f3831 100644
+--- a/Makefile
++++ b/Makefile
+@@ -738,9 +738,18 @@ $(sort $(busybox-all)): $(busybox-dirs) ;
+ # Error messages still appears in the original language
+
+ PHONY += $(busybox-dirs)
+-$(busybox-dirs): prepare scripts
++
++libbb-dir = $(filter libbb,$(busybox-dirs))
++busybox-dirs1 = $(filter-out libbb,$(busybox-dirs))
++
++$(busybox-dirs1): prepare scripts
+ $(Q)$(MAKE) $(build)=$@
+
++ifneq ($(libbb-dir),)
++$(libbb-dir): | $(busybox-dirs1)
++ $(Q)$(MAKE) $(build)=$@
++endif
++
+ # Build the kernel release string
+ # The KERNELRELEASE is stored in a file named .kernelrelease
+ # to be used when executing for example make install or make modules_install