summaryrefslogtreecommitdiff
path: root/utils/GenLibDeps.pl
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-07-27 23:00:30 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-07-27 23:00:30 +0000
commit1bc686433bd5dea7ef4b8b5d97cd9461f041b56f (patch)
tree46fd449741fbb14fa90fc11b2fd629d3034e65dc /utils/GenLibDeps.pl
parentb3c334674ddf4671c22d750a612e91e481a33ac8 (diff)
downloadllvm-1bc686433bd5dea7ef4b8b5d97cd9461f041b56f.tar.gz
llvm-1bc686433bd5dea7ef4b8b5d97cd9461f041b56f.tar.bz2
llvm-1bc686433bd5dea7ef4b8b5d97cd9461f041b56f.tar.xz
Changes to support cross-compiling LLVM. The GenLibDeps.pl script needs to
have a compile-host version of "nm", not build-host. In order to effect this we must use autoconf to determine the correct "nm" to use and propagate that through the makefiles, through llvm-config and finally to GenLibDeps.pl as an optional argument. Patch contributed by Anton Korobeynikov. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29368 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/GenLibDeps.pl')
-rwxr-xr-xutils/GenLibDeps.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/utils/GenLibDeps.pl b/utils/GenLibDeps.pl
index b14e5e07d8..be7af22df4 100755
--- a/utils/GenLibDeps.pl
+++ b/utils/GenLibDeps.pl
@@ -6,7 +6,7 @@
# libraries. The output of this script should periodically replace
# the similar content in the UsingLibraries.html document.
#
-# Syntax: GenLibDeps.pl [-flat] <directory_with_libraries_in_it>
+# Syntax: GenLibDeps.pl [-flat] <directory_with_libraries_in_it> [path_to_nm_binary]
#
# Parse arguments...
@@ -24,6 +24,7 @@ while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) {
# Give first option a name.
my $Directory = $ARGV[0];
+my $nmPath = $ARGV[1];
# Find the "dot" program
my $DotPath="";
@@ -32,8 +33,10 @@ if (!$FLAT) {
die "Can't find 'dot'" if (! -x "$DotPath");
}
-chomp(my $nmPath=`which nm`);
-die "Can't find 'nm'" if (! -x "$nmPath");
+if ($nmPath eq "") {
+ chomp($nmPath=`which nm`);
+ die "Can't find 'nm'" if (! -x "$nmPath");
+}
# Open the directory and read its contents, sorting by name and differentiating
# by whether its a library (.a) or an object file (.o)