[cfe-commits] r83443 - in /cfe/trunk/lib/Driver: HostInfo.cpp Makefile ToolChains.cpp ToolChains.h

Mike Stump mrs at apple.com
Tue Oct 6 18:11:54 PDT 2009


Author: mrs
Date: Tue Oct  6 20:11:54 2009
New Revision: 83443

URL: http://llvm.org/viewvc/llvm-project?rev=83443&view=rev
Log:
Fixup pathnames.

Modified:
    cfe/trunk/lib/Driver/HostInfo.cpp
    cfe/trunk/lib/Driver/Makefile
    cfe/trunk/lib/Driver/ToolChains.cpp
    cfe/trunk/lib/Driver/ToolChains.h

Modified: cfe/trunk/lib/Driver/HostInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/HostInfo.cpp?rev=83443&r1=83442&r2=83443&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/HostInfo.cpp (original)
+++ cfe/trunk/lib/Driver/HostInfo.cpp Tue Oct  6 20:11:54 2009
@@ -42,7 +42,7 @@
   unsigned DarwinVersion[3];
 
   /// GCC version to use on this host.
-  unsigned GCCVersion[3];
+  unsigned GCCVersion[4];
 
   /// Cache of tool chains we have created.
   mutable llvm::DenseMap<unsigned, ToolChain*> ToolChains;
@@ -84,6 +84,12 @@
   GCCVersion[0] = 4;
   GCCVersion[1] = 2;
   GCCVersion[2] = 1;
+  // And we need to select the OS gcc was configured for, darwin10
+#ifdef OS_MAJOR
+  GCCVersion[3] = OS_MAJOR;
+#else
+  GCCVersion[3] = 10;
+#endif
 }
 
 DarwinHostInfo::~DarwinHostInfo() {

Modified: cfe/trunk/lib/Driver/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Makefile?rev=83443&r1=83442&r2=83443&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Makefile (original)
+++ cfe/trunk/lib/Driver/Makefile Tue Oct  6 20:11:54 2009
@@ -11,10 +11,10 @@
 LIBRARYNAME := clangDriver
 BUILD_ARCHIVE = 1
 CXXFLAGS = -fno-rtti
-
+OS_MAJOR := -DOS_MAJOR=$(shell uname -r | sed 's/\..*//')
 # Don't install Clang libraries
 NO_INSTALL = 1
 
-CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
+CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include $(OS_MAJOR)
 
 include $(LEVEL)/Makefile.common

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=83443&r1=83442&r2=83443&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Tue Oct  6 20:11:54 2009
@@ -46,17 +46,18 @@
 
 DarwinGCC::DarwinGCC(const HostInfo &Host, const llvm::Triple& Triple,
                      const unsigned (&DarwinVersion)[3],
-                     const unsigned (&_GCCVersion)[3], bool IsIPhoneOS)
+                     const unsigned (&_GCCVersion)[4], bool IsIPhoneOS)
   : Darwin(Host, Triple, DarwinVersion, IsIPhoneOS)
 {
   GCCVersion[0] = _GCCVersion[0];
   GCCVersion[1] = _GCCVersion[1];
   GCCVersion[2] = _GCCVersion[2];
+  GCCVersion[3] = _GCCVersion[3];
 
   // Set up the tool chain paths to match gcc.
 
   ToolChainDir = "i686-apple-darwin";
-  ToolChainDir += llvm::utostr(DarwinVersion[0]);
+  ToolChainDir += llvm::utostr(GCCVersion[3]);
   ToolChainDir += "/";
   ToolChainDir += llvm::utostr(GCCVersion[0]);
   ToolChainDir += '.';

Modified: cfe/trunk/lib/Driver/ToolChains.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.h?rev=83443&r1=83442&r2=83443&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.h (original)
+++ cfe/trunk/lib/Driver/ToolChains.h Tue Oct  6 20:11:54 2009
@@ -165,14 +165,14 @@
 /// DarwinGCC - The Darwin toolchain used by GCC.
 class VISIBILITY_HIDDEN DarwinGCC : public Darwin {
   /// GCC version to use.
-  unsigned GCCVersion[3];
+  unsigned GCCVersion[4];
 
   /// The directory suffix for this tool chain.
   std::string ToolChainDir;
 
 public:
   DarwinGCC(const HostInfo &Host, const llvm::Triple& Triple,
-            const unsigned (&DarwinVersion)[3], const unsigned (&GCCVersion)[3],
+            const unsigned (&DarwinVersion)[3], const unsigned (&GCCVersion)[4],
             bool IsIPhoneOS);
 
   /// @name Darwin ToolChain Implementation





More information about the cfe-commits mailing list