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 | b3140c3e8a5b37491b44f1fc0a53284a9f6e7ceb (patch) | |
| tree | c7cd89f706e42c65eded26436acfc8e7f17ba214 /llvm/tools | |
| parent | 64209fd14b0e5e143e29cd90e57b80270711d666 (diff) | |
| download | bcm5719-llvm-b3140c3e8a5b37491b44f1fc0a53284a9f6e7ceb.tar.gz bcm5719-llvm-b3140c3e8a5b37491b44f1fc0a53284a9f6e7ceb.zip | |
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.
llvm-svn: 24163
Diffstat (limited to 'llvm/tools')
| -rw-r--r-- | llvm/tools/gccld/GenerateCode.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/tools/gccld/GenerateCode.cpp b/llvm/tools/gccld/GenerateCode.cpp index 0d945493704..3b5d2b2b050 100644 --- a/llvm/tools/gccld/GenerateCode.cpp +++ b/llvm/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()); |

