summaryrefslogtreecommitdiff
path: root/usr.bin/libtool
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2012-11-09 10:51:48 +0000
committerMarc Espie <espie@cvs.openbsd.org>2012-11-09 10:51:48 +0000
commitff1f0b7a67c7c04921cfbf3b9b99994a564fdaef (patch)
tree8dfc652a2761781cac2765c1b5abec5c0640cc65 /usr.bin/libtool
parenta10f0fb87cf2a387fb9baadde502dbd3b14ee038 (diff)
fix get_symbollist: output completely empty file if no symbol.
output slightly more debug info
Diffstat (limited to 'usr.bin/libtool')
-rw-r--r--usr.bin/libtool/LT/Archive.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/libtool/LT/Archive.pm b/usr.bin/libtool/LT/Archive.pm
index 64c8853235c..b8af6dbeacb 100644
--- a/usr.bin/libtool/LT/Archive.pm
+++ b/usr.bin/libtool/LT/Archive.pm
@@ -1,4 +1,4 @@
-# $OpenBSD: Archive.pm,v 1.4 2012/07/10 09:51:32 espie Exp $
+# $OpenBSD: Archive.pm,v 1.5 2012/11/09 10:51:47 espie Exp $
# Copyright (c) 2007-2010 Steven Mestdagh <steven@openbsd.org>
# Copyright (c) 2012 Marc Espie <espie@openbsd.org>
@@ -56,6 +56,7 @@ sub get_symbollist
}
tsay {"generating symbol list in file: $filepath"};
+ tsay {"object list is @$objlist" };
my $symbols = [];
open(my $sh, '-|', 'nm', '--', @$objlist) or
die "Error running nm on object list @$objlist\n";
@@ -75,7 +76,7 @@ sub get_symbollist
$symbols = reverse_zap_duplicates_ref($symbols);
@$symbols = sort @$symbols;
open(my $fh, '>', $filepath) or die "Cannot open $filepath\n";
- print $fh join("\n", @$symbols), "\n";
+ print $fh map { "$_\n" } @$symbols;
}
1;