Index: codex-rs/modcargo-crates/v8-146.4.0/build/config/BUILDCONFIG.gn
--- codex-rs/modcargo-crates/v8-146.4.0/build/config/BUILDCONFIG.gn.orig
+++ codex-rs/modcargo-crates/v8-146.4.0/build/config/BUILDCONFIG.gn
@@ -232,6 +232,8 @@ if (host_toolchain == "") {
     host_toolchain = "//build/toolchain/aix:$host_cpu"
   } else if (host_os == "zos") {
     host_toolchain = "//build/toolchain/zos:$host_cpu"
+  } else if (host_os == "openbsd") {
+    host_toolchain = "//build/toolchain/openbsd:clang_$host_cpu"
   } else {
     assert(false, "Unsupported host_os: $host_os")
   }
@@ -276,6 +278,8 @@ if (target_os == "android") {
   _default_toolchain = "//build/toolchain/aix:$target_cpu"
 } else if (target_os == "zos") {
   _default_toolchain = "//build/toolchain/zos:$target_cpu"
+} else if (target_os == "openbsd" || target_os == "freebsd") {
+  _default_toolchain = host_toolchain
 } else if (target_os == "emscripten") {
   # Because it's too hard to remove all targets from //BUILD.gn that do not work with it.
   assert(
@@ -315,11 +319,13 @@ is_android = current_os == "android"
 is_chromeos = current_os == "chromeos"
 is_fuchsia = current_os == "fuchsia"
 is_ios = current_os == "ios"
-is_linux = current_os == "linux"
+is_linux = current_os == "linux" || current_os == "openbsd"
 is_mac = current_os == "mac"
 is_wasm = current_os == "emscripten"
 is_watchos = current_os == "watchos"
 is_win = current_os == "win" || current_os == "winuwp"
+is_openbsd = current_os == "openbsd"
+is_bsd = is_openbsd
 
 is_apple = is_ios || is_mac || is_watchos
 is_posix = !is_win && !is_fuchsia
