mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
- 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
This commit is contained in:
parent
2346ed56bf
commit
b46d30b601
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=472854
4 changed files with 67 additions and 4 deletions
|
@ -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 \
|
||||
|
|
45
www/chromium/files/extra-patch-llvm-base
Normal file
45
www/chromium/files/extra-patch-llvm-base
Normal file
|
@ -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,
|
||||
[
|
11
www/chromium/files/patch-build_config_compiler_compiler.gni
Normal file
11
www/chromium/files/patch-build_config_compiler_compiler.gni
Normal file
|
@ -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" ||
|
Loading…
Add table
Reference in a new issue