From 36eebb51f256e79f35025b31acaa339f8f1252ff Mon Sep 17 00:00:00 2001 From: John Criswell Date: Mon, 26 Jan 2004 23:51:10 +0000 Subject: [PATCH] Fixed PR#197. The libcrtend library is removed from the library linking list when creating native executables. llvm-svn: 10979 --- llvm/tools/gccld/GenerateCode.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/llvm/tools/gccld/GenerateCode.cpp b/llvm/tools/gccld/GenerateCode.cpp index d41a1f15f248..d717cd5616a9 100644 --- a/llvm/tools/gccld/GenerateCode.cpp +++ b/llvm/tools/gccld/GenerateCode.cpp @@ -239,8 +239,10 @@ GenerateNative(const std::string &OutputFilename, // Add in the libraries to link. std::vector 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);