diff -ruN perl-5.30.2-orig/t/porting/libperl.t perl-5.30.2/t/porting/libperl.t --- perl-5.30.2-orig/t/porting/libperl.t 2020-03-14 07:11:40.000000000 -0500 +++ perl-5.30.2/t/porting/libperl.t 2021-05-11 06:40:12.000000000 -0500 @@ -444,7 +444,7 @@ $symbols{data}{common} = $symbols{data}{bss}; } - ok($symbols{data}{common}{PL_hash_seed}{'globals.o'}, "has PL_hash_seed"); + ok(!$symbols{data}{common}{PL_hash_seed}{'globals.o'}, "has no PL_hash_seed"); ok($symbols{data}{data}{PL_ppaddr}{'globals.o'}, "has PL_ppaddr"); # None of the GLOBAL_STRUCT* business here. From 4fc148a8261471331757070d72ad8dd513ad48da Mon Sep 17 00:00:00 2001 From: David Marshall Date: Fri, 25 Jun 2021 14:16:06 -0700 Subject: [PATCH] fix new libperl.t 'no symbols' warning on darwin A change in October 2019 added handling for the case that 'nm' might emit the error message 'no symbols' (apparently erroneously. Apple seems to have included a fix to upstream LLVM to change the message to be a file reference followed by ': no symbols'. For libperl.t, the message is typically '../libperl.a:perlapi.o: no symbols'. This change handles both the old and current behavior. --- t/porting/libperl.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/porting/libperl.t b/t/porting/libperl.t index c2d59f20ac36..406f5df323a2 100644 --- a/t/porting/libperl.t +++ b/t/porting/libperl.t @@ -472,8 +472,12 @@ if (defined $nm_err_tmp) { while (<$nm_err_fh>) { # OS X has weird error where nm warns about # "no name list" but then outputs fine. + # llvm-nm may also complain about 'no symbols'. In some + # versions this is exactly the string "no symbols\n" but in later + # versions becomes a string followed by ": no symbols\n". For this + # test it is typically "../libperl.a:perlapi.o: no symbols\n" if ( $^O eq 'darwin' ) { - if (/nm: no name list/ || /^no symbols$/ ) { + if (/nm: no name list/ || /^(.*: )?no symbols$/ ) { print "# $^O ignoring $nm output: $_"; next; }