Skip to content

Commit d74b131

Browse files
committed
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
1 parent 676d803 commit d74b131

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

t/porting/libperl.t

+5-3
Original file line numberDiff line numberDiff line change
@@ -581,9 +581,11 @@ if (defined $nm_err_tmp) {
581581
while (<$nm_err_fh>) {
582582
# OS X has weird error where nm warns about
583583
# "no name list" but then outputs fine.
584-
if (/nm: no name list/ && $^O eq 'darwin') {
585-
print "# $^O ignoring $nm output: $_";
586-
next;
584+
if ( $^O eq 'darwin' ) {
585+
if (/nm: no name list/ || /^no symbols$/ ) {
586+
print "# $^O ignoring $nm output: $_";
587+
next;
588+
}
587589
}
588590
warn "$0: Unexpected $nm error: $_";
589591
$error++;

0 commit comments

Comments
 (0)