summaryrefslogtreecommitdiff
path: root/deps/v8/src/base/cpu.cc
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2015-01-22 21:50:35 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2015-01-22 23:07:53 +0100
commit297cadbab6a37fa4f14811452e4621770a321371 (patch)
tree912ea5e28d22a84bf36d50c16f4154e827d43d3f /deps/v8/src/base/cpu.cc
parentd481bb68c4f2cf01ec7d26dcc91862b265b7effa (diff)
downloadnode-new-297cadbab6a37fa4f14811452e4621770a321371.tar.gz
deps: fix v8 armv6 run-time detection
The elf_platform suffix in /proc/cpuinfo moved to the model name field in Linux 3.8. Out-of-tree patch pending https://codereview.chromium.org/867713003/ Fixes: https://github.com/iojs/io.js/issues/283 PR-URL: https://github.com/iojs/io.js/pull/559 Reviewed-By: Fedor Indutny <fedor@indutny.com>
Diffstat (limited to 'deps/v8/src/base/cpu.cc')
-rw-r--r--deps/v8/src/base/cpu.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/deps/v8/src/base/cpu.cc b/deps/v8/src/base/cpu.cc
index 56e1c4633c..daf3302365 100644
--- a/deps/v8/src/base/cpu.cc
+++ b/deps/v8/src/base/cpu.cc
@@ -438,7 +438,7 @@ CPU::CPU()
//
// See http://code.google.com/p/android/issues/detail?id=10812
//
- // We try to correct this by looking at the 'elf_format'
+ // We try to correct this by looking at the 'elf_platform'
// field reported by the 'Processor' field, which is of the
// form of "(v7l)" for an ARMv7-based CPU, and "(v6l)" for
// an ARMv6-one. For example, the Raspberry Pi is one popular
@@ -450,6 +450,15 @@ CPU::CPU()
}
delete[] processor;
}
+
+ // elf_platform moved to the model name field in Linux v3.8.
+ if (architecture_ == 7) {
+ char* processor = cpu_info.ExtractField("model name");
+ if (HasListItem(processor, "(v6l)")) {
+ architecture_ = 6;
+ }
+ delete[] processor;
+ }
}
// Try to extract the list of CPU features from ELF hwcaps.