From 5093e0eb37ed945960a3b3184f234d51a3cf226a Mon Sep 17 00:00:00 2001 From: Nicolas R Date: Fri, 11 Oct 2019 15:38:53 -0600 Subject: Fix libperl.t 'no symbols' warning on darwin darwin can compile perlapi.o without any symbols. libperl.t is running 'mm -m ./libperl.a' and is is viewing the 'no symbols' stderr output from perlapi.o then fail. 'nm -g perlapi.o' We can either add a dummy symbol to libperl via regen/embed.pl or simply ignore that error in a generic way, or avoid compiling that file when not needed. Notice the error with nm 11.0.0 Apple LLVM version 11.0.0 (clang-1100.0.33.8) The older version of nm does not raise a warning for empty .o files. Steps to reproduce: echo '' > test.c; gcc -o test.o -c test.c; nm -g test.o (cherry picked from commit d74b131b0ba952f0c894f2462279e1dc12f94d82) --- t/porting/libperl.t | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/t/porting/libperl.t b/t/porting/libperl.t index f5fb53d2c3..72b4220c6a 100644 --- a/t/porting/libperl.t +++ b/t/porting/libperl.t @@ -581,9 +581,11 @@ 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. - if (/nm: no name list/ && $^O eq 'darwin') { - print "# $^O ignoring $nm output: $_"; - next; + if ( $^O eq 'darwin' ) { + if (/nm: no name list/ || /^no symbols$/ ) { + print "# $^O ignoring $nm output: $_"; + next; + } } warn "$0: Unexpected $nm error: $_"; $error++; -- cgit v1.2.1