Index: rtemstoolkit/rld-rtems.cpp
===================================================================
--- rtemstoolkit/rld-rtems.cpp	(revision 6f8b07c3b6202145fd9b86c38f786c7553eaf0c4)
+++ rtemstoolkit/rld-rtems.cpp	(revision 0c0b2d4b529817f4561088c61827af797eee6def)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2011-2014, Chris Johns <chrisj@rtems.org>
+ * Copyright (c) 2011-2016, Chris Johns <chrisj@rtems.org>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
@@ -29,4 +29,8 @@
     static std::string _arch_bsp;
 
+    static uint64_t _version_major = 0;
+    static uint64_t _version_minor = 0;
+    static uint64_t _version_revision = 0;
+
     static void
     load_cc ()
@@ -131,4 +135,8 @@
     {
       _version = version_;
+      rld::version_parse (_version,
+                          _version_major,
+                          _version_minor,
+                          _version_revision);
     }
 
@@ -153,4 +161,37 @@
     {
       return _version;
+    }
+
+    uint64_t
+    version_major ()
+    {
+      if (_version_major == 0)
+        rld::version_parse (_version,
+                            _version_major,
+                            _version_minor,
+                            _version_revision);
+      return _version_major;
+    }
+
+    uint64_t
+    version_minor ()
+    {
+      if (_version_minor == 0)
+        rld::version_parse (_version,
+                            _version_major,
+                            _version_minor,
+                            _version_revision);
+      return _version_minor;
+    }
+
+    uint64_t
+    version_revision ()
+    {
+      if (_version_revision == 0)
+        rld::version_parse (_version,
+                            _version_major,
+                            _version_minor,
+                            _version_revision);
+      return _version_revision;
     }
 
Index: rtemstoolkit/rld-rtems.h
===================================================================
--- rtemstoolkit/rld-rtems.h	(revision 6f8b07c3b6202145fd9b86c38f786c7553eaf0c4)
+++ rtemstoolkit/rld-rtems.h	(revision 0c0b2d4b529817f4561088c61827af797eee6def)
@@ -53,4 +53,19 @@
 
     /**
+     * Get the RTEMS major version number.
+     */
+    uint64_t version_major ();
+
+    /**
+     * Get the RTEMS minor version number.
+     */
+    uint64_t version_minor ();
+
+    /**
+     * Get the RTEMS revision version number.
+     */
+    uint64_t version_revision ();
+
+    /**
      * Return the arch/bsp string.
      */
Index: rtemstoolkit/rld.cpp
===================================================================
--- rtemstoolkit/rld.cpp	(revision 6f8b07c3b6202145fd9b86c38f786c7553eaf0c4)
+++ rtemstoolkit/rld.cpp	(revision 0c0b2d4b529817f4561088c61827af797eee6def)
@@ -68,7 +68,17 @@
 
   /**
-   * The output passed on the command line.
-   */
-  //static std::string output;
+   * The version major number.
+   */
+  static uint64_t _version_major;
+
+  /**
+   * The version minor number.
+   */
+  static uint64_t _version_minor;
+
+  /**
+   * The version revision number.
+   */
+  static uint64_t _version_revision;
 
   bool
@@ -185,4 +195,42 @@
 
   void
+  version_parse (const std::string& str,
+                 uint64_t&          major,
+                 uint64_t&          minor,
+                 uint64_t&          revision)
+  {
+    strings parts;
+
+    rld::split (parts, str, '.');
+
+    if (parts.size () >= 1)
+    {
+      std::istringstream iss (parts[0]);
+      iss >> major;
+    }
+
+    if (parts.size () >= 2)
+    {
+      std::istringstream iss (parts[1]);
+      iss >> minor;
+    }
+
+    if (parts.size () >= 3)
+    {
+      size_t p = parts[2].find ('_');
+
+      if (p != std::string::npos)
+        parts[2].erase (p);
+
+      std::istringstream iss (parts[2]);
+
+      if (p != std::string::npos)
+        iss >> std::hex;
+
+      iss >> revision;
+    }
+  }
+
+  void
   verbose_inc ()
   {
@@ -202,8 +250,35 @@
   }
 
-  const std::string
-  rtems_version ()
-  {
-    return RTEMS_VERSION;
+  uint64_t
+  version_major ()
+  {
+    if (_version_major == 0)
+      version_parse (version (),
+                     _version_major,
+                     _version_minor,
+                     _version_revision);
+    return _version_major;
+  }
+
+  uint64_t
+  version_minor ()
+  {
+    if (_version_major == 0)
+      version_parse (version (),
+                     _version_major,
+                     _version_minor,
+                     _version_revision);
+    return _version_minor;
+  }
+
+  uint64_t
+  version_revision ()
+  {
+    if (_version_major == 0)
+      version_parse (version (),
+                     _version_major,
+                     _version_minor,
+                     _version_revision);
+    return _version_revision;
   }
 
Index: rtemstoolkit/rld.h
===================================================================
--- rtemstoolkit/rld.h	(revision 6f8b07c3b6202145fd9b86c38f786c7553eaf0c4)
+++ rtemstoolkit/rld.h	(revision 0c0b2d4b529817f4561088c61827af797eee6def)
@@ -30,4 +30,5 @@
 #include <functional>
 #include <iostream>
+#include <list>
 #include <locale>
 #include <sstream>
@@ -64,4 +65,6 @@
     class archive;
     class object;
+    class cache;
+    typedef std::list < object* > object_list;
   }
 }
@@ -180,4 +183,13 @@
 
   /**
+   * Parse version string of format major.minor.revision where revieion can be
+   * a git hash.
+   */
+  void version_parse (const std::string& str,
+                      uint64_t&          major,
+                      uint64_t&          minor,
+                      uint64_t&          revision);
+
+  /**
    * Increment the verbose level.
    */
@@ -194,4 +206,19 @@
    */
   const std::string version ();
+
+  /**
+   * Get the major version number.
+   */
+  uint64_t version_major ();
+
+  /**
+   * Get the minor version number.
+   */
+  uint64_t version_minor ();
+
+  /**
+   * Get the revision version number.
+   */
+  uint64_t version_revision ();
 
   /**
