summaryrefslogtreecommitdiff
path: root/tools/gccld
diff options
context:
space:
mode:
authorJohn Criswell <criswell@uiuc.edu>2004-01-26 23:51:10 +0000
committerJohn Criswell <criswell@uiuc.edu>2004-01-26 23:51:10 +0000
commit6f5592ae2c2289284a765d3205e4a0a65f328fce (patch)
tree558d1dc744a460c4266c3e4d982c5226ce959a57 /tools/gccld
parentf9c78655bec3036e2cef8946e261246cbe17f4c9 (diff)
downloadllvm-6f5592ae2c2289284a765d3205e4a0a65f328fce.tar.gz
llvm-6f5592ae2c2289284a765d3205e4a0a65f328fce.tar.bz2
llvm-6f5592ae2c2289284a765d3205e4a0a65f328fce.tar.xz
Fixed PR#197. The libcrtend library is removed from the library linking list
when creating native executables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10979 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gccld')
-rw-r--r--tools/gccld/GenerateCode.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/gccld/GenerateCode.cpp b/tools/gccld/GenerateCode.cpp
index d41a1f15f2..d717cd5616 100644
--- a/tools/gccld/GenerateCode.cpp
+++ b/tools/gccld/GenerateCode.cpp
@@ -239,8 +239,10 @@ GenerateNative(const std::string &OutputFilename,
// Add in the libraries to link.
std::vector<std::string> Libs(Libraries);
for (unsigned index = 0; index < Libs.size(); index++) {
- Libs[index] = "-l" + Libs[index];
- cmd.push_back(Libs[index].c_str());
+ if (Libs[index] != "crtend") {
+ Libs[index] = "-l" + Libs[index];
+ cmd.push_back(Libs[index].c_str());
+ }
}
cmd.push_back(NULL);