summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-26 15:02:20 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-27 10:37:58 +0100
commitf22e0478fa9a3acb9e66f4848353ec11e4d3fb5b (patch)
tree66ef75e96def38624dbf4f6151b2c3f78579be18 /meta/recipes-devtools
parent4cbea1019781e9595655448347a38dae1db5ee29 (diff)
downloadpoky-f22e0478fa9a3acb9e66f4848353ec11e4d3fb5b.tar.gz
perl: Avoid race continually rebuilding miniperl
When we run "make install" we notice miniperl rebuilding multiple times. Usually this is harmless however sometimes race issues occur such as miniperl not being executable. The issue is that crosspatch is a phony target so it always rebuilds. Adding this as a dependency of miniperl means miniperl always rebuilds too. Avoid this by injecting a direct dependency avoiding the phony target. miniperl is then only rebuilt when its input changes as desired. Patch submitted to upstream perl-cross. (From OE-Core rev: 95947fa630e1fecc599f975d732eb47dd4b748ff) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/perl/files/perl-cross-makefile.patch29
-rw-r--r--meta/recipes-devtools/perl/perl_5.32.0.bb1
2 files changed, 30 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/files/perl-cross-makefile.patch b/meta/recipes-devtools/perl/files/perl-cross-makefile.patch
new file mode 100644
index 0000000000..5d3f998200
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/perl-cross-makefile.patch
@@ -0,0 +1,29 @@
1Makefile: Avoid continual rebuilds of miniperl and associated races
2
3In the Yocto Project, when we run "make install" we notice miniperl
4rebuilding multiple times. Usually this is harmless however sometimes
5race issues occur such as miniperl not being executable.
6
7The issue is that crosspatch is a phony target so it always rebuilds.
8Adding this as a dependency of miniperl means miniperl always rebuilds
9too.
10
11Avoid this by injecting a direct dependency avoiding the phony target.
12miniperl is then only rebuilt when its input changes as desired.
13
14Signed-off-by: Richard Purdie richard.purdie@linuxfoundation.org
15Upstream-Status: Submitted [https://github.com/arsv/perl-cross/pull/95]
16
17Index: perl-5.32.0/Makefile
18===================================================================
19--- perl-5.32.0.orig/Makefile
20+++ perl-5.32.0/Makefile
21@@ -56,7 +56,7 @@ crosspatch: $(CROSSPATCHED)
22
23 # A minor fix for buildroot, force crosspatching when running "make perl modules"
24 # instead of "make all".
25-miniperlmain$O: crosspatch
26+miniperlmain$O: $(CROSSPATCHED)
27
28 # Original versions are not saved anymore; patch generally takes care of this,
29 # and if that fails, reaching for the source tarball is the safest option.
diff --git a/meta/recipes-devtools/perl/perl_5.32.0.bb b/meta/recipes-devtools/perl/perl_5.32.0.bb
index 1adfd90e73..c10ce12303 100644
--- a/meta/recipes-devtools/perl/perl_5.32.0.bb
+++ b/meta/recipes-devtools/perl/perl_5.32.0.bb
@@ -20,6 +20,7 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
20 file://0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch \ 20 file://0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch \
21 file://0002-Constant-Fix-up-shebang.patch \ 21 file://0002-Constant-Fix-up-shebang.patch \
22 file://determinism.patch \ 22 file://determinism.patch \
23 file://perl-cross-makefile.patch \
23 " 24 "
24SRC_URI_append_class-native = " \ 25SRC_URI_append_class-native = " \
25 file://perl-configpm-switch.patch \ 26 file://perl-configpm-switch.patch \