Mercurial > hg > truffle
changeset 6566:ef48be91f5fd
fixed detection of architecture on Snow Leopard and earlier versions of MacOSX
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Sat, 20 Oct 2012 12:21:23 +0200 |
parents | f7e2f6d913a4 |
children | 3bc7183309e0 |
files | mx/commands.py |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mx/commands.py Sat Oct 20 11:53:12 2012 +0200 +++ b/mx/commands.py Sat Oct 20 12:21:23 2012 +0200 @@ -278,7 +278,15 @@ machine = platform.uname()[4] if machine in ['amd64', 'AMD64', 'x86_64', 'i86pc']: return 'amd64' - mx.abort('unsupported or unknown machine type: ' + machine) + if machine == 'i386' and mx.get_os() == 'darwin': + try: + # Support for Snow Leopard and earlier version of MacOSX + if subprocess.check_output(['sysctl', '-n', 'hw.cpu64bit_capable']).strip() == '1': + return 'amd64' + except OSError: + # sysctl is not available + pass + mx.abort('unknown or unsupported architecture: os=' + mx.get_os() + ', machine=' + machine) def _vmLibDirInJdk(jdk): """