]> granicus.if.org Git - clang/commitdiff
Fix for PR4887, Credit to Jonathan Gray.
authorEdward O'Callaghan <eocallaghan@auroraux.org>
Wed, 28 Oct 2009 15:13:08 +0000 (15:13 +0000)
committerEdward O'Callaghan <eocallaghan@auroraux.org>
Wed, 28 Oct 2009 15:13:08 +0000 (15:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85392 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp

index 0e7474c7f62b38afec0834d0b1c8f73c3545cced..357dcb3d90115011427d1b0437232683786a531d 100644 (file)
@@ -2345,9 +2345,12 @@ void openbsd::Link::ConstructJob(Compilation &C, const JobAction &JA,
     }
   }
 
+  std::string Triple = getToolChain().getTripleString();
+  if (Triple.substr(0, 6) == "x86_64")
+       Triple.replace(0, 6, "amd64");
   CmdArgs.push_back(MakeFormattedString(Args,
                            llvm::format("-L/usr/lib/gcc-lib/%s/3.3.5",
-                                    getToolChain().getTripleString().c_str())));
+                                    Triple.c_str())));
 
   Args.AddAllArgs(CmdArgs, options::OPT_L);
   Args.AddAllArgs(CmdArgs, options::OPT_T_Group);