aboutsummaryrefslogtreecommitdiff
path: root/tools/gccld/GenerateCode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gccld/GenerateCode.cpp')
-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);