$OpenBSD: patch-v8_BUILD_gn,v 1.7 2018/06/06 07:50:55 robert Exp $
Index: v8/BUILD.gn
--- v8/BUILD.gn.orig
+++ v8/BUILD.gn
@@ -2721,7 +2721,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",
@@ -2741,6 +2741,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 = [
@@ -2905,6 +2911,8 @@ if (v8_monolithic) {
 if (v8_use_snapshot && 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",
