[llvm-commits] [release_16] CVS: llvm/tools/gccld/GenerateCode.cpp

John Criswell criswell at cs.uiuc.edu
Thu Nov 3 07:42:45 PST 2005



Changes in directory llvm/tools/gccld:

GenerateCode.cpp updated: 1.54 -> 1.54.4.1
---
Log message:

Merge in hack from Chris that discards libg.


---
Diffs of the changes:  (+4 -1)

 GenerateCode.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)


Index: llvm/tools/gccld/GenerateCode.cpp
diff -u llvm/tools/gccld/GenerateCode.cpp:1.54 llvm/tools/gccld/GenerateCode.cpp:1.54.4.1
--- llvm/tools/gccld/GenerateCode.cpp:1.54	Tue Oct 18 01:29:43 2005
+++ llvm/tools/gccld/GenerateCode.cpp	Thu Nov  3 09:42:27 2005
@@ -423,7 +423,10 @@
 
   // 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());






More information about the llvm-commits mailing list