diff options
author | Juro Bystricky <juro.bystricky@intel.com> | 2016-09-14 10:05:46 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-14 22:34:34 +0100 |
commit | a866a05e2c7d090a77aa6e95339c93e3592703a6 (patch) | |
tree | 89c79e4752f88e3aacd98279f81f66164eab0256 /meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch | |
parent | d3d2d213076b50e88ddc7d4e418ea2ab61b92e67 (diff) | |
download | openembedded-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/commit-applet_tables-fix-commit-0dddbc1.patch')
-rw-r--r-- | meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch | 61 |
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 @@ +Upstream-Status: Backport + +Patch addressing a parallel make race in Busybox + + http://git.busybox.net/busybox/commit/?id=0dddbc1a59795a77679d8c5ef48a2795cb470563 + +Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> + +From 0dddbc1a59795a77679d8c5ef48a2795cb470563 Mon Sep 17 00:00:00 2001 +From: Denys Vlasenko <vda.linux@googlemail.com> +Date: Tue, 23 Aug 2016 20:21:36 +0200 +Subject: build system: always rewrite NUM_APPLETS.h + +Conditional rewrite can keep NUM_APPLETS.h mtime old, +this causes make to try to regenerate it at every invocation. + +Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> + +diff --git a/applets/applet_tables.c b/applets/applet_tables.c +index 8401a15..ef911a4 100644 +--- a/applets/applet_tables.c ++++ b/applets/applet_tables.c +@@ -192,27 +192,28 @@ int main(int argc, char **argv) + printf("};\n"); + #endif + //printf("#endif /* SKIP_definitions */\n"); ++ + // printf("\n"); + // printf("#define MAX_APPLET_NAME_LEN %u\n", MAX_APPLET_NAME_LEN); + + if (argv[2]) { +- char line_old[80]; +- char line_new[80]; + FILE *fp; ++ char line_new[80]; ++// char line_old[80]; + +- line_old[0] = 0; +- fp = fopen(argv[2], "r"); +- if (fp) { +- fgets(line_old, sizeof(line_old), fp); +- fclose(fp); +- } + sprintf(line_new, "#define NUM_APPLETS %u\n", NUM_APPLETS); +- if (strcmp(line_old, line_new) != 0) { ++// line_old[0] = 0; ++// fp = fopen(argv[2], "r"); ++// if (fp) { ++// fgets(line_old, sizeof(line_old), fp); ++// fclose(fp); ++// } ++// if (strcmp(line_old, line_new) != 0) { + fp = fopen(argv[2], "w"); + if (!fp) + return 1; + fputs(line_new, fp); +- } ++// } + } + + return 0; |