diff options
author | Chris Johns <chrisj@rtems.org> | 2015-02-07 17:58:17 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2015-02-07 17:58:17 +1100 |
commit | d4eb08f55a7e868ea0e61dee03c216cdf7a3502b (patch) | |
tree | 9f98bea8a291aeb38ab93b2efb2c9865db1defae /source-builder/sb/windows.py | |
parent | Update all 4.11 archs to newlib-2.2.0-1 and gdb-7.8.2 where possible. (diff) | |
download | rtems-source-builder-d4eb08f55a7e868ea0e61dee03c216cdf7a3502b.tar.bz2 |
Windows native build fixes.
The testing of building on Windows is done using MSYS2.
Diffstat (limited to 'source-builder/sb/windows.py')
-rw-r--r-- | source-builder/sb/windows.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/source-builder/sb/windows.py b/source-builder/sb/windows.py index 222876d..938abfc 100644 --- a/source-builder/sb/windows.py +++ b/source-builder/sb/windows.py @@ -30,13 +30,18 @@ import execute def load(): # Default to the native Windows Python. uname = 'win32' - system = 'mingw32' - if os.environ.has_key('HOSTTYPE'): - hosttype = os.environ['HOSTTYPE'] + if os.environ.has_key('PROCESSOR_ARCHITECTURE'): + if os.environ['PROCESSOR_ARCHITECTURE'] == 'AMD64': + hosttype = 'x86_64' + machsize = '64' + else: + hosttype = 'i686' + machsize = '32' else: - hosttype = 'i686' - host_triple = hosttype + '-pc-' + system - build_triple = hosttype + '-pc-' + system + hosttype = 'x86_64' + machsize = '32' + host_triple = '%s-w%s-mingw32' % (hosttype, machsize) + build_triple = '%s-w%s-mingw32' % (hosttype, machsize) # See if this is actually Cygwin Python if os.name == 'posix': |