Index: modcargo-crates/v8-149.2.0/v8/BUILD.gn
--- modcargo-crates/v8-149.2.0/v8/BUILD.gn.orig
+++ modcargo-crates/v8-149.2.0/v8/BUILD.gn
@@ -1053,6 +1053,9 @@ external_v8_defines = [
   "V8_TARGET_OS_MACOS",
   "V8_TARGET_OS_WIN",
   "V8_TARGET_OS_CHROMEOS",
+  "V8_TARGET_OS_FREEBSD",
+  "V8_TARGET_OS_OPENBSD",
+  "V8_TARGET_OS_BSD",
   "V8_TARGET_ARCH_ARM64",
   "V8_TARGET_ARCH_PPC64",
   "V8_TARGET_ARCH_MIPS64",
@@ -1137,6 +1140,10 @@ if (target_os == "android") {
 } else if (target_os == "chromeos") {
   enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ]
   enabled_external_v8_defines += [ "V8_TARGET_OS_CHROMEOS" ]
+} else if (target_os == "openbsd") {
+  enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ]
+  enabled_external_v8_defines += [ "V8_TARGET_OS_OPENBSD" ]
+  enabled_external_v8_defines += [ "V8_TARGET_OS_BSD" ]
 }
 
 # Some V8_TARGET_ARCH_ defines that affect Api constants (see usages of
@@ -1804,7 +1811,7 @@ config("toolchain") {
 
   if (is_clang) {
     cflags += [ "-Wunreachable-code" ]
-    if (v8_current_cpu != "ppc64" && v8_current_cpu != "s390x") {
+    if (v8_current_cpu != "ppc64" && v8_current_cpu != "s390x" && !is_bsd) {
       cflags += [ "-Wlifetime-safety-permissive" ]
     }
 
@@ -1907,7 +1914,7 @@ config("strict_warnings") {
       cflags += [ "-Wshorten-64-to-32" ]
     }
     cflags += [ "-Wmissing-field-initializers" ]
-    if (v8_current_cpu != "ppc64" && v8_current_cpu != "s390x") {
+    if (v8_current_cpu != "ppc64" && v8_current_cpu != "s390x" && !is_bsd) {
       cflags += [ "-Wunnecessary-virtual-specifier" ]
     }
   }
@@ -2830,6 +2837,13 @@ template("run_mksnapshot") {
       if (!v8_enable_builtins_profiling && v8_enable_builtins_reordering) {
         args += [ "--reorder-builtins" ]
       }
+
+      if (v8_current_cpu == "x86") {
+        args -= [
+          "--abort-on-bad-builtin-profile-data",
+        ]
+      }
+      
     }
 
     # This is needed to distinguish between generating code for the simulator
@@ -7271,7 +7285,7 @@ v8_component("v8_libbase") {
     }
   }
 
-  if (is_linux || is_chromeos) {
+  if ((is_linux || is_chromeos) && !is_bsd) {
     sources += [
       "src/base/debug/stack_trace_posix.cc",
       "src/base/platform/platform-linux.cc",
@@ -7282,6 +7296,12 @@ v8_component("v8_libbase") {
       "dl",
       "rt",
     ]
+  } else if (is_openbsd) {
+    sources += [
+      "src/base/debug/stack_trace_posix.cc",
+      "src/base/platform/platform-openbsd.cc",
+    ]
+    libs = [ "execinfo" ]
   } else if (current_os == "aix") {
     sources += [
       "src/base/debug/stack_trace_posix.cc",
