Index: rtemstoolkit/config.py
===================================================================
--- rtemstoolkit/config.py	(revision 15a3e06518a90338d90b7fd6c129df30d54244cb)
+++ rtemstoolkit/config.py	(revision 7d3350d0bbcb7468fecfd9abffb3fe9f34c0c6c3)
@@ -52,4 +52,5 @@
     from . import error
     from . import execute
+    from . import host
     from . import log
     from . import options
@@ -58,4 +59,5 @@
     import error
     import execute
+    import host
     import log
     import options
@@ -212,5 +214,5 @@
             e = execute.capture_execution()
             for s in sl:
-                if options.host_windows:
+                if host.is_windows:
                     cmd = '%s -c "%s"' % (self.macros.expand('%{__sh}'), s[2:-1])
                 else:
Index: rtemstoolkit/darwin.py
===================================================================
--- rtemstoolkit/darwin.py	(revision 15a3e06518a90338d90b7fd6c129df30d54244cb)
+++ rtemstoolkit/darwin.py	(revision 7d3350d0bbcb7468fecfd9abffb3fe9f34c0c6c3)
@@ -1,5 +1,5 @@
 #
 # RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2010-2016 Chris Johns (chrisj@rtems.org)
+# Copyright 2010-2017 Chris Johns (chrisj@rtems.org)
 # All rights reserved.
 #
@@ -45,13 +45,17 @@
     import execute
 
-def load():
-    uname = os.uname()
+def cpus():
     sysctl = '/usr/sbin/sysctl '
     e = execute.capture_execution()
     exit_code, proc, output = e.shell(sysctl + 'hw.ncpu')
     if exit_code == 0:
-        ncpus = output.split(' ')[1].strip()
+        ncpus = int(output.split(' ')[1].strip())
     else:
-        ncpus = '1'
+        ncpus = 1
+    return ncpus
+
+def overrides():
+    uname = os.uname()
+    ncpus = '%d' % (cores())
     defines = {
         '_ncpus':         ('none',    'none',     ncpus),
@@ -84,3 +88,4 @@
 if __name__ == '__main__':
     import pprint
-    pprint.pprint(load())
+    pprint.pprint(cpus())
+    pprint.pprint(overrides())
Index: rtemstoolkit/freebsd.py
===================================================================
--- rtemstoolkit/freebsd.py	(revision 15a3e06518a90338d90b7fd6c129df30d54244cb)
+++ rtemstoolkit/freebsd.py	(revision 7d3350d0bbcb7468fecfd9abffb3fe9f34c0c6c3)
@@ -1,5 +1,5 @@
 #
 # RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2010-2016 Chris Johns (chrisj@rtems.org)
+# Copyright 2010-2017 Chris Johns (chrisj@rtems.org)
 # All rights reserved.
 #
@@ -34,5 +34,4 @@
 #
 
-import pprint
 import os
 
@@ -48,13 +47,17 @@
     import execute
 
-def load():
-    uname = os.uname()
+def cpus():
     sysctl = '/sbin/sysctl '
     e = execute.capture_execution()
     exit_code, proc, output = e.shell(sysctl + 'hw.ncpu')
     if exit_code == 0:
-        ncpus = output.split(' ')[1].strip()
+        ncpus = int(output.split(' ')[1].strip())
     else:
-        ncpus = '1'
+        ncpus = 1
+    return ncpus
+
+def overrides():
+    uname = os.uname()
+    ncpus = '%d' % (cpus())
     if uname[4] == 'amd64':
         cpu = 'x86_64'
@@ -105,3 +108,5 @@
 
 if __name__ == '__main__':
-    pprint.pprint(load())
+    import pprint
+    pprint.pprint(cpus())
+    pprint.pprint(overrides())
Index: rtemstoolkit/host.py
===================================================================
--- rtemstoolkit/host.py	(revision 7d3350d0bbcb7468fecfd9abffb3fe9f34c0c6c3)
+++ rtemstoolkit/host.py	(revision 7d3350d0bbcb7468fecfd9abffb3fe9f34c0c6c3)
@@ -0,0 +1,111 @@
+#
+# RTEMS Tools Project (http://www.rtems.org/)
+# Copyright 2017 Chris Johns (chrisj@rtems.org)
+# All rights reserved.
+#
+# This file is part of the RTEMS Tools package in 'rtems-tools'.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# Host specifics.
+#
+
+from __future__ import print_function
+
+import os
+
+#
+# Support to handle use in a package and as a unit test.
+# If there is a better way to let us know.
+#
+try:
+    from . import error
+except (ValueError, SystemError):
+    import error
+
+is_windows = False
+platform = None
+name = None
+
+def _load():
+
+    global is_windows
+    global platform
+    global name
+
+    if os.name == 'nt':
+        name = 'windows'
+        is_windows = True
+    elif os.name == 'posix':
+        uname = os.uname()
+        if uname[0].startswith('CYGWIN_NT'):
+            name = 'windows'
+        elif uname[0] == 'Darwin':
+            name = darwin
+        elif uname[0] == 'FreeBSD':
+            name = 'freebsd'
+        elif uname[0] == 'NetBSD':
+            name = netbsd
+        elif uname[0] == 'Linux':
+            name = 'linux'
+        elif uname[0] == 'SunOS':
+            name = 'solaris'
+
+    if name is None:
+        raise error.general('unsupported host type; please add')
+
+    #try:
+    #    try:
+    #        platform = __import__(name, globals(), locals(), ['.'])
+    #    except:
+    #        platform = __import__(name, globals(), locals())
+    #except:
+    #    raise error.general('failed to load %s host support' % (name))
+
+    platform = __import__(name, globals(), locals(), ['.', ''])
+
+    if platform is None:
+        raise error.general('failed to load %s host support' % (name))
+
+def cpus():
+    _load()
+    return platform.cpus()
+
+def overrides():
+    _load()
+    return platform.overrides()
+
+if __name__ == '__main__':
+    import pprint
+    _load()
+    print('Name      : %s' % (name))
+    if is_windows:
+        status = 'Yes'
+    else:
+        status = 'No'
+    print('Windows   : %s' % (status))
+    print('CPUs      : %d' % (cpus()))
+    print('Overrides :')
+    pprint.pprint(overrides())
Index: rtemstoolkit/linux.py
===================================================================
--- rtemstoolkit/linux.py	(revision 15a3e06518a90338d90b7fd6c129df30d54244cb)
+++ rtemstoolkit/linux.py	(revision 7d3350d0bbcb7468fecfd9abffb3fe9f34c0c6c3)
@@ -1,5 +1,5 @@
 #
 # RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2010-2016 Chris Johns (chrisj@rtems.org)
+# Copyright 2010-2017 Chris Johns (chrisj@rtems.org)
 # All rights reserved.
 #
@@ -34,5 +34,4 @@
 #
 
-import pprint
 import os
 import platform
@@ -49,7 +48,5 @@
     import path
 
-def load():
-    uname = os.uname()
-    smp_mflags = ''
+def cpus():
     processors = '/bin/grep processor /proc/cpuinfo'
     e = execute.capture_execution()
@@ -64,5 +61,10 @@
         except:
             pass
-    ncpus = str(ncpus + 1)
+    return ncpus + 1
+
+def overrides():
+    uname = os.uname()
+    smp_mflags = ''
+    ncpus = '%d' % cpus()
     if uname[4].startswith('arm'):
         cpu = 'arm'
@@ -154,3 +156,5 @@
 
 if __name__ == '__main__':
-    pprint.pprint(load())
+    import pprint
+    pprint.pprint(cpus())
+    pprint.pprint(overrides())
Index: rtemstoolkit/netbsd.py
===================================================================
--- rtemstoolkit/netbsd.py	(revision 15a3e06518a90338d90b7fd6c129df30d54244cb)
+++ rtemstoolkit/netbsd.py	(revision 7d3350d0bbcb7468fecfd9abffb3fe9f34c0c6c3)
@@ -1,5 +1,5 @@
 #
 # RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2010-2016 Chris Johns (chrisj@rtems.org)
+# Copyright 2010-2017 Chris Johns (chrisj@rtems.org)
 # All rights reserved.
 #
@@ -25,5 +25,4 @@
 #
 
-import pprint
 import os
 
@@ -35,13 +34,17 @@
     import execute
 
-def load():
-    uname = os.uname()
+def cpus():
     sysctl = '/sbin/sysctl '
     e = execute.capture_execution()
     exit_code, proc, output = e.shell(sysctl + 'hw.ncpu')
     if exit_code == 0:
-        ncpus = output.split(' ')[1].strip()
+        ncpus = int(output.split(' ')[1].strip())
     else:
-        ncpus = '1'
+        ncpus = 1
+    return ncpus
+
+def overrides():
+    uname = os.uname()
+    ncpus = '%d' % (cpus())
     if uname[4] == 'amd64':
         cpu = 'x86_64'
@@ -94,3 +97,5 @@
 
 if __name__ == '__main__':
-    pprint.pprint(load())
+    import pprint
+    pprint.pprint(cpus())
+    pprint.pprint(overrides())
Index: rtemstoolkit/options.py
===================================================================
--- rtemstoolkit/options.py	(revision 15a3e06518a90338d90b7fd6c129df30d54244cb)
+++ rtemstoolkit/options.py	(revision 7d3350d0bbcb7468fecfd9abffb3fe9f34c0c6c3)
@@ -51,4 +51,5 @@
     from . import execute
     from . import git
+    from . import host
     from . import log
     from . import macros
@@ -59,4 +60,5 @@
     import execute
     import git
+    import host
     import log
     import macros
@@ -65,9 +67,4 @@
 
 basepath = 'tb'
-
-#
-# Save the host state.
-#
-host_windows = False
 
 class command_line(object):
@@ -540,59 +537,5 @@
         raise error.general('invalid options type passed to options loader')
 
-    global host_windows
-
-    overrides = None
-    if os.name == 'nt':
-        try:
-            import windows
-            overrides = windows.load()
-            host_windows = True
-        except:
-            raise error.general('failed to load Windows host support')
-    elif os.name == 'posix':
-        uname = os.uname()
-        try:
-            if uname[0].startswith('CYGWIN_NT'):
-                try:
-                    from . import windows
-                except:
-                    import windows
-                overrides = windows.load()
-            elif uname[0] == 'Darwin':
-                try:
-                    from . import darwin
-                except:
-                    import darwin
-                overrides = darwin.load()
-            elif uname[0] == 'FreeBSD':
-                try:
-                    from . import freebsd
-                except:
-                    import freebsd
-                overrides = freebsd.load()
-            elif uname[0] == 'NetBSD':
-                try:
-                    from . import netbsd
-                except:
-                    import netbsd
-                overrides = netbsd.load()
-            elif uname[0] == 'Linux':
-                try:
-                    from . import linux
-                except:
-                    import linux
-                overrides = linux.load()
-            elif uname[0] == 'SunOS':
-                try:
-                    from . import solaris
-                except:
-                    import solaris
-                overrides = solaris.load()
-        except:
-            raise error.general('failed to load %s host support' % (uname[0]))
-    else:
-        raise error.general('unsupported host type; please add')
-    if overrides is None:
-        raise error.general('no hosts defaults found; please add')
+    overrides = host.overrides()
     for k in overrides:
         opts.defaults[k] = overrides[k]
Index: rtemstoolkit/solaris.py
===================================================================
--- rtemstoolkit/solaris.py	(revision 15a3e06518a90338d90b7fd6c129df30d54244cb)
+++ rtemstoolkit/solaris.py	(revision 7d3350d0bbcb7468fecfd9abffb3fe9f34c0c6c3)
@@ -1,5 +1,5 @@
 #
 # RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2010-2016 Chris Johns (chrisj@rtems.org)
+# Copyright 2010-2017 Chris Johns (chrisj@rtems.org)
 # All rights reserved.
 #
@@ -23,5 +23,4 @@
 #
 
-import pprint
 import os
 
@@ -35,13 +34,17 @@
     import execute
 
-def load():
-    uname = os.uname()
+def cpus():
     psrinfo = '/sbin/psrinfo|wc -l'
     e = execute.capture_execution()
     exit_code, proc, output = e.shell(psrinfo)
     if exit_code == 0:
-        ncpus = output
+        ncpus = int(output)
     else:
-        ncpus = '1'
+        ncpus = 1
+    return ncpus
+
+def overrides():
+    uname = os.uname()
+    ncpus = '%d' % (cpus())
     if uname[4] == 'i86pc':
         cpu = 'i386'
@@ -88,3 +91,5 @@
 
 if __name__ == '__main__':
-    pprint.pprint(load())
+    import pprint
+    pprint.pprint(cpus())
+    pprint.pprint(overrides())
Index: rtemstoolkit/windows.py
===================================================================
--- rtemstoolkit/windows.py	(revision 15a3e06518a90338d90b7fd6c129df30d54244cb)
+++ rtemstoolkit/windows.py	(revision 7d3350d0bbcb7468fecfd9abffb3fe9f34c0c6c3)
@@ -1,5 +1,5 @@
 #
 # RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2010-2016 Chris Johns (chrisj@rtems.org)
+# Copyright 2010-2017 Chris Johns (chrisj@rtems.org)
 # All rights reserved.
 #
@@ -33,5 +33,4 @@
 #
 
-import pprint
 import os
 
@@ -47,5 +46,12 @@
     import execute
 
-def load():
+def cpus():
+    if os.environ.has_key('NUMBER_OF_PROCESSORS'):
+        ncpus = int(os.environ['NUMBER_OF_PROCESSORS'])
+    else:
+        ncpus = 1
+    return ncpus
+
+def overrides():
     # Default to the native Windows Python.
     uname = 'win32'
@@ -77,8 +83,5 @@
             pass
 
-    if os.environ.has_key('NUMBER_OF_PROCESSORS'):
-        ncpus = os.environ['NUMBER_OF_PROCESSORS']
-    else:
-        ncpus = '1'
+    ncpus = '%d' % (cpus())
 
     defines = {
@@ -141,3 +144,5 @@
 
 if __name__ == '__main__':
-    pprint.pprint(load())
+    import pprint
+    pprint.pprint(cpus())
+    pprint.pprint(overrides())
Index: tester/rt/stty.py
===================================================================
--- tester/rt/stty.py	(revision 15a3e06518a90338d90b7fd6c129df30d54244cb)
+++ tester/rt/stty.py	(revision 7d3350d0bbcb7468fecfd9abffb3fe9f34c0c6c3)
@@ -38,9 +38,9 @@
 
 from rtemstoolkit import error
-from rtemstoolkit import options
+from rtemstoolkit import host
 from rtemstoolkit import path
 
 def save():
-    if not options.host_windows:
+    if not host.is_windows:
         try:
             sin = termios.tcgetattr(sys.stdin)
@@ -61,5 +61,5 @@
 
     def __init__(self, dev):
-        if options.host_windows:
+        if host.is_windows:
             raise error.general('termios not support on host')
         self.dev = dev
@@ -67,5 +67,5 @@
         self.fd = None
         self.if_on = False
-        if options.host_windows:
+        if host.is_windows:
             raise error.general('TTY consoles not supported on Windows.')
         if not path.exists(dev):
