summaryrefslogtreecommitdiffstats
path: root/llvm/tools/gccld/gccld.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-11-03 17:27:17 +0000
committerChris Lattner <sabre@nondot.org>2003-11-03 17:27:17 +0000
commitcbf2aeb6845c694c9d3dc8d603ee4b809b0eb6e5 (patch)
tree642ba47791c70b0ac305e635f7708278348ae0e1 /llvm/tools/gccld/gccld.cpp
parent907720dfe19b4c1c48203353075faef49bfafbf3 (diff)
downloadbcm5719-llvm-cbf2aeb6845c694c9d3dc8d603ee4b809b0eb6e5.tar.gz
bcm5719-llvm-cbf2aeb6845c694c9d3dc8d603ee4b809b0eb6e5.zip
If linking a library, do not link other libraries, like libc, into it!
This fixes lots of annoying warnings and error messages llvm-svn: 9677
Diffstat (limited to 'llvm/tools/gccld/gccld.cpp')
-rw-r--r--llvm/tools/gccld/gccld.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/tools/gccld/gccld.cpp b/llvm/tools/gccld/gccld.cpp
index a53383cfb1d..1adf08e4c9e 100644
--- a/llvm/tools/gccld/gccld.cpp
+++ b/llvm/tools/gccld/gccld.cpp
@@ -234,7 +234,10 @@ int main(int argc, char **argv, char **envp) {
// Link in all of the files
if (LinkFiles(argv[0], Composite.get(), InputFilenames, Verbose))
return 1; // Error already printed
- LinkLibraries(argv[0], Composite.get(), Libraries, LibPaths, Verbose, Native);
+
+ if (!LinkAsLibrary)
+ LinkLibraries(argv[0], Composite.get(), Libraries, LibPaths,
+ Verbose, Native);
// Link in all of the libraries next...
OpenPOWER on IntegriCloud