Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

v8: workaround to arm v6l detection in newer kernel versions as described in Issue 8589 #9068

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -490,17 +490,19 @@ def configure_arm(o):
else:
arm_float_abi = 'default'

# configure arm defaults which would be most widely supported
o['variables']['arm_neon'] = int(is_arm_neon())
o['variables']['arm_thumb'] = 0 # -marm
o['variables']['arm_float_abi'] = arm_float_abi
o['variables']['arm_version'] = 'default'
o['variables']['arm_fpu'] = 'vfpv2' # according to 'armcc', ARMv1 is syn. with ARMv2

# implement arch-specific overrides
if is_arch_armv7():
o['variables']['arm_version'] = '7'
o['variables']['arm_fpu'] = 'vfpv3'
elif is_arch_armv6():
o['variables']['arm_version'] = '6'
else:
o['variables']['arm_version'] = 'default'

o['variables']['arm_fpu'] = 'vfpv3' # V8 3.18 no longer supports VFP2.
o['variables']['arm_neon'] = int(is_arm_neon())
o['variables']['arm_thumb'] = 0 # -marm
o['variables']['arm_float_abi'] = arm_float_abi


def configure_node(o):
Expand Down
17 changes: 14 additions & 3 deletions deps/v8/src/base/cpu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -365,16 +365,27 @@ CPU::CPU() : stepping_(0),
//
// 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
// ARMv6 device that reports architecture 7.
// NOTE: the 'elf_platform' moved to the model name field in
// Linux v3.8, so we check that first

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change different than the one landed upstream?

if (architecture_ == 7) {
char* processor = cpu_info.ExtractField("Processor");
char* processor = cpu_info.ExtractField("model name");
if (HasListItem(processor, "(v6l)")) {
architecture_ = 6;
}
} else {
// prior to Linux v3.8 'elf_platform' was found in the
// "Processor" field, we check this second for backward
//compatibility
delete[] processor;
processor = cpu_info.ExtractField("Processor");
if (HasListItem(processor, "(v6l)")) {
architecture_ = 6;
}
}
delete[] processor;
}
}
Expand Down