summaryrefslogtreecommitdiff
path: root/tools
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 /tools
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 'tools')
-rw-r--r--tools/analyze/Makefile2
-rw-r--r--tools/llvm-config/Makefile2
-rw-r--r--tools/llvm-config/llvm-config.in.in3
3 files changed, 5 insertions, 2 deletions
diff --git a/tools/analyze/Makefile b/tools/analyze/Makefile
index e3885a9358..e60b58237e 100644
--- a/tools/analyze/Makefile
+++ b/tools/analyze/Makefile
@@ -8,6 +8,8 @@
##===----------------------------------------------------------------------===##
LEVEL = ../..
TOOLNAME = analyze
+#TOOLLINKOPTS = $(LINKALL)
+#TOOLLINKOPTSB = $(NOLINKALL)
USEDLIBS = LLVMAsmParser.a LLVMBCReader.a LLVMAnalysis.a LLVMipa.a \
LLVMDataStructure \
LLVMScalarOpts.a LLVMTransforms.a LLVMTarget.a LLVMScalarOpts.a \
diff --git a/tools/llvm-config/Makefile b/tools/llvm-config/Makefile
index 2f8998eb8b..12cbe0f3ac 100644
--- a/tools/llvm-config/Makefile
+++ b/tools/llvm-config/Makefile
@@ -33,7 +33,7 @@ GenLibDeps = $(PROJ_SRC_ROOT)/utils/GenLibDeps.pl
$(LibDeps): $(GenLibDeps) $(LibDir) $(wildcard $(LibDir)/*.a $(LibDir)/*.o)
$(Echo) "Regenerating LibDeps.txt"
- $(Verb) $(GenLibDeps) -flat $(LibDir) | sort > $(LibDeps)
+ $(Verb) $(GenLibDeps) -flat $(LibDir) $(NM_PATH) | sort > $(LibDeps)
# Find all the cyclic dependencies between various LLVM libraries, so we
# don't have to process them at runtime.
diff --git a/tools/llvm-config/llvm-config.in.in b/tools/llvm-config/llvm-config.in.in
index e83024e2e7..0b30f9081a 100644
--- a/tools/llvm-config/llvm-config.in.in
+++ b/tools/llvm-config/llvm-config.in.in
@@ -47,6 +47,7 @@ my @TARGETS_BUILT = map { lc($_) } qw{@TARGETS_TO_BUILD@};
#---- begin Makefile values ----
my $CXXFLAGS = q{@LLVM_CXXFLAGS@};
my $LDFLAGS = q{@LLVM_LDFLAGS@};
+my $SYSTEM_LIBS = q{@LIBS@};
my $LLVM_BUILDMODE = q{@LLVM_BUILDMODE@};
#---- end Makefile values ----
@@ -109,7 +110,7 @@ foreach my $arg (@ARGV) {
} elsif ($arg eq "--cxxflags") {
$has_opt = 1; print "-I$INCLUDEDIR $CXXFLAGS\n";
} elsif ($arg eq "--ldflags") {
- $has_opt = 1; print "-L$LIBDIR $LDFLAGS\n";
+ $has_opt = 1; print "-L$LIBDIR $LDFLAGS $SYSTEM_LIBS\n";
} elsif ($arg eq "--libs") {
$has_opt = 1; $want_libs = 1;
} elsif ($arg eq "--libnames") {