aboutsummaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-07-09 13:58:29 +0000
committerlloyd <[email protected]>2009-07-09 13:58:29 +0000
commit12e5390ae5cd5e2421ad0c22a19c1c2c8632c592 (patch)
treeb89a7608809fb9f7aa06dda52355d9a0ab5edefd /configure.py
parentbbb8285659dc9bb84059a287069ec1fe3ef61acc (diff)
Deal with the case where platform.processor() returns the empty string,
which it is documented to do in some situations. Use a list comprehension instead of an explicit loop in choose_modules_to_use
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py27
1 files changed, 12 insertions, 15 deletions
diff --git a/configure.py b/configure.py
index 797523bdf..f319b533a 100755
--- a/configure.py
+++ b/configure.py
@@ -507,6 +507,9 @@ def guess_processor(archinfo):
for junk in ['(tm)', '(r)']:
full_proc = full_proc.replace(junk, '')
+ if full_proc == '':
+ full_proc = base_proc
+
for ainfo in archinfo.values():
if ainfo.basename == base_proc or base_proc in ainfo.aliases:
for (match,submodel) in ainfo.all_submodels():
@@ -757,24 +760,18 @@ def choose_modules_to_use(options, modules):
use_module = {}
for (name,module) in modules.iteritems():
- if use_module.get(name, False):
- # already enabled (a dep, most likely)
- continue
-
- (should_use,deps) = enable_module(module)
-
- use_module[name] = should_use
+ if use_module.get(name, False) is False:
+ (should_use,deps) = enable_module(module)
- if should_use:
- for dep in deps:
- use_module[dep] = True
+ use_module[name] = should_use
- chosen = []
- for (name,useme) in use_module.iteritems():
- if useme:
- chosen.append(modules[name])
+ if should_use:
+ for dep in deps:
+ use_module[dep] = True
- return chosen
+ return [modules[name]
+ for (name,useme) in use_module.items()
+ if useme]
"""
Load the info files about modules, targets, etc