summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/files
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:54 +0100
commit95947fa630e1fecc599f975d732eb47dd4b748ff (patch)
treea676f16d552bc4e46dafc0c86b20a02a9536bc31 /meta/recipes-devtools/perl/files
parentbe02e8dbfb0d1decce125322f9f1e11a649756c0 (diff)
downloadopenembedded-core-95947fa630e1fecc599f975d732eb47dd4b748ff.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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/perl/files')
-rw-r--r--meta/recipes-devtools/perl/files/perl-cross-makefile.patch29
1 files changed, 29 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 @@
+Makefile: Avoid continual rebuilds of miniperl and associated races
+
+In the Yocto Project, 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.
+
+Signed-off-by: Richard Purdie richard.purdie@linuxfoundation.org
+Upstream-Status: Submitted [https://github.com/arsv/perl-cross/pull/95]
+
+Index: perl-5.32.0/Makefile
+===================================================================
+--- perl-5.32.0.orig/Makefile
++++ perl-5.32.0/Makefile
+@@ -56,7 +56,7 @@ crosspatch: $(CROSSPATCHED)
+
+ # A minor fix for buildroot, force crosspatching when running "make perl modules"
+ # instead of "make all".
+-miniperlmain$O: crosspatch
++miniperlmain$O: $(CROSSPATCHED)
+
+ # Original versions are not saved anymore; patch generally takes care of this,
+ # and if that fails, reaching for the source tarball is the safest option.