summaryrefslogtreecommitdiffstats
path: root/llvm/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
commiteca6f7320ee70a0cee0db83f055ce1832d449127 (patch)
tree3bc2ad34c4bbd0d588f08c9de067f99791818fbc /llvm/utils/GenLibDeps.pl
parent390dd7eb7d51819dbe2a832f7dabab40ceb930ff (diff)
downloadbcm5719-llvm-eca6f7320ee70a0cee0db83f055ce1832d449127.tar.gz
bcm5719-llvm-eca6f7320ee70a0cee0db83f055ce1832d449127.zip
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! llvm-svn: 29368
Diffstat (limited to 'llvm/utils/GenLibDeps.pl')
-rwxr-xr-xllvm/utils/GenLibDeps.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/utils/GenLibDeps.pl b/llvm/utils/GenLibDeps.pl
index b14e5e07d81..be7af22df43 100755
--- a/llvm/utils/GenLibDeps.pl
+++ b/llvm/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)
OpenPOWER on IntegriCloud