public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-devel/clang/files: clang-2.7-darwin-prefix.patch
@ 2010-09-08 17:34 Fabian Groffen (grobian)
  0 siblings, 0 replies; 2+ messages in thread
From: Fabian Groffen (grobian) @ 2010-09-08 17:34 UTC (permalink / raw
  To: gentoo-commits

grobian     10/09/08 17:34:54

  Added:                clang-2.7-darwin-prefix.patch
  Log:
  Fix configurations for (newer) Darwin configurations, thanks Heiko Przybyl
  
  (Portage version: 2.2.01.15553-prefix/cvs/Darwin powerpc)

Revision  Changes    Path
1.1                  sys-devel/clang/files/clang-2.7-darwin-prefix.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/clang/files/clang-2.7-darwin-prefix.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/clang/files/clang-2.7-darwin-prefix.patch?rev=1.1&content-type=text/plain

Index: clang-2.7-darwin-prefix.patch
===================================================================
This code looks as if it is written by Apple, lots of assumptions that
only hold for them and their scenario.

--- llvm-2.7/tools/clang/lib/Driver/ToolChains.cpp
+++ llvm-2.7/tools/clang/lib/Driver/ToolChains.cpp
@@ -112,7 +112,7 @@ DarwinGCC::DarwinGCC(const HostInfo &Hos
   GCCVersion[2] = _GCCVersion[2];
 
   // Set up the tool chain paths to match gcc.
-  ToolChainDir = "i686-apple-darwin";
+  ToolChainDir = "@GENTOO_PORTAGE_CHOST@";
   ToolChainDir += llvm::utostr(DarwinVersion[0]);
   ToolChainDir += "/";
   ToolChainDir += llvm::utostr(GCCVersion[0]);
@@ -122,9 +122,9 @@ DarwinGCC::DarwinGCC(const HostInfo &Hos
   ToolChainDir += llvm::utostr(GCCVersion[2]);
 
   // Try the next major version if that tool chain dir is invalid.
-  std::string Tmp = "/usr/lib/gcc/" + ToolChainDir;
+  std::string Tmp = "@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/" + ToolChainDir;
   if (!llvm::sys::Path(Tmp).exists()) {
-    std::string Next = "i686-apple-darwin";
+    std::string Next = "@GENTOO_PORTAGE_CHOST@";
     Next += llvm::utostr(DarwinVersion[0] + 1);
     Next += "/";
     Next += llvm::utostr(GCCVersion[0]);
@@ -136,7 +136,7 @@ DarwinGCC::DarwinGCC(const HostInfo &Hos
     // Use that if it exists, otherwise hope the user isn't linking.
     //
     // FIXME: Drop dependency on gcc's tool chain.
-    Tmp = "/usr/lib/gcc/" + Next;
+    Tmp = "@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/" + Next;
     if (llvm::sys::Path(Tmp).exists())
       ToolChainDir = Next;
   }
@@ -219,19 +219,19 @@ void DarwinGCC::AddLinkSearchPathArgs(co
                                       ArgStringList &CmdArgs) const {
   // FIXME: Derive these correctly.
   if (getArchName() == "x86_64") {
-    CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc/" + ToolChainDir +
+    CmdArgs.push_back(Args.MakeArgString("-L@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/" + ToolChainDir +
                                          "/x86_64"));
     // Intentionally duplicated for (temporary) gcc bug compatibility.
-    CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc/" + ToolChainDir +
+    CmdArgs.push_back(Args.MakeArgString("-L@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/" + ToolChainDir +
                                          "/x86_64"));
   }
-  CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/" + ToolChainDir));
-  CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc/" + ToolChainDir));
+  CmdArgs.push_back(Args.MakeArgString("-L@GENTOO_PORTAGE_EPREFIX@/usr/lib/" + ToolChainDir));
+  CmdArgs.push_back(Args.MakeArgString("-L@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/" + ToolChainDir));
   // Intentionally duplicated for (temporary) gcc bug compatibility.
-  CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc/" + ToolChainDir));
-  CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc/" + ToolChainDir +
+  CmdArgs.push_back(Args.MakeArgString("-L@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/" + ToolChainDir));
+  CmdArgs.push_back(Args.MakeArgString("-L@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/" + ToolChainDir +
                                        "/../../../" + ToolChainDir));
-  CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc/" + ToolChainDir +
+  CmdArgs.push_back(Args.MakeArgString("-L@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/" + ToolChainDir +
                                        "/../../.."));
 }






^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gentoo-commits] gentoo-x86 commit in sys-devel/clang/files: clang-2.7-darwin-prefix.patch
@ 2011-03-28 13:51 Bernard Cafarelli (voyageur)
  0 siblings, 0 replies; 2+ messages in thread
From: Bernard Cafarelli (voyageur) @ 2011-03-28 13:51 UTC (permalink / raw
  To: gentoo-commits

voyageur    11/03/28 13:51:22

  Removed:              clang-2.7-darwin-prefix.patch
  Log:
  Drop 2.7 versions
  
  (Portage version: 2.2.0_alpha28/cvs/Linux x86_64)



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-28 13:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28 13:51 [gentoo-commits] gentoo-x86 commit in sys-devel/clang/files: clang-2.7-darwin-prefix.patch Bernard Cafarelli (voyageur)
  -- strict thread matches above, loose matches on Subject: below --
2010-09-08 17:34 Fabian Groffen (grobian)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox