svn commit: r472854 - in head/www/chromium: . files
Carlos J. Puga Medina
cpm at FreeBSD.org
Wed Jun 20 08:48:21 UTC 2018
Author: cpm
Date: Wed Jun 20 08:48:19 2018
New Revision: 472854
URL: https://svnweb.freebsd.org/changeset/ports/472854
Log:
- Add patch to build chromium with native LLVM 6.0 on FreeBSD >= 1101513
- Disable use_gold flag. If lld is disabled, chromium uses the gold linker instead of lld of bfd. We do not want this to happen.
- Bump PORTREVISION
Added:
head/www/chromium/files/extra-patch-llvm-base (contents, props changed)
head/www/chromium/files/extra-patch-llvm-port (contents, props changed)
head/www/chromium/files/patch-build_config_compiler_compiler.gni (contents, props changed)
Deleted:
head/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni
Modified:
head/www/chromium/Makefile
Modified: head/www/chromium/Makefile
==============================================================================
--- head/www/chromium/Makefile Wed Jun 20 08:37:16 2018 (r472853)
+++ head/www/chromium/Makefile Wed Jun 20 08:48:19 2018 (r472854)
@@ -3,7 +3,7 @@
PORTNAME= chromium
PORTVERSION= 65.0.3325.181
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES?= www
MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
@@ -20,7 +20,6 @@ BUILD_DEPENDS= bash:shells/bash \
.if !defined(GN_ONLY)
BUILD_DEPENDS+= gperf:devel/gperf \
- clang60:devel/llvm60 \
yasm:devel/yasm \
ffmpeg>=3.2.2,1:multimedia/ffmpeg \
flock:sysutils/flock \
@@ -91,8 +90,6 @@ SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper
ALL_TARGET= chrome
INSTALLS_ICONS= yes
-CC= clang60
-CXX= clang++60
.endif
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-clang
@@ -205,6 +202,16 @@ TEST_ALL_TARGET= ${TEST_TARGETS}
TEST_DISTFILES= ${PORTNAME}-${DISTVERSION}-testdata${EXTRACT_SUFX}
.include <bsd.port.options.mk>
+
+.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1101513
+BUILD_DEPENDS+= clang60:devel/llvm60
+CC= clang60
+CXX= clang++60
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-llvm-port
+.else
+BUILD_DEPENDS+= ${LOCALBASE}/bin/ar:devel/binutils
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-llvm-base
+.endif
# TODO: -isystem, would be just as ugly as this approach, but more reliably
# build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set.
Added: head/www/chromium/files/extra-patch-llvm-base
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/chromium/files/extra-patch-llvm-base Wed Jun 20 08:48:19 2018 (r472854)
@@ -0,0 +1,45 @@
+--- build/toolchain/gcc_toolchain.gni.orig 2018-03-20 23:05:14.000000000 +0100
++++ build/toolchain/gcc_toolchain.gni 2018-06-18 20:55:17.080248000 +0200
+@@ -25,6 +25,11 @@
+ 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).
+ #
+@@ -596,13 +601,23 @@
+ }
+
+ 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,
+ [
Added: head/www/chromium/files/extra-patch-llvm-port
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/chromium/files/extra-patch-llvm-port Wed Jun 20 08:48:19 2018 (r472854)
@@ -0,0 +1,44 @@
+--- build/toolchain/gcc_toolchain.gni.orig 2017-06-05 19:03:01 UTC
++++ build/toolchain/gcc_toolchain.gni
+@@ -19,6 +19,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).
+ #
+@@ -548,13 +553,22 @@ 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) {
++ cc = "${toolprefix}clang60"
++ cxx = "${toolprefix}clang++60"
++ ld = cxx
++ readelf = "readelf"
++ ar = "${toolprefix}llvm-ar60"
++ nm = "${toolprefix}llvm-nm60"
++ } 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,
+ [
Added: head/www/chromium/files/patch-build_config_compiler_compiler.gni
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/chromium/files/patch-build_config_compiler_compiler.gni Wed Jun 20 08:48:19 2018 (r472854)
@@ -0,0 +1,11 @@
+--- build/config/compiler/compiler.gni.orig 2018-06-19 18:20:54.692104000 +0200
++++ build/config/compiler/compiler.gni 2018-06-19 18:21:18.098165000 +0200
+@@ -164,7 +164,7 @@
+
+ declare_args() {
+ # Whether to use the gold linker from binutils instead of lld or bfd.
+- use_gold =
++ use_gold = !is_bsd &&
+ (!use_lld && !(is_chromecast && is_linux &&
+ (current_cpu == "arm" || current_cpu == "mipsel")) &&
+ (is_linux && (current_cpu == "x64" || current_cpu == "x86" ||
More information about the svn-ports-all
mailing list