diff --git a/www/chromium/files/patch-v8_BUILD.gn b/www/chromium/files/patch-v8_BUILD.gn index c1b88cd54d2b..fc6fac220522 100644 --- a/www/chromium/files/patch-v8_BUILD.gn +++ b/www/chromium/files/patch-v8_BUILD.gn @@ -1,58 +1,58 @@ ---- v8/BUILD.gn.orig 2023-10-14 11:56:57 UTC +--- v8/BUILD.gn.orig 2023-10-19 07:26:17 UTC +++ v8/BUILD.gn @@ -1417,6 +1417,14 @@ config("toolchain") { } else if (target_os == "chromeos") { defines += [ "V8_HAVE_TARGET_OS" ] defines += [ "V8_TARGET_OS_CHROMEOS" ] + } else if (target_os == "openbsd") { + defines += [ "V8_HAVE_TARGET_OS" ] + defines += [ "V8_TARGET_OS_OPENBSD" ] + defines += [ "V8_TARGET_OS_BSD" ] + } else if (target_os == "freebsd") { + defines += [ "V8_HAVE_TARGET_OS" ] + defines += [ "V8_TARGET_OS_FREEBSD" ] + defines += [ "V8_TARGET_OS_BSD" ] } # TODO(infra): Support v8_enable_prof on Windows. -@@ -2380,6 +2388,12 @@ template("run_mksnapshot") { +@@ -2378,6 +2386,12 @@ 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", ++ ] ++ } } -+ if (v8_current_cpu == "x86") { -+ args -= [ -+ "--abort-on-bad-builtin-profile-data", -+ ] -+ } -+ # This is needed to distinguish between generating code for the simulator - # and cross-compiling. The latter may need to run code on the host with the - # simulator but cannot use simulator-specific instructions. @@ -6111,7 +6125,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", @@ -6122,6 +6136,18 @@ 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_freebsd) { + sources += [ + "src/base/debug/stack_trace_posix.cc", + "src/base/platform/platform-freebsd.cc", + ] + libs = [ "execinfo" ] } else if (current_os == "aix") { sources += [ "src/base/debug/stack_trace_posix.cc", diff --git a/www/ungoogled-chromium/files/patch-v8_BUILD.gn b/www/ungoogled-chromium/files/patch-v8_BUILD.gn index c1b88cd54d2b..ab423bdc412a 100644 --- a/www/ungoogled-chromium/files/patch-v8_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-v8_BUILD.gn @@ -1,58 +1,58 @@ ---- v8/BUILD.gn.orig 2023-10-14 11:56:57 UTC +--- v8/BUILD.gn.orig 2023-10-19 07:19:47 UTC +++ v8/BUILD.gn @@ -1417,6 +1417,14 @@ config("toolchain") { } else if (target_os == "chromeos") { defines += [ "V8_HAVE_TARGET_OS" ] defines += [ "V8_TARGET_OS_CHROMEOS" ] + } else if (target_os == "openbsd") { + defines += [ "V8_HAVE_TARGET_OS" ] + defines += [ "V8_TARGET_OS_OPENBSD" ] + defines += [ "V8_TARGET_OS_BSD" ] + } else if (target_os == "freebsd") { + defines += [ "V8_HAVE_TARGET_OS" ] + defines += [ "V8_TARGET_OS_FREEBSD" ] + defines += [ "V8_TARGET_OS_BSD" ] } # TODO(infra): Support v8_enable_prof on Windows. -@@ -2380,6 +2388,12 @@ template("run_mksnapshot") { +@@ -2378,6 +2386,12 @@ 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", ++ ] ++ } } -+ if (v8_current_cpu == "x86") { -+ args -= [ -+ "--abort-on-bad-builtin-profile-data", -+ ] -+ } -+ # This is needed to distinguish between generating code for the simulator - # and cross-compiling. The latter may need to run code on the host with the - # simulator but cannot use simulator-specific instructions. @@ -6111,7 +6125,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", @@ -6122,6 +6136,18 @@ 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_freebsd) { + sources += [ + "src/base/debug/stack_trace_posix.cc", + "src/base/platform/platform-freebsd.cc", + ] + libs = [ "execinfo" ] } else if (current_os == "aix") { sources += [ "src/base/debug/stack_trace_posix.cc",