aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-06-12 14:23:42 +0000
committerDuncan Sands <baldrick@free.fr>2009-06-12 14:23:42 +0000
commit7e0842fb21791d2600ac763cc41931003ae4d878 (patch)
tree97263b25e081756fe689e847d4e4b53e1511b4a5
parente91208c9631c98abbdce19ca7b1f51d9241faa18 (diff)
Tweak GenLibDeps.pl so it works on solaris.
Patch by Edward O'Callaghan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73228 91177308-0d34-0410-b5e6-96231b3b80d8
-rwxr-xr-xutils/GenLibDeps.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/GenLibDeps.pl b/utils/GenLibDeps.pl
index 73f3e71491..6d0b13ee43 100755
--- a/utils/GenLibDeps.pl
+++ b/utils/GenLibDeps.pl
@@ -38,6 +38,10 @@ if (!$FLAT) {
die "Can't find 'dot'" if (! -x "$DotPath");
}
+if (defined($ENV{NM})) {
+ chomp($nmPath=$ENV{NM});
+}
+
if (!defined($nmPath) || $nmPath eq "") {
chomp($nmPath=`which nm`);
die "Can't find 'nm'" if (! -x "$nmPath");
@@ -96,7 +100,7 @@ sub gen_one_entry {
print " <dt><b>$lib</b</dt><dd><ul>\n";
}
open UNDEFS,
- "$nmPath -g -u $Directory/$lib | sed -e 's/^[ 0]* U //' | sort | uniq |";
+ "$nmPath -u $Directory/$lib | sed -e 's/^[ 0]* U //' | sort | uniq |";
my %DepLibs;
while (<UNDEFS>) {
chomp;
@@ -116,7 +120,7 @@ sub gen_one_entry {
close UNDEFS or die "nm failed";
unless(keys %DepLibs) {
# above failed
- open UNDEFS, "$nmPath -g -u $Directory/$lib |";
+ open UNDEFS, "$nmPath -u $Directory/$lib |";
while (<UNDEFS>) {
# to bypass non-working sed
if (' ' eq substr($_,0,2) and index($_,'U ')) {