summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.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-15 12:15:07 +0100
commita6f0bced4c15f93a5e1c1b8782aa5dc6ca8d1113 (patch)
treec481099dcd78e2a84d6e3ed549f436e3ac812a69 /meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch
parentde915fb7d387a7a3dcaba61b6e116bb28db9d8ff (diff)
downloadpoky-a6f0bced4c15f93a5e1c1b8782aa5dc6ca8d1113.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] (From OE-Core rev: a866a05e2c7d090a77aa6e95339c93e3592703a6) 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/commit-applet_tables-fix-commit-0dddbc1.patch')
-rw-r--r--meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch b/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch
new file mode 100644
index 0000000000..7f80a1d915
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch
@@ -0,0 +1,61 @@
1Upstream-Status: Backport
2
3Patch addressing a parallel make race in Busybox
4
5 http://git.busybox.net/busybox/commit/?id=0dddbc1a59795a77679d8c5ef48a2795cb470563
6
7Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
8
9From 0dddbc1a59795a77679d8c5ef48a2795cb470563 Mon Sep 17 00:00:00 2001
10From: Denys Vlasenko <vda.linux@googlemail.com>
11Date: Tue, 23 Aug 2016 20:21:36 +0200
12Subject: build system: always rewrite NUM_APPLETS.h
13
14Conditional rewrite can keep NUM_APPLETS.h mtime old,
15this causes make to try to regenerate it at every invocation.
16
17Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
18
19diff --git a/applets/applet_tables.c b/applets/applet_tables.c
20index 8401a15..ef911a4 100644
21--- a/applets/applet_tables.c
22+++ b/applets/applet_tables.c
23@@ -192,27 +192,28 @@ int main(int argc, char **argv)
24 printf("};\n");
25 #endif
26 //printf("#endif /* SKIP_definitions */\n");
27+
28 // printf("\n");
29 // printf("#define MAX_APPLET_NAME_LEN %u\n", MAX_APPLET_NAME_LEN);
30
31 if (argv[2]) {
32- char line_old[80];
33- char line_new[80];
34 FILE *fp;
35+ char line_new[80];
36+// char line_old[80];
37
38- line_old[0] = 0;
39- fp = fopen(argv[2], "r");
40- if (fp) {
41- fgets(line_old, sizeof(line_old), fp);
42- fclose(fp);
43- }
44 sprintf(line_new, "#define NUM_APPLETS %u\n", NUM_APPLETS);
45- if (strcmp(line_old, line_new) != 0) {
46+// line_old[0] = 0;
47+// fp = fopen(argv[2], "r");
48+// if (fp) {
49+// fgets(line_old, sizeof(line_old), fp);
50+// fclose(fp);
51+// }
52+// if (strcmp(line_old, line_new) != 0) {
53 fp = fopen(argv[2], "w");
54 if (!fp)
55 return 1;
56 fputs(line_new, fp);
57- }
58+// }
59 }
60
61 return 0;