diff options
author | cpm <cpm@FreeBSD.org> | 2018-06-20 16:48:19 +0800 |
---|---|---|
committer | cpm <cpm@FreeBSD.org> | 2018-06-20 16:48:19 +0800 |
commit | deae70a83a25f325354754aac1f99ae139b0b2ef (patch) | |
tree | ec8c89791b371c53f822cd0c60a64287629cd867 | |
parent | 7be9bf527509a667eec1422b15560f783dfee18c (diff) | |
download | freebsd-ports-gnome-deae70a83a25f325354754aac1f99ae139b0b2ef.tar.gz freebsd-ports-gnome-deae70a83a25f325354754aac1f99ae139b0b2ef.tar.zst freebsd-ports-gnome-deae70a83a25f325354754aac1f99ae139b0b2ef.zip |
- 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
-rw-r--r-- | www/chromium/Makefile | 15 | ||||
-rw-r--r-- | www/chromium/files/extra-patch-llvm-base | 45 | ||||
-rw-r--r-- | www/chromium/files/extra-patch-llvm-port (renamed from www/chromium/files/patch-build_toolchain_gcc__toolchain.gni) | 0 | ||||
-rw-r--r-- | www/chromium/files/patch-build_config_compiler_compiler.gni | 11 |
4 files changed, 67 insertions, 4 deletions
diff --git a/www/chromium/Makefile b/www/chromium/Makefile index bc1923a85ac9..e553641159cb 100644 --- a/www/chromium/Makefile +++ b/www/chromium/Makefile @@ -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 @@ -206,6 +203,16 @@ 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. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ diff --git a/www/chromium/files/extra-patch-llvm-base b/www/chromium/files/extra-patch-llvm-base new file mode 100644 index 000000000000..9a32190d6ad9 --- /dev/null +++ b/www/chromium/files/extra-patch-llvm-base @@ -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, + [ diff --git a/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni b/www/chromium/files/extra-patch-llvm-port index 1e59c7000b4c..1e59c7000b4c 100644 --- a/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni +++ b/www/chromium/files/extra-patch-llvm-port diff --git a/www/chromium/files/patch-build_config_compiler_compiler.gni b/www/chromium/files/patch-build_config_compiler_compiler.gni new file mode 100644 index 000000000000..a76b1dce92ce --- /dev/null +++ b/www/chromium/files/patch-build_config_compiler_compiler.gni @@ -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" || |