# HG changeset patch # User Bernhard Urban # Date 1382535107 -7200 # Node ID 0aa37fd2f33e018b940188126ea9455db15fe093 # Parent 97f56b7e978e824549e1e8ddc923416ba66b4eae mx: fix detection for sparc. ignore unparsable lines in jvm.cfg diff -r 97f56b7e978e -r 0aa37fd2f33e mx/commands.py --- a/mx/commands.py Wed Oct 23 13:41:50 2013 +0200 +++ b/mx/commands.py Wed Oct 23 15:31:47 2013 +0200 @@ -244,7 +244,7 @@ if machine in ['amd64', 'AMD64', 'x86_64', 'i86pc']: return 'amd64' if machine in ['sun4v', 'sun4u']: - return 'sparc' + return 'sparcv9' if machine == 'i386' and mx.get_os() == 'darwin': try: # Support for Snow Leopard and earlier version of MacOSX @@ -320,11 +320,14 @@ for line in f: if line.startswith('-') and defaultVM is None: parts = line.split() - assert len(parts) == 2, parts - assert parts[1] == 'KNOWN', parts[1] - defaultVM = parts[0][1:] - jvmCfgLines += ['# default VM is a copy of the unmodified ' + defaultVM + ' VM\n'] - jvmCfgLines += ['-original KNOWN\n'] + if len(parts) == 2: + assert parts[1] == 'KNOWN', parts[1] + defaultVM = parts[0][1:] + jvmCfgLines += ['# default VM is a copy of the unmodified ' + defaultVM + ' VM\n'] + jvmCfgLines += ['-original KNOWN\n'] + else: + # skip lines which we cannot parse (e.g. '-hotspot ALIASED_TO -client') + pass else: jvmCfgLines += [line]