Fixed PR#197. The libcrtend library is removed from the library linking list
authorJohn Criswell <criswell@uiuc.edu>
Mon, 26 Jan 2004 23:51:10 +0000 (23:51 +0000)
committerJohn Criswell <criswell@uiuc.edu>
Mon, 26 Jan 2004 23:51:10 +0000 (23:51 +0000)
when creating native executables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10979 91177308-0d34-0410-b5e6-96231b3b80d8

tools/gccld/GenerateCode.cpp

index d41a1f15f2484bfefb9b5a0cf3df0dc462c87cd1..d717cd5616a963fbc10b858403e1a4cb017afdeb 100644 (file)
@@ -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);