summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/perl/files')
-rw-r--r--meta/recipes-devtools/perl/files/0001-CheckLib.pm-do-not-attempt-to-run-a-cross-executable.patch24
-rw-r--r--meta/recipes-devtools/perl/files/0001-Fix-build-with-gcc-12.patch143
-rw-r--r--meta/recipes-devtools/perl/files/0001-Fix-intermittent-failure-of-test-t-op-sigsystem.t.patch77
-rw-r--r--meta/recipes-devtools/perl/files/perl-configpm-switch.patch66
-rw-r--r--meta/recipes-devtools/perl/files/run-ptest2
5 files changed, 111 insertions, 201 deletions
diff --git a/meta/recipes-devtools/perl/files/0001-CheckLib.pm-do-not-attempt-to-run-a-cross-executable.patch b/meta/recipes-devtools/perl/files/0001-CheckLib.pm-do-not-attempt-to-run-a-cross-executable.patch
deleted file mode 100644
index c5bbe7888e..0000000000
--- a/meta/recipes-devtools/perl/files/0001-CheckLib.pm-do-not-attempt-to-run-a-cross-executable.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From a033c9ece12b6eead48eed63f106ccdec6159b0c Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 20 Dec 2019 16:26:55 +0100
-Subject: [PATCH] CheckLib.pm: do not attempt to run a cross executable
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- inc/Devel/CheckLib.pm | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/inc/Devel/CheckLib.pm b/inc/Devel/CheckLib.pm
-index 36a451a..b04acc1 100644
---- a/inc/Devel/CheckLib.pm
-+++ b/inc/Devel/CheckLib.pm
-@@ -330,7 +330,7 @@ sub assert_lib {
- push @missing, $lib if $rv != 0 || !-x $exefile;
- my $absexefile = File::Spec->rel2abs($exefile);
- $absexefile = '"' . $absexefile . '"' if $absexefile =~ m/\s/;
-- push @wrongresult, $lib if $rv == 0 && -x $exefile && system($absexefile) != 0;
-+ push @wrongresult, $lib if $rv == 0 && -x $exefile && 0 != 0;
- unlink $ofile if -e $ofile;
- _cleanup_exe($exefile);
- }
diff --git a/meta/recipes-devtools/perl/files/0001-Fix-build-with-gcc-12.patch b/meta/recipes-devtools/perl/files/0001-Fix-build-with-gcc-12.patch
deleted file mode 100644
index 1d98e1389b..0000000000
--- a/meta/recipes-devtools/perl/files/0001-Fix-build-with-gcc-12.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From ee957eb9e4ec29a462cdbb2f3bbe29d4270534ef Mon Sep 17 00:00:00 2001
-From: Mingli Yu <mingli.yu@windriver.com>
-Date: Thu, 2 Jun 2022 13:01:37 +0800
-Subject: [PATCH] proto.h: Fix build with gcc-12
-
-Fixes:
- In function 'dynprep',
- inlined from 'S_sortsv_flags_impl' at pp_sort.c:358:20,
- inlined from 'sortsv_amagic_i_ncmp' at pp_sort.c:572:5:
- pp_sort.c:1232:1: error: inlining failed in call to 'always_inline' 'S_amagic_i_ncmp': function not considered for inlining
- 1232 | S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b)
-
-Upstream-Status: Submitted [https://github.com/Perl/perl5/pull/19808]
-
-Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
----
- proto.h | 42 ++++++++++++++----------------------------
- 1 file changed, 14 insertions(+), 28 deletions(-)
-
-diff --git a/proto.h b/proto.h
-index faca6d1..3a76c04 100644
---- a/proto.h
-+++ b/proto.h
-@@ -5606,50 +5606,43 @@ STATIC SSize_t S_unpack_rec(pTHX_ struct tempsym* symptr, const char *s, const c
- #endif
- #if defined(PERL_IN_PP_SORT_C)
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp(pTHX_ SV *const str1, SV *const str2)
-- __attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp(pTHX_ SV *const str1, SV *const str2);
- #define PERL_ARGS_ASSERT_AMAGIC_CMP \
- assert(str1); assert(str2)
- #endif
-
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp_desc(pTHX_ SV *const str1, SV *const str2)
-- __attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp_desc(pTHX_ SV *const str1, SV *const str2);
- #define PERL_ARGS_ASSERT_AMAGIC_CMP_DESC \
- assert(str1); assert(str2)
- #endif
-
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32 S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b)
-- __attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32 S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b);
- #define PERL_ARGS_ASSERT_AMAGIC_I_NCMP \
- assert(a); assert(b)
- #endif
-
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32 S_amagic_i_ncmp_desc(pTHX_ SV *const a, SV *const b)
-- __attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32 S_amagic_i_ncmp_desc(pTHX_ SV *const a, SV *const b);
- #define PERL_ARGS_ASSERT_AMAGIC_I_NCMP_DESC \
- assert(a); assert(b)
- #endif
-
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32 S_amagic_ncmp(pTHX_ SV *const a, SV *const b)
-- __attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32 S_amagic_ncmp(pTHX_ SV *const a, SV *const b);
- #define PERL_ARGS_ASSERT_AMAGIC_NCMP \
- assert(a); assert(b)
- #endif
-
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32 S_amagic_ncmp_desc(pTHX_ SV *const a, SV *const b)
-- __attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32 S_amagic_ncmp_desc(pTHX_ SV *const a, SV *const b);
- #define PERL_ARGS_ASSERT_AMAGIC_NCMP_DESC \
- assert(a); assert(b)
- #endif
-
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32 S_cmp_desc(pTHX_ SV *const str1, SV *const str2)
-- __attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32 S_cmp_desc(pTHX_ SV *const str1, SV *const str2);
- #define PERL_ARGS_ASSERT_CMP_DESC \
- assert(str1); assert(str2)
- #endif
-@@ -5671,51 +5664,44 @@ PERL_STATIC_FORCE_INLINE void S_sortsv_flags_impl(pTHX_ SV** array, size_t num_e
- #endif
-
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32 S_sv_i_ncmp(pTHX_ SV *const a, SV *const b)
-- __attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32 S_sv_i_ncmp(pTHX_ SV *const a, SV *const b);
- #define PERL_ARGS_ASSERT_SV_I_NCMP \
- assert(a); assert(b)
- #endif
-
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32 S_sv_i_ncmp_desc(pTHX_ SV *const a, SV *const b)
-- __attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32 S_sv_i_ncmp_desc(pTHX_ SV *const a, SV *const b);
- #define PERL_ARGS_ASSERT_SV_I_NCMP_DESC \
- assert(a); assert(b)
- #endif
-
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32 S_sv_ncmp(pTHX_ SV *const a, SV *const b)
-- __attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32 S_sv_ncmp(pTHX_ SV *const a, SV *const b);
- #define PERL_ARGS_ASSERT_SV_NCMP \
- assert(a); assert(b)
- #endif
-
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32 S_sv_ncmp_desc(pTHX_ SV *const a, SV *const b)
-- __attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32 S_sv_ncmp_desc(pTHX_ SV *const a, SV *const b);
- #define PERL_ARGS_ASSERT_SV_NCMP_DESC \
- assert(a); assert(b)
- #endif
-
- # if defined(USE_LOCALE_COLLATE)
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp_locale(pTHX_ SV *const str1, SV *const str2)
-- __attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp_locale(pTHX_ SV *const str1, SV *const str2);
- #define PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE \
- assert(str1); assert(str2)
- #endif
-
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2)
-- __attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2);
- #define PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE_DESC \
- assert(str1); assert(str2)
- #endif
-
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32 S_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2)
-- __attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32 S_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2);
- #define PERL_ARGS_ASSERT_CMP_LOCALE_DESC \
- assert(str1); assert(str2)
- #endif
---
-2.25.1
-
diff --git a/meta/recipes-devtools/perl/files/0001-Fix-intermittent-failure-of-test-t-op-sigsystem.t.patch b/meta/recipes-devtools/perl/files/0001-Fix-intermittent-failure-of-test-t-op-sigsystem.t.patch
new file mode 100644
index 0000000000..86fd42cd3d
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/0001-Fix-intermittent-failure-of-test-t-op-sigsystem.t.patch
@@ -0,0 +1,77 @@
+From 75d974a58c461b3b5d35280e497810e46abae4ca Mon Sep 17 00:00:00 2001
+From: William Lyu <William.Lyu@windriver.com>
+Date: Wed, 4 Oct 2023 08:58:41 -0400
+Subject: [PATCH] Fix intermittent failure of test t/op/sigsystem.t
+
+[Perl issue #21546] -- https://github.com/Perl/perl5/issues/21546
+
+This fix addresses the intermittent failure of the test
+t/op/sigsystem.t by improving its robustness. Before the fix, this
+test waits a hard-coded amount of time in the parent process for the
+child process to exit, and the child process may not be able to exit
+soon enough. With this fix, the parent process in this test polls for
+whether the SIGCHLD handler reaped the child process for at most 25
+seconds.
+
+Upstream-Status: Backport [commit ID: 75d974a]
+
+Signed-off-by: William Lyu <William.Lyu@windriver.com>
+Signed-off-by: Randy MacLeod <randy.macleod@windriver.com>
+Reported-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
+
+Committer: William Lyu is now a Perl author.
+---
+ AUTHORS | 1 +
+ t/op/sigsystem.t | 17 ++++++++++++++---
+ 2 files changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/AUTHORS b/AUTHORS
+index 21948bfdc7..527dd992fd 100644
+--- a/AUTHORS
++++ b/AUTHORS
+@@ -1443,6 +1443,7 @@ Wayne Scott <wscott@ichips.intel.com>
+ Wayne Thompson <Wayne.Thompson@Ebay.sun.com>
+ Wilfredo Sánchez <wsanchez@mit.edu>
+ William J. Middleton <William.Middleton@oslo.mobil.telenor.no>
++William Lyu <William.Lyu@windriver.com>
+ William Mann <wmann@avici.com>
+ William Middleton <wmiddlet@adobe.com>
+ William R Ward <hermit@BayView.COM>
+diff --git a/t/op/sigsystem.t b/t/op/sigsystem.t
+index 25da854902..831feefb0f 100644
+--- a/t/op/sigsystem.t
++++ b/t/op/sigsystem.t
+@@ -37,7 +37,15 @@ SKIP: {
+ test_system('with reaper');
+
+ note("Waiting briefly for SIGCHLD...");
+- Time::HiRes::sleep(0.500);
++
++ # Wait at most 50 * 0.500 = 25.0 seconds for the child process to be
++ # reaped. If the child process exits and gets reaped early, this polling
++ # loop will exit early.
++
++ for (1..50) {
++ last if @pids;
++ Time::HiRes::sleep(0.500);
++ }
+
+ ok(@pids == 1, 'Reaped only one process');
+ ok($pids[0] == $pid, "Reaped the right process.") or diag(Dumper(\@pids));
+@@ -50,8 +58,11 @@ sub test_system {
+ my $got_zeroes = 0;
+
+ # This test is looking for a race between system()'s waitpid() and a
+- # signal handler. Looping a few times increases the chances of
+- # catching the error.
++ # signal handler. The system() call is expected to not interfere with the
++ # SIGCHLD signal handler. In particular, the wait() called within system()
++ # is expected to reap the child process forked by system() before the
++ # SIGCHLD signal handler is called.
++ # Looping a few times increases the chances of catching the error.
+
+ for (1..$expected_zeroes) {
+ $got_zeroes++ unless system(TRUE);
+--
+2.25.1
+
diff --git a/meta/recipes-devtools/perl/files/perl-configpm-switch.patch b/meta/recipes-devtools/perl/files/perl-configpm-switch.patch
index f80de88974..0be1d5a93c 100644
--- a/meta/recipes-devtools/perl/files/perl-configpm-switch.patch
+++ b/meta/recipes-devtools/perl/files/perl-configpm-switch.patch
@@ -1,4 +1,4 @@
-From 055d4c31f41611b7d7fb6b0e38b3818a053de38d Mon Sep 17 00:00:00 2001
+From c25d460a2f00e9af25087d40447fe1a81c89710c Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Sun, 27 May 2007 21:04:11 +0000
Subject: [PATCH] perl: 5.8.7 -> 5.8.8 (from OE)
@@ -20,38 +20,38 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/configpm b/configpm
-index 94a4778..99b20c9 100755
+index 07219d8..01a23fa 100755
--- a/configpm
+++ b/configpm
-@@ -687,7 +687,7 @@ sub FETCH {
- my($self, $key) = @_;
-
- # check for cached value (which may be undef so we use exists not defined)
-- return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key);
-+ return $self->fetch_string($key);
- }
-
+@@ -718,7 +718,7 @@ $config_txt .= uncomment <<'ENDOFEND';
+ # my($self, $key) = @_;
+ #
+ # # check for cached value (which may be undef so we use exists not defined)
+-# return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key);
++# return $self->fetch_string($key);
+ # }
+ #
ENDOFEND
-@@ -845,7 +845,21 @@ $config_txt .= sprintf <<'ENDOFTIE', $fast_config;
- sub DESTROY { }
-
- sub AUTOLOAD {
-- require 'Config_heavy.pl';
-+ my $cfgfile = 'Config_heavy.pl';
-+ if (defined $ENV{PERLCONFIGTARGET} and $ENV{PERLCONFIGTARGET} eq "yes")
-+ {
-+ $cfgfile = 'Config_heavy-target.pl';
-+ }
-+ if (defined $ENV{PERL_ARCHLIB})
-+ {
-+ push @INC, $ENV{PERL_ARCHLIB};
-+ require $cfgfile;
-+ pop @INC;
-+ }
-+ else
-+ {
-+ require $cfgfile;
-+ }
- goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
- die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
- }
+@@ -876,7 +876,21 @@ $config_txt .= sprintf uncomment <<'ENDOFTIE', $fast_config;
+ # sub DESTROY { }
+ #
+ # sub AUTOLOAD {
+-# require 'Config_heavy.pl';
++# my $cfgfile = 'Config_heavy.pl';
++# if (defined $ENV{PERLCONFIGTARGET} and $ENV{PERLCONFIGTARGET} eq "yes")
++# {
++# $cfgfile = 'Config_heavy-target.pl';
++# }
++# if (defined $ENV{PERL_ARCHLIB})
++# {
++# push @INC, $ENV{PERL_ARCHLIB};
++# require $cfgfile;
++# pop @INC;
++# }
++# else
++# {
++# require $cfgfile;
++# }
+ # goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
+ # die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
+ # }
diff --git a/meta/recipes-devtools/perl/files/run-ptest b/meta/recipes-devtools/perl/files/run-ptest
index dad4d42916..0547f818b2 100644
--- a/meta/recipes-devtools/perl/files/run-ptest
+++ b/meta/recipes-devtools/perl/files/run-ptest
@@ -1,2 +1,2 @@
#!/bin/sh
-cd t && PERL_BUILD_PACKAGING=1 ./TEST | sed -u -e 's|\(.*\) .* ok$|PASS: \1|' -e 's|\(.*\) .* skipped|SKIP: \1|' -e 's|\(.*\) \.\(.*\)|FAIL: \1|'
+{ cd t && PERL_BUILD_PACKAGING=1 ./TEST || echo "FAIL: perl" ; } | sed -u -e 's|\(.*\) .* ok$|PASS: \1|' -e 's|\(.*\) .* skipped|SKIP: \1|' -e 's|\(.*\) \.\(.*\)|FAIL: \1|'