PKGBUILDs/community/nodejs/arm.patch
2015-04-04 04:39:00 +00:00

70 lines
2.3 KiB
Diff

diff --git a/deps/v8/build/toolchain.gypi b/deps/v8/build/toolchain.gypi
index 1d47360..9c2e376 100644
--- a/deps/v8/build/toolchain.gypi
+++ b/deps/v8/build/toolchain.gypi
@@ -159,7 +159,7 @@
}],
[ 'arm_version==7 or arm_version=="default"', {
'conditions': [
- [ 'arm_fpu!="default"', {
+ [ 'arm_fpu!="default" and arm_fpu!=""', {
'cflags': ['-mfpu=<(arm_fpu)',],
}],
],
@@ -202,7 +202,7 @@
}],
[ 'arm_version==7 or arm_version=="default"', {
'conditions': [
- [ 'arm_fpu!="default"', {
+ [ 'arm_fpu!="default" and arm_fpu!=""', {
'cflags': ['-mfpu=<(arm_fpu)',],
}],
],
diff --git a/deps/v8/src/base/cpu.cc b/deps/v8/src/base/cpu.cc
index adce69d..3f35a08 100644
--- a/deps/v8/src/base/cpu.cc
+++ b/deps/v8/src/base/cpu.cc
@@ -365,7 +365,7 @@ 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
@@ -377,6 +377,17 @@ CPU::CPU() : stepping_(0),
}
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;
+ } else if (HasListItem(processor, "(v5t)")) {
+ architecture_ = 5;
+ }
+ delete[] processor;
+ }
}
// Try to extract the list of CPU features from ELF hwcaps.
@@ -427,6 +438,15 @@ CPU::CPU() : stepping_(0),
architecture_ = 6;
}
+ if (architecture_ < 6) {
+ architecture_ = 5;
+ has_thumb2_ = false;
+ has_vfp_ = false;
+ has_vfp3_ = false;
+ has_vfp3_d32_ = false;
+ has_neon_ = false;
+ }
+
// We don't support any FPUs other than VFP.
has_fpu_ = has_vfp_;