git: 02c4b2720bb1 - main - www/node: Fix build on armv7

From: Mikael Urankar <mikael_at_FreeBSD.org>
Date: Tue, 19 Apr 2022 16:42:46 UTC
The branch main has been updated by mikael:

URL: https://cgit.FreeBSD.org/ports/commit/?id=02c4b2720bb1b5a0c0af5617b1e1dfd2e040f60d

commit 02c4b2720bb1b5a0c0af5617b1e1dfd2e040f60d
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2022-04-19 16:22:38 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2022-04-19 16:42:43 +0000

    www/node: Fix build on armv7
    
    PR:             260651
    Approved by:    portmgr (build fix blanket)
---
 ...h-deps_v8_src_base_platform_platform-freebsd.cc | 49 ----------------------
 .../files/patch-deps_v8_src_codegen_arm_cpu-arm.cc | 18 ++++++++
 2 files changed, 18 insertions(+), 49 deletions(-)

diff --git a/www/node/files/patch-deps_v8_src_base_platform_platform-freebsd.cc b/www/node/files/patch-deps_v8_src_base_platform_platform-freebsd.cc
index c504d7134dd4..3e173b2811f3 100644
--- a/www/node/files/patch-deps_v8_src_base_platform_platform-freebsd.cc
+++ b/www/node/files/patch-deps_v8_src_base_platform_platform-freebsd.cc
@@ -11,52 +11,3 @@
          }
  
          start += ssize;
-@@ -94,6 +94,48 @@ std::vector<OS::SharedLibraryAddress> OS::GetSharedLib
- }
- 
- void OS::SignalCodeMovingGC() {}
-+
-+#ifdef __arm__
-+
-+bool OS::ArmUsingHardFloat() {
-+// GCC versions 4.6 and above define __ARM_PCS or __ARM_PCS_VFP to specify
-+// the Floating Point ABI used (PCS stands for Procedure Call Standard).
-+// We use these as well as a couple of other defines to statically determine
-+// what FP ABI used.
-+// GCC versions 4.4 and below don't support hard-fp.
-+// GCC versions 4.5 may support hard-fp without defining __ARM_PCS or
-+// __ARM_PCS_VFP.
-+
-+#define GCC_VERSION \
-+  (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
-+#if GCC_VERSION >= 40600 && !defined(__clang__)
-+#if defined(__ARM_PCS_VFP)
-+  return true;
-+#else
-+  return false;
-+#endif
-+
-+#elif GCC_VERSION < 40500 && !defined(__clang__)
-+  return false;
-+
-+#else
-+#if defined(__ARM_PCS_VFP)
-+  return true;
-+#elif defined(__ARM_PCS) || defined(__SOFTFP__) || defined(__SOFTFP) || \
-+    !defined(__VFP_FP__)
-+  return false;
-+#else
-+#error \
-+    "Your version of compiler does not report the FP ABI compiled for."     \
-+       "Please report it on this issue"                                        \
-+       "http://code.google.com/p/v8/issues/detail?id=2140"
-+
-+#endif
-+#endif
-+#undef GCC_VERSION
-+}
-+
-+#endif // def __arm__
- 
- void OS::AdjustSchedulingParams() {}
- 
diff --git a/www/node/files/patch-deps_v8_src_codegen_arm_cpu-arm.cc b/www/node/files/patch-deps_v8_src_codegen_arm_cpu-arm.cc
new file mode 100644
index 000000000000..4bbfd3df2781
--- /dev/null
+++ b/www/node/files/patch-deps_v8_src_codegen_arm_cpu-arm.cc
@@ -0,0 +1,18 @@
+--- deps/v8/src/codegen/arm/cpu-arm.cc.orig	2022-04-19 16:03:40 UTC
++++ deps/v8/src/codegen/arm/cpu-arm.cc
+@@ -2,12 +2,15 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
++#include "include/v8config.h"
++
+ // CPU specific code for arm independent of OS goes here.
+ #ifdef __arm__
+ #ifdef __QNXNTO__
+ #include <sys/mman.h>  // for cache flushing.
+ #undef MAP_TYPE
+ #elif V8_OS_FREEBSD
++#include <sys/cdefs.h>
+ #include <machine/sysarch.h>  // for cache flushing
+ #include <sys/types.h>
+ #elif V8_OS_STARBOARD