--- build/toolchain/gcc_toolchain.gni.orig 2026-09-13 16:45:17 UTC +++ build/toolchain/gcc_toolchain.gni @@ -46,6 +46,11 @@ if (enable_resource_allowlist_generation) { "enable_resource_allowlist_generation=true does not work for target_os=$target_os") } +declare_args() { + extra_cxxflags = "" + extra_ldflags = "" +} + # This template defines a toolchain for something that works like gcc # (including clang). # @@ -415,7 +420,8 @@ template("single_gcc_toolchain") { # Add ar to inputs if it's not from $PATH. Some toolchains leave # |ar| empty during toolchain setup, so guard get_path_info() here. - if (ar != "" && get_path_info(ar, "file") != ar) { + # Skipped on BSD: tool("alink") inputs not supported by ports gn. + if (!is_bsd && ar != "" && get_path_info(ar, "file") != ar) { inputs = [ get_path_info(rebase_path(ar, ".", root_out_dir), "abspath") ] }