diff options
author | lloyd <[email protected]> | 2009-10-19 20:13:06 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-10-19 20:13:06 +0000 |
commit | afc93aafb9ead8264db251479ac0c4f698a8daf7 (patch) | |
tree | 4192cf87f913ee625a4902addc724f7dcff6b0a3 | |
parent | 10db0e9d7d9bab7c3bf4e1560e04ae6b8ba5b8b3 (diff) |
Be more forgiving of names passed with --cpu
-rwxr-xr-x | configure.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/configure.py b/configure.py index 1d7e1451d..b4e7f8895 100755 --- a/configure.py +++ b/configure.py @@ -600,7 +600,15 @@ class OsInfo(object): ['TARGET_OS_HAS_' + feat.upper() for feat in self.target_features] +def fixup_proc_name(proc): + proc = proc.lower().replace(' ', '') + for junk in ['(tm)', '(r)']: + proc = proc.replace(junk, '') + return proc + def canon_processor(archinfo, proc): + proc = fixup_proc_name(proc) + for ainfo in archinfo.values(): if ainfo.basename == proc or proc in ainfo.aliases: return (ainfo.basename, ainfo.basename) @@ -617,12 +625,7 @@ def guess_processor(archinfo): if base_proc == '': raise Exception('Could not determine target CPU; set with --cpu') - full_proc = platform.processor().lower().replace(' ', '') - for junk in ['(tm)', '(r)']: - full_proc = full_proc.replace(junk, '') - - if full_proc == '': - full_proc = base_proc + full_proc = fixup_proc_name(platform.processor()) or base_proc for ainfo in archinfo.values(): if ainfo.basename == base_proc or base_proc in ainfo.aliases: |