1--- cargo-crates/v8-146.4.0/v8/BUILD.gn.orig	2006-07-24 01:21:28 UTC
2+++ cargo-crates/v8-146.4.0/v8/BUILD.gn
3@@ -1012,6 +1012,8 @@ external_v8_defines = [
4   "V8_TARGET_OS_MACOS",
5   "V8_TARGET_OS_WIN",
6   "V8_TARGET_OS_CHROMEOS",
7+  "V8_TARGET_OS_FREEBSD",
8+  "V8_TARGET_OS_BSD",
9   "V8_TARGET_ARCH_ARM64",
10   "V8_TARGET_ARCH_PPC64",
11 ]
12@@ -1094,6 +1096,10 @@ if (target_os == "android") {
13 } else if (target_os == "chromeos") {
14   enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ]
15   enabled_external_v8_defines += [ "V8_TARGET_OS_CHROMEOS" ]
16+} else if (target_os == "openbsd") {
17+  enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ]
18+  enabled_external_v8_defines += [ "V8_TARGET_OS_OPENBSD" ]
19+  enabled_external_v8_defines += [ "V8_TARGET_OS_BSD" ]
20 }
21
22 # Some V8_TARGET_ARCH_ defines that affect Api constants (see usages of
23@@ -7130,7 +7136,7 @@ v8_component("v8_libbase") {
24     }
25   }
26
27-  if (is_linux || is_chromeos) {
28+  if ((is_linux || is_chromeos) && !is_bsd) {
29     sources += [
30       "src/base/debug/stack_trace_posix.cc",
31       "src/base/platform/platform-linux.cc",
32@@ -7141,6 +7147,12 @@ v8_component("v8_libbase") {
33       "dl",
34       "rt",
35     ]
36+  } else if (is_freebsd) {
37+    sources += [
38+      "src/base/debug/stack_trace_posix.cc",
39+      "src/base/platform/platform-freebsd.cc",
40+    ]
41+    libs = [ "execinfo" ]
42   } else if (current_os == "aix") {
43     sources += [
44       "src/base/debug/stack_trace_posix.cc",
45