summaryrefslogtreecommitdiff
path: root/tools
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
commitfd35c6417d5d3cb7323702e5cd6fadd32f014a4f (patch)
tree8b4f324bcf4a7849390f154379e8a3006173501f /tools
parent1edcb0939c1e5dcba138c1fa48ab84e93e7b5c13 (diff)
downloadllvm-fd35c6417d5d3cb7323702e5cd6fadd32f014a4f.tar.gz
llvm-fd35c6417d5d3cb7323702e5cd6fadd32f014a4f.tar.bz2
llvm-fd35c6417d5d3cb7323702e5cd6fadd32f014a4f.tar.xz
If linking a library, do not link other libraries, like libc, into it!
This fixes lots of annoying warnings and error messages git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9677 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/gccld/gccld.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/gccld/gccld.cpp b/tools/gccld/gccld.cpp
index a53383cfb1..1adf08e4c9 100644
--- a/tools/gccld/gccld.cpp
+++ b/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...