From 1bc686433bd5dea7ef4b8b5d97cd9461f041b56f Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Thu, 27 Jul 2006 23:00:30 +0000 Subject: 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 --- utils/GenLibDeps.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'utils/GenLibDeps.pl') 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] +# Syntax: GenLibDeps.pl [-flat] [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) -- cgit v1.2.3