openbsd-ports/www/iridium/patches/patch-build_config_BUILDCONFIG_gn

47 lines
1.9 KiB
Plaintext

$OpenBSD: patch-build_config_BUILDCONFIG_gn,v 1.10 2020/11/05 15:49:49 robert Exp $
Index: build/config/BUILDCONFIG.gn
--- build/config/BUILDCONFIG.gn.orig
+++ build/config/BUILDCONFIG.gn
@@ -131,10 +131,10 @@ declare_args() {
is_official_build = false
# Whether we're a traditional desktop unix.
- is_desktop_linux = current_os == "linux"
+ is_desktop_linux = current_os == "linux" || current_os == "openbsd"
# Set to true when compiling with the Clang compiler.
- is_clang = current_os != "linux" ||
+ is_clang = current_os != "linux" || curent_os == "openbsd" ||
(current_cpu != "s390x" && current_cpu != "s390" &&
current_cpu != "ppc64" && current_cpu != "ppc" &&
current_cpu != "mips" && current_cpu != "mips64")
@@ -213,6 +213,8 @@ if (host_toolchain == "") {
}
} else if (host_os == "aix") {
host_toolchain = "//build/toolchain/aix:$host_cpu"
+ } else if (host_os == "openbsd") {
+ host_toolchain = "//build/toolchain/openbsd:clang_$host_cpu"
} else {
assert(false, "Unsupported host_os: $host_os")
}
@@ -254,6 +256,8 @@ if (target_os == "android") {
_default_toolchain = "//build/toolchain/win:uwp_$target_cpu"
} else if (target_os == "aix") {
_default_toolchain = "//build/toolchain/aix:$target_cpu"
+} else if (target_os == "openbsd") {
+ _default_toolchain = host_toolchain
} else {
assert(false, "Unsupported target_os: $target_os")
}
@@ -288,7 +292,8 @@ is_android = current_os == "android"
is_chromeos = current_os == "chromeos"
is_fuchsia = current_os == "fuchsia"
is_ios = current_os == "ios"
-is_linux = current_os == "chromeos" || current_os == "linux"
+is_linux = current_os == "chromeos" || current_os == "linux" || current_os == "openbsd"
+is_openbsd = current_os == "openbsd"
is_mac = current_os == "mac"
is_nacl = current_os == "nacl"
is_win = current_os == "win" || current_os == "winuwp"