diff --git a/src/base/cpu.cc b/src/base/cpu.cc index 56e1c4633c6..daf33023656 100644 --- a/src/base/cpu.cc +++ b/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. diff --git a/src/version.cc b/src/version.cc index 6266db9977d..514cf3fd6b3 100644 --- a/src/version.cc +++ b/src/version.cc @@ -35,7 +35,7 @@ #define MAJOR_VERSION 4 #define MINOR_VERSION 1 #define BUILD_NUMBER 0 -#define PATCH_LEVEL 12 +#define PATCH_LEVEL 13 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) #define IS_CANDIDATE_VERSION 0