comparison mx/commands.py @ 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 0a6d8857306d
children a9a50f21e000
comparison
equal deleted inserted replaced
6565:f7e2f6d913a4 6566:ef48be91f5fd
276 276
277 def _arch(): 277 def _arch():
278 machine = platform.uname()[4] 278 machine = platform.uname()[4]
279 if machine in ['amd64', 'AMD64', 'x86_64', 'i86pc']: 279 if machine in ['amd64', 'AMD64', 'x86_64', 'i86pc']:
280 return 'amd64' 280 return 'amd64'
281 mx.abort('unsupported or unknown machine type: ' + machine) 281 if machine == 'i386' and mx.get_os() == 'darwin':
282 try:
283 # Support for Snow Leopard and earlier version of MacOSX
284 if subprocess.check_output(['sysctl', '-n', 'hw.cpu64bit_capable']).strip() == '1':
285 return 'amd64'
286 except OSError:
287 # sysctl is not available
288 pass
289 mx.abort('unknown or unsupported architecture: os=' + mx.get_os() + ', machine=' + machine)
282 290
283 def _vmLibDirInJdk(jdk): 291 def _vmLibDirInJdk(jdk):
284 """ 292 """
285 Get the directory within a JDK where the server and client 293 Get the directory within a JDK where the server and client
286 subdirectories are located. 294 subdirectories are located.