git: 22ce49bc4e5c - 2023Q4 - www/iridium: unbreak on i386 by bringing back cpu abi configuration

From: Robert Nagy <rnagy_at_FreeBSD.org>
Date: Thu, 23 Nov 2023 13:34:12 UTC
The branch 2023Q4 has been updated by rnagy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=22ce49bc4e5cc23ffd7c108535e322efdd1a78c5

commit 22ce49bc4e5cc23ffd7c108535e322efdd1a78c5
Author:     Robert Nagy <rnagy@FreeBSD.org>
AuthorDate: 2023-11-23 13:33:37 +0000
Commit:     Robert Nagy <rnagy@FreeBSD.org>
CommitDate: 2023-11-23 13:34:07 +0000

    www/iridium: unbreak on i386 by bringing back cpu abi configuration
    
    (cherry picked from commit 87c727cb27e4415aace7ee8a7731caa43ffc677c)
---
 www/iridium/Makefile                               |  1 +
 .../files/patch-build_config_compiler_BUILD.gn     | 46 +++++++++++++---------
 2 files changed, 29 insertions(+), 18 deletions(-)

diff --git a/www/iridium/Makefile b/www/iridium/Makefile
index d1254ebc5ea3..ce16f530655a 100644
--- a/www/iridium/Makefile
+++ b/www/iridium/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	iridium
 PORTVERSION=	2023.11.119
+PORTREVISION=	1
 CATEGORIES=	www wayland
 MASTER_SITES=	https://downloads.iridiumbrowser.de/source/
 PKGNAMESUFFIX=	-browser
diff --git a/www/iridium/files/patch-build_config_compiler_BUILD.gn b/www/iridium/files/patch-build_config_compiler_BUILD.gn
index cb46b6e1bfc4..8fff2f596bfd 100644
--- a/www/iridium/files/patch-build_config_compiler_BUILD.gn
+++ b/www/iridium/files/patch-build_config_compiler_BUILD.gn
@@ -1,4 +1,4 @@
---- build/config/compiler/BUILD.gn.orig	2023-11-22 14:00:11 UTC
+--- build/config/compiler/BUILD.gn.orig	2023-11-23 13:31:13 UTC
 +++ build/config/compiler/BUILD.gn
 @@ -196,7 +196,7 @@ declare_args() {
    # This greatly reduces the size of debug builds, at the cost of
@@ -27,7 +27,17 @@
  }
  
  # compiler ---------------------------------------------------------------------
-@@ -505,6 +508,10 @@ config("compiler") {
+@@ -314,7 +317,9 @@ config("compiler") {
+ 
+   configs += [
+     # See the definitions below.
++    ":clang_revision",
+     ":rustc_revision",
++    ":compiler_cpu_abi",
+     ":compiler_codegen",
+     ":compiler_deterministic",
+   ]
+@@ -505,6 +510,10 @@ config("compiler") {
      }
    }
  
@@ -38,7 +48,7 @@
    # Linux-specific compiler flags setup.
    # ------------------------------------
    if (use_gold) {
-@@ -1091,7 +1098,7 @@ config("compiler_cpu_abi") {
+@@ -1091,7 +1100,7 @@ config("compiler_cpu_abi") {
          ]
        }
      } else if (current_cpu == "arm") {
@@ -47,7 +57,7 @@
            !(is_chromeos_lacros && is_chromeos_device)) {
          cflags += [ "--target=arm-linux-gnueabihf" ]
          ldflags += [ "--target=arm-linux-gnueabihf" ]
-@@ -1106,7 +1113,7 @@ config("compiler_cpu_abi") {
+@@ -1106,7 +1115,7 @@ config("compiler_cpu_abi") {
          cflags += [ "-mtune=$arm_tune" ]
        }
      } else if (current_cpu == "arm64") {
@@ -56,7 +66,7 @@
            !(is_chromeos_lacros && is_chromeos_device)) {
          cflags += [ "--target=aarch64-linux-gnu" ]
          ldflags += [ "--target=aarch64-linux-gnu" ]
-@@ -1452,6 +1459,27 @@ config("compiler_deterministic") {
+@@ -1452,6 +1461,27 @@ config("compiler_deterministic") {
    }
  }
  
@@ -84,7 +94,7 @@
  config("rustc_revision") {
    if (rustc_revision != "") {
      # Similar to the above config, this is here so that all files get recompiled
-@@ -1725,7 +1753,7 @@ config("default_warnings") {
+@@ -1725,7 +1755,7 @@ config("default_warnings") {
          ]
        }
  
@@ -93,7 +103,7 @@
          cflags += [
            # TODO(crbug.com/1343975) Evaluate and possibly enable.
            "-Wno-deprecated-builtins",
-@@ -1897,7 +1925,7 @@ config("no_chromium_code") {
+@@ -1897,7 +1927,7 @@ config("no_chromium_code") {
        # third-party libraries.
        "-Wno-c++11-narrowing",
      ]
@@ -102,7 +112,7 @@
        cflags += [
          # Disabled for similar reasons as -Wunused-variable.
          "-Wno-unused-but-set-variable",
-@@ -2200,8 +2228,7 @@ config("default_stack_frames") {
+@@ -2200,8 +2230,7 @@ config("default_stack_frames") {
  }
  
  # Default "optimization on" config.
@@ -112,7 +122,7 @@
    if (is_win) {
      if (chrome_pgo_phase != 2) {
        # Favor size over speed, /O1 must be before the common flags.
-@@ -2260,8 +2287,7 @@ config("xoptimize") {
+@@ -2260,8 +2289,7 @@ config("xoptimize") {
  }
  
  # Turn off optimizations.
@@ -122,7 +132,7 @@
    if (is_win) {
      cflags = [
        "/Od",  # Disable optimization.
-@@ -2301,8 +2327,7 @@ config("xno_optimize") {
+@@ -2301,8 +2329,7 @@ config("xno_optimize") {
  # Turns up the optimization level. On Windows, this implies whole program
  # optimization and link-time code generation which is very expensive and should
  # be used sparingly.
@@ -132,7 +142,7 @@
    if (is_nacl && is_nacl_irt) {
      # The NaCl IRT is a special case and always wants its own config.
      # Various components do:
-@@ -2335,8 +2360,7 @@ config("xoptimize_max") {
+@@ -2335,8 +2362,7 @@ config("xoptimize_max") {
  #
  # TODO(crbug.com/621335) - rework how all of these configs are related
  # so that we don't need this disclaimer.
@@ -142,7 +152,7 @@
    if (is_nacl && is_nacl_irt) {
      # The NaCl IRT is a special case and always wants its own config.
      # Various components do:
-@@ -2362,8 +2386,7 @@ config("xoptimize_speed") {
+@@ -2362,8 +2388,7 @@ config("xoptimize_speed") {
    }
  }
  
@@ -152,7 +162,7 @@
    cflags = [ "-O1" ] + common_optimize_on_cflags
    rustflags = [ "-Copt-level=1" ]
    ldflags = common_optimize_on_ldflags
-@@ -2431,7 +2454,7 @@ config("afdo_optimize_size") {
+@@ -2431,7 +2456,7 @@ config("afdo_optimize_size") {
  # There are some targeted places that AFDO regresses, so we provide a separate
  # config to allow AFDO to be disabled per-target.
  config("afdo") {
@@ -161,7 +171,7 @@
      cflags = []
      if (clang_emit_debug_info_for_profiling) {
        # Add the following flags to generate debug info for profiling.
-@@ -2458,7 +2481,7 @@ config("afdo") {
+@@ -2458,7 +2483,7 @@ config("afdo") {
        cflags += [ "-Wno-backend-plugin" ]
        inputs = [ _clang_sample_profile ]
      }
@@ -170,7 +180,7 @@
      cflags = [ "-fauto-profile=${auto_profile_path}" ]
      inputs = [ auto_profile_path ]
    }
-@@ -2496,8 +2519,7 @@ config("win_pdbaltpath") {
+@@ -2496,8 +2521,7 @@ config("win_pdbaltpath") {
  }
  
  # Full symbols.
@@ -180,7 +190,7 @@
    rustflags = []
    if (is_win) {
      if (is_clang) {
-@@ -2623,7 +2645,8 @@ config("xsymbols") {
+@@ -2623,7 +2647,8 @@ config("xsymbols") {
      configs += [ "//build/config:compress_debug_sections" ]
    }
  
@@ -190,7 +200,7 @@
      if (is_apple) {
        # TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
        # Make sure we don't use constructor homing on mac.
-@@ -2646,8 +2669,7 @@ config("xsymbols") {
+@@ -2646,8 +2671,7 @@ config("xsymbols") {
  # Minimal symbols.
  # This config guarantees to hold symbol for stack trace which are shown to user
  # when crash happens in unittests running on buildbot.
@@ -200,7 +210,7 @@
    rustflags = []
    if (is_win) {
      # Functions, files, and line tables only.
-@@ -2732,8 +2754,7 @@ config("xminimal_symbols") {
+@@ -2732,8 +2756,7 @@ config("xminimal_symbols") {
  # This configuration contains function names only. That is, the compiler is
  # told to not generate debug information and the linker then just puts function
  # names in the final debug information.