ports/devel/electron4/files/patch-build_toolchain_gcc__toolchain.gni
Luca Pizzamiglio 2f40d531c4 devel/electron4: Add electron 4.2.2
Finally, after a long wait, an electron port for FreeBSD lands in the
portstree.

A huge thanks to everyone contributed to this huge effort and to the
maintainer that is willing to take the burden of the maintainership!
2019-05-28 09:12:02 +00:00

45 lines
1.2 KiB
Text

--- build/toolchain/gcc_toolchain.gni.orig 2019-03-15 06:36:56 UTC
+++ build/toolchain/gcc_toolchain.gni
@@ -25,6 +25,11 @@ analyzer_wrapper =
rebase_path("//build/toolchain/clang_static_analyzer_wrapper.py",
root_build_dir) + " --mode=clang"
+declare_args() {
+ extra_cxxflags = ""
+ extra_ldflags = ""
+}
+
# This template defines a toolchain for something that works like gcc
# (including clang).
#
@@ -604,13 +609,23 @@ template("clang_toolchain") {
}
gcc_toolchain(target_name) {
- prefix = rebase_path("$clang_base_path/bin", root_build_dir)
- cc = "$prefix/clang"
- cxx = "$prefix/clang++"
- ld = cxx
- readelf = "${toolprefix}readelf"
- ar = "${prefix}/llvm-ar"
- nm = "${toolprefix}nm"
+ if (is_bsd) {
+ prefix = "/usr/local/bin"
+ cc = "cc"
+ cxx = "c++"
+ ld = cxx
+ readelf = "readelf"
+ ar = "${prefix}/ar"
+ nm = "${toolprefix}nm"
+ } else {
+ prefix = rebase_path("$clang_base_path/bin", root_build_dir)
+ cc = "$prefix/clang"
+ cxx = "$prefix/clang++"
+ ld = cxx
+ readelf = "${toolprefix}readelf"
+ ar = "${prefix}/llvm-ar"
+ nm = "${toolprefix}nm"
+ }
forward_variables_from(invoker,
[