aboutsummaryrefslogtreecommitdiffstats
path: root/configure.pl
diff options
context:
space:
mode:
authorlloyd <[email protected]>2007-03-12 01:12:25 +0000
committerlloyd <[email protected]>2007-03-12 01:12:25 +0000
commitcc8247386812fe1f0f1af9b81121dfe2798f0488 (patch)
tree14f002718595883029b538a3f54a95340d413b27 /configure.pl
parent1a1c59035e6aff9f8e41a87909154cc18717c47d (diff)
Provide a more flexible mechanism for specifying which modules are loaded.
Now three classes are defined: 'request', 'auto', and 'asm_ok'. The 'auto' class is loaded automatically if the platform support matches up with what we are building for (this is the former default). The 'request' mode means it is only loaded if specifically requested by name. The 'asm_ok' module is marked for all modules that use any assembler (including inline assembler). This normally functions like 'auto', unless --debug is passed to configure, in which case it is treated as 'request'. Modules which do not specify a load behavior are given a default of 'request'.
Diffstat (limited to 'configure.pl')
-rwxr-xr-xconfigure.pl10
1 files changed, 6 insertions, 4 deletions
diff --git a/configure.pl b/configure.pl
index 81f5b9166..7f741fe21 100755
--- a/configure.pl
+++ b/configure.pl
@@ -1120,14 +1120,14 @@ sub get_module_info {
my %info;
$info{'name'} = $name;
- $info{'external_libs'} = 0;
+ $info{'load_on'} = 'requeste'; # default unless specified
$info{'libs'} = {};
while($_ = &$reader()) {
match_any_of($_, \%info, 'quoted', 'realname:note');
match_any_of($_, \%info, 'unquoted', 'define:mp_bits');
- $info{'external_libs'} = 1 if(/^uses_external_libs/);
+ $info{'load_on'} = $1 if(/^load_on: (.*)$/);
read_list($_, $reader, 'arch', list_push(\@{$info{'arch'}}));
read_list($_, $reader, 'cc', list_push(\@{$info{'cc'}}));
@@ -1278,13 +1278,15 @@ sub guess_mods {
my $arch = $$config{'arch'};
my $submodel = $$config{'submodel'};
+ my $asm_ok = ($$config{'debug'} == 0);
+
my @usable_modules;
foreach my $mod (sort keys %MODULES) {
my %modinfo = %{ $MODULES{$mod} };
- # If it uses external libs, the user has to request it specifically
- next if($modinfo{'external_libs'});
+ next if($modinfo{'load_on'} eq 'request');
+ next if(!$asm_ok and $modinfo{'load_on'} eq 'asm_ok');
my @cc_list = @{ $modinfo{'cc'} };
next if(scalar @cc_list > 0 && !in_array($cc, \@cc_list));