aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-02-18 17:27:26 +0000
committerArmin Kuster <akuster808@gmail.com>2020-02-23 09:39:23 -0800
commit4b41afeea632f33a490d75621e2c0d6bb2bb6aca (patch)
tree2f893ebccffabd451ef0f0c5a64d661d6633f7b8
parentb84f3056591c16fa3e2bba2e4fa936390a76ee9a (diff)
downloadopenembedded-core-contrib-4b41afeea632f33a490d75621e2c0d6bb2bb6aca.tar.gz
openembedded-core-contrib-4b41afeea632f33a490d75621e2c0d6bb2bb6aca.tar.bz2
openembedded-core-contrib-4b41afeea632f33a490d75621e2c0d6bb2bb6aca.zip
perl: Fix encode module reproducibility issues
The code is encoding host compiler parameters into target builds. Avoid this for our target builds. This should resolve builds which aren't reproducible between hosts with different compilers. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 71cdbf426e46e3ca1b5038f40e9f7ba958abc537) Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta/recipes-devtools/perl/files/encodefix.patch20
-rw-r--r--meta/recipes-devtools/perl/perl_5.30.1.bb3
2 files changed, 23 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/files/encodefix.patch b/meta/recipes-devtools/perl/files/encodefix.patch
new file mode 100644
index 00000000000..396ed0d53e3
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/encodefix.patch
@@ -0,0 +1,20 @@
+The code is encoding host compiler parameters into target builds. Avoid
+this for our target builds (patch is target specific, not native)
+
+Upstream-Status: Inappropriate [Cross compile hack]
+RP 2020/2/18
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Index: perl-5.30.1/cpan/Encode/bin/enc2xs
+===================================================================
+--- perl-5.30.1.orig/cpan/Encode/bin/enc2xs
++++ perl-5.30.1/cpan/Encode/bin/enc2xs
+@@ -195,7 +195,7 @@ sub compiler_info {
+ # above becomes false.
+ my $sized = $declaration && !($compat && !$pedantic);
+
+- return ($cpp, $static, $sized);
++ return (0, 1, 1);
+ }
+
+
diff --git a/meta/recipes-devtools/perl/perl_5.30.1.bb b/meta/recipes-devtools/perl/perl_5.30.1.bb
index 96f032648bd..e3915a50448 100644
--- a/meta/recipes-devtools/perl/perl_5.30.1.bb
+++ b/meta/recipes-devtools/perl/perl_5.30.1.bb
@@ -26,6 +26,9 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
SRC_URI_append_class-native = " \
file://perl-configpm-switch.patch \
"
+SRC_URI_append_class-target = " \
+ file://encodefix.patch \
+"
SRC_URI[perl.md5sum] = "6438eb7b8db9bbde28e01086de376a46"
SRC_URI[perl.sha256sum] = "bf3d25571ff1ee94186177c2cdef87867fd6a14aa5a84f0b1fb7bf798f42f964"