aboutsummaryrefslogtreecommitdiffstats
path: root/configure.pl
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-10-23 13:37:22 +0000
committerlloyd <[email protected]>2008-10-23 13:37:22 +0000
commit146945d57a2942f2072024c72276e72772d81bb9 (patch)
tree7f9636102e9135a7f63743568ce9f7ed96182a98 /configure.pl
parent4ab25e28126c6b60c6ef3f8afcc17bcff24eba98 (diff)
If we match /proc/cpuinfo or uname against a submodel alias, instead print
the submodel it is referencing - this is usually more recognizable. Suggested by Markus Wanner.
Diffstat (limited to 'configure.pl')
-rwxr-xr-xconfigure.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.pl b/configure.pl
index a38f3f101..b019603ef 100755
--- a/configure.pl
+++ b/configure.pl
@@ -2041,8 +2041,9 @@ sub guess_cpu_from_this
# possible; that's the most common setup right now anyway
return 'sparc32-v9' if($cpuinfo =~ /ultrasparc/);
- # Maybe do this once and cache it?
+ # Should probably do this once and cache it
my @names;
+ my %all_alias;
foreach my $arch (keys %CPU) {
my %info = %{$CPU{$arch}};
@@ -2055,6 +2056,7 @@ sub guess_cpu_from_this
my %submodel_aliases = %{$info{'submodel_aliases'}};
foreach my $sm_alias (keys %submodel_aliases) {
push @names, $sm_alias;
+ $all_alias{$sm_alias} = $submodel_aliases{$sm_alias};
}
}
}
@@ -2064,6 +2066,9 @@ sub guess_cpu_from_this
foreach my $name (@names) {
if($cpuinfo =~ $name) {
trace("Matched '$cpuinfo' against '$name'");
+
+ return $all_alias{$name} if defined($all_alias{$name});
+
return $name;
}
}