diff options
author | Chris Lattner <sabre@nondot.org> | 2005-11-03 07:17:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-11-03 07:17:51 +0000 |
commit | 2b11995547cfcd28b73407c02e9918b203dea996 (patch) | |
tree | 0bb1771e45765cd62cf1b67ff508aa4b35948f63 /tools/gccld | |
parent | 465c737467dd70221a48fc7b9631f39283574d4e (diff) | |
download | external_llvm-2b11995547cfcd28b73407c02e9918b203dea996.zip external_llvm-2b11995547cfcd28b73407c02e9918b203dea996.tar.gz external_llvm-2b11995547cfcd28b73407c02e9918b203dea996.tar.bz2 |
add a hack that fixes:
llvm-gcc main.c -Wl,-native -o a.out -g
This is important because it used by many configure scripts.
John, please pull this onto the 1.6 branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24163 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gccld')
-rw-r--r-- | tools/gccld/GenerateCode.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/gccld/GenerateCode.cpp b/tools/gccld/GenerateCode.cpp index 0d94549..3b5d2b2 100644 --- a/tools/gccld/GenerateCode.cpp +++ b/tools/gccld/GenerateCode.cpp @@ -423,7 +423,10 @@ int llvm::GenerateNative(const std::string &OutputFilename, // Add in the libraries to link. for (unsigned index = 0; index < Libraries.size(); index++) - if (Libraries[index] != "crtend") { + // HACK: If this is libg, discard it. This gets added by the compiler + // driver when doing: 'llvm-gcc main.c -Wl,-native -o a.out -g'. Note that + // this should really be fixed by changing the llvm-gcc compiler driver. + if (Libraries[index] != "crtend" && Libraries[index] != "g") { std::string Tmp = "-l"+Libraries[index]; StringsToDelete.push_back(strdup(Tmp.c_str())); args.push_back(StringsToDelete.back()); |