summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/nodejs/nodejs/0001-gcc-has-a-builtin-define-to-denote-hard-abi-when-in-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/nodejs/nodejs/0001-gcc-has-a-builtin-define-to-denote-hard-abi-when-in-.patch')
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0001-gcc-has-a-builtin-define-to-denote-hard-abi-when-in-.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-gcc-has-a-builtin-define-to-denote-hard-abi-when-in-.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-gcc-has-a-builtin-define-to-denote-hard-abi-when-in-.patch
new file mode 100644
index 000000000..6268d6940
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-gcc-has-a-builtin-define-to-denote-hard-abi-when-in-.patch
@@ -0,0 +1,60 @@
1From bf701e7cb3616631a354ed9ecbed6dd16f60c60d Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Wed, 30 Jan 2013 10:43:47 +0100
4Subject: [PATCH] gcc has a builtin define to denote hard abi when in use, e.g.
5 when using -mfloat-abi=hard it will define __ARM_PCS_VFP to 1 and therefore
6 we should check that to determine which calling convention is in use and not
7 __VFP_FP__ which merely indicates presence of VFP unit
8
9The fix has been provided by Khem Raj <raj.khem@gmail.com>
10
11Upstream-Status: Forwarded
12
13Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
14---
15 deps/v8/src/arm/assembler-arm.cc | 4 ++--
16 deps/v8/src/platform-linux.cc | 4 ++--
17 2 files changed, 4 insertions(+), 4 deletions(-)
18
19diff --git a/deps/v8/src/arm/assembler-arm.cc b/deps/v8/src/arm/assembler-arm.cc
20index 1787d15..c64ef58 100644
21--- a/deps/v8/src/arm/assembler-arm.cc
22+++ b/deps/v8/src/arm/assembler-arm.cc
23@@ -71,10 +71,10 @@ static unsigned CpuFeaturesImpliedByCompiler() {
24 // If the compiler is allowed to use VFP then we can use VFP too in our code
25 // generation even when generating snapshots. ARMv7 and hardware floating
26 // point support implies VFPv3, see ARM DDI 0406B, page A1-6.
27-#if defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(__VFP_FP__) \
28+#if defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(__ARM_PCS_VFP) \
29 && !defined(__SOFTFP__)
30 answer |= 1u << VFP3 | 1u << ARMv7 | 1u << VFP2;
31-#endif // defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(__VFP_FP__)
32+#endif // defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(__ARM_PCS_VFP)
33 // && !defined(__SOFTFP__)
34 #endif // _arm__
35
36diff --git a/deps/v8/src/platform-linux.cc b/deps/v8/src/platform-linux.cc
37index ed9eb79..10d1879 100644
38--- a/deps/v8/src/platform-linux.cc
39+++ b/deps/v8/src/platform-linux.cc
40@@ -170,7 +170,7 @@ bool OS::ArmCpuHasFeature(CpuFeature feature) {
41 // calling this will return 1.0 and otherwise 0.0.
42 static void ArmUsingHardFloatHelper() {
43 asm("mov r0, #0":::"r0");
44-#if defined(__VFP_FP__) && !defined(__SOFTFP__)
45+#if defined(__ARM_PCS_VFP) && !defined(__SOFTFP__)
46 // Load 0x3ff00000 into r1 using instructions available in both ARM
47 // and Thumb mode.
48 asm("mov r1, #3":::"r1");
49@@ -195,7 +195,7 @@ static void ArmUsingHardFloatHelper() {
50 #else
51 asm("vmov d0, r0, r1");
52 #endif // __thumb__
53-#endif // defined(__VFP_FP__) && !defined(__SOFTFP__)
54+#endif // defined(__ARM_PCS_VFP) && !defined(__SOFTFP__)
55 asm("mov r1, #0":::"r1");
56 }
57
58--
591.8.1
60