git: 631589e7e2c3 - main - www/*chromium: unbreak configure on i386 if PGO is not used

From: Robert Nagy <rnagy_at_FreeBSD.org>
Date: Thu, 19 Oct 2023 07:28:53 UTC
The branch main has been updated by rnagy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=631589e7e2c357e1ca88a8ef7b0112b1b7d376cc

commit 631589e7e2c357e1ca88a8ef7b0112b1b7d376cc
Author:     Robert Nagy <rnagy@FreeBSD.org>
AuthorDate: 2023-10-19 07:28:14 +0000
Commit:     Robert Nagy <rnagy@FreeBSD.org>
CommitDate: 2023-10-19 07:28:14 +0000

    www/*chromium: unbreak configure on i386 if PGO is not used
---
 www/chromium/files/patch-v8_BUILD.gn           | 20 ++++++++++----------
 www/ungoogled-chromium/files/patch-v8_BUILD.gn | 20 ++++++++++----------
 2 files changed, 20 insertions(+), 20 deletions(-)

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,4 +1,4 @@
---- 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") {
@@ -15,19 +15,19 @@
    }
  
    # 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") {
      }
    }
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,4 +1,4 @@
---- 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") {
@@ -15,19 +15,19 @@
    }
  
    # 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") {
      }
    }