summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas R <atoomic@cpan.org>2019-10-11 15:38:53 -0600
committerNicolas R <atoomic@cpan.org>2019-10-11 15:59:56 -0600
commitd74b131b0ba952f0c894f2462279e1dc12f94d82 (patch)
tree144cd1e09832dea25d61c52dd006611915bc404e
parent676d803378b16a66e7f31c55aaf8581338b039fa (diff)
downloadperl-d74b131b0ba952f0c894f2462279e1dc12f94d82.tar.gz
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
-rw-r--r--t/porting/libperl.t8
1 files 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++;