Skip to content

Commit

Permalink
www/iridium: unbreak on i386 by bringing back cpu abi configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Nagy authored and Robert Nagy committed Nov 23, 2023
1 parent b6f53ab commit 87c727c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 18 deletions.
1 change: 1 addition & 0 deletions 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
Expand Down
46 changes: 28 additions & 18 deletions 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
Expand Down Expand Up @@ -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") {
}
}

Expand All @@ -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") {
Expand All @@ -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") {
Expand All @@ -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") {
}
}

Expand Down Expand Up @@ -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") {
]
}

Expand All @@ -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",
]
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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") {
}
}

Expand All @@ -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") {
Expand All @@ -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 ]
}
Expand All @@ -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.
Expand All @@ -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" ]
}

Expand All @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit 87c727c

Please sign in to comment.