$OpenBSD: patch-v8_BUILD_gn,v 1.5 2017/12/04 13:55:42 robert Exp $
Index: v8/BUILD.gn
--- v8/BUILD.gn.orig
+++ v8/BUILD.gn
@@ -2473,7 +2473,7 @@ v8_component("v8_libbase") {
     ]
   }
 
-  if (is_linux) {
+  if (is_linux && !is_openbsd) {
     sources += [
       "src/base/debug/stack_trace_posix.cc",
       "src/base/platform/platform-linux.cc",
@@ -2493,6 +2493,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 (is_android) {
     if (current_toolchain == host_toolchain) {
       libs = [
@@ -2623,6 +2629,8 @@ v8_source_set("fuzzer_support") {
 if (current_toolchain == v8_snapshot_toolchain) {
   v8_executable("mksnapshot") {
     visibility = [ ":*" ]  # Only targets in this file can depend on this.
+
+    libs = [ "execinfo" ]
 
     sources = [
       "src/snapshot/mksnapshot.cc",
