Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jan 2019 16:38:16 +0000 (UTC)
From:      "Carlos J. Puga Medina" <cpm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r489815 - in head/www/iridium: . files
Message-ID:  <201901091638.x09GcGV1041910@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cpm
Date: Wed Jan  9 16:38:15 2019
New Revision: 489815
URL: https://svnweb.freebsd.org/changeset/ports/489815

Log:
  - Add USES=gl
  - Enable jumbo build to improve compilation times
  - Fix loading of the chromium binary on FreeBSD-HEAD
  - Fix jumbo build with the SNDIO option enabled
  - Add -Wl,-znotext for i386
  - Bump PORTREVISION
  
  MFH:		2019Q1

Added:
  head/www/iridium/files/patch-build_config_compiler_BUILD.gn   (contents, props changed)
  head/www/iridium/files/patch-build_linux_chrome.map   (contents, props changed)
  head/www/iridium/files/patch-build_toolchain_gcc_toolchain.gni   (contents, props changed)
  head/www/iridium/files/patch-mojo_public_c_system_thunks.cc   (contents, props changed)
Deleted:
  head/www/iridium/files/extra-patch-llvm-base
  head/www/iridium/files/patch-chrome_browser_diagnostics_diagnostics__writer.cc
Modified:
  head/www/iridium/Makefile
  head/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc
  head/www/iridium/files/patch-chrome_browser_diagnostics_diagnostics__writer.h

Modified: head/www/iridium/Makefile
==============================================================================
--- head/www/iridium/Makefile	Wed Jan  9 16:28:18 2019	(r489814)
+++ head/www/iridium/Makefile	Wed Jan  9 16:38:15 2019	(r489815)
@@ -3,7 +3,7 @@
 
 PORTNAME=	iridium
 PORTVERSION=	2018.5.67
-PORTREVISION=	6
+PORTREVISION=	7
 CATEGORIES=	www
 MASTER_SITES=	https://downloads.iridiumbrowser.de/source/
 PKGNAMESUFFIX=	-browser
@@ -21,6 +21,7 @@ BUILD_DEPENDS=	gperf:devel/gperf \
 		bash:shells/bash \
 		flock:sysutils/flock \
 		node:www/node \
+		${LOCALBASE}/bin/ar:devel/binutils \
 		${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \
 		${LOCALBASE}/share/usbids/usb.ids:misc/usbids \
 		${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \
@@ -61,7 +62,7 @@ RUN_DEPENDS=	xdg-open:devel/xdg-utils \
 
 ONLY_FOR_ARCHS=	amd64 i386
 
-USES=		bison desktop-file-utils gnome jpeg localbase:ldflags ninja \
+USES=		bison desktop-file-utils gl gnome jpeg localbase:ldflags ninja \
 		perl5 pkgconfig python:2.7,build shebangfix tar:xz
 USE_GL=		gl
 USE_LDCONFIG=	${DATADIR}
@@ -86,6 +87,7 @@ GN_ARGS+=	clang_use_chrome_plugins=false \
 		enable_remoting=false \
 		fieldtrial_testing_like_official_build=true \
 		is_clang=true \
+		jumbo_file_merge_limit=8 \
 		toolkit_views=true \
 		treat_warnings_as_errors=false \
 		use_allocator="none" \
@@ -94,6 +96,7 @@ GN_ARGS+=	clang_use_chrome_plugins=false \
 		use_bundled_fontconfig=false \
 		use_custom_libcxx=false \
 		use_gnome_keyring=false \
+		use_jumbo_build=true \
 		use_gtk3=true \
 		use_lld=true \
 		use_sysroot=false \
@@ -162,8 +165,8 @@ SNDIO_LIB_DEPENDS=	libsndio.so:audio/sndio
 SNDIO_VARS=		GN_ARGS+=use_sndio=true
 SNDIO_VARS_OFF=		GN_ARGS+=use_sndio=false
 
-BUILD_DEPENDS+=	${LOCALBASE}/bin/ar:devel/binutils
-EXTRA_PATCHES+=	${FILESDIR}/extra-patch-llvm-base
+# Allow relocations against read-only segments (override lld default)
+LDFLAGS_i386=	-Wl,-znotext
 
 # 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/iridium/files/patch-build_config_compiler_BUILD.gn
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/iridium/files/patch-build_config_compiler_BUILD.gn	Wed Jan  9 16:38:15 2019	(r489815)
@@ -0,0 +1,76 @@
+--- build/config/compiler/BUILD.gn.orig	2018-05-09 21:05:34.000000000 +0200
++++ build/config/compiler/BUILD.gn	2019-01-07 22:08:08.301170000 +0100
+@@ -51,7 +51,7 @@
+   # only two architectures that are currently checked in). Turn this off when
+   # you are using a custom toolchain and need to control -B in cflags.
+   linux_use_bundled_binutils =
+-      linux_use_bundled_binutils_override && is_linux &&
++      linux_use_bundled_binutils_override && (is_linux && !is_bsd) &&
+       (current_cpu == "x64" || current_cpu == "x86")
+   binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin",
+                               root_build_dir)
+@@ -375,8 +375,6 @@
+       "-Wl,-z,relro",
+     ]
+     if (!using_sanitizer) {
+-      ldflags += [ "-Wl,-z,defs" ]
+-
+       # Functions interposed by the sanitizers can make ld think
+       # that some libraries aren't needed when they actually are,
+       # http://crbug.com/234010. As workaround, disable --as-needed.
+@@ -467,7 +465,7 @@
+   # TODO(hans): Remove this once Clang generates better optimized debug info by
+   # default. https://crbug.com/765793
+   if (is_clang && !is_nacl && current_toolchain == host_toolchain &&
+-      target_os != "chromeos") {
++      target_os != "chromeos" && !is_bsd) {
+     cflags += [
+       "-Xclang",
+       "-mllvm",
+@@ -708,7 +706,7 @@
+         cflags += [ "-mtune=$arm_tune" ]
+       }
+     } else if (current_cpu == "arm64") {
+-      if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
++      if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) {
+         cflags += [ "--target=aarch64-linux-gnu" ]
+         ldflags += [ "--target=aarch64-linux-gnu" ]
+       }
+@@ -1387,10 +1385,6 @@
+ 
+         # TODO(hans): https://crbug.com/766891
+         "-Wno-null-pointer-arithmetic",
+-
+-        # Ignore warnings about MSVC optimization pragmas.
+-        # TODO(thakis): Only for no_chromium_code? http://crbug.com/505314
+-        "-Wno-ignored-pragma-optimize",
+       ]
+       if (llvm_force_head_revision) {
+         cflags += [
+@@ -2096,7 +2090,7 @@
+         # [1] crrev.com/a81d5ade0b043208e06ad71a38bcf9c348a1a52f
+         cflags += [ "-gdwarf-3" ]
+       }
+-      cflags += [ "-g2" ]
++      cflags += [ "-g0" ]
+     }
+     if (use_debug_fission && !is_nacl) {
+       cflags += [ "-gsplit-dwarf" ]
+@@ -2110,7 +2104,7 @@
+     # DWARF info may be corrupt; offsets in a range list entry are in different
+     # sections" there.  Maybe just a bug in nacl_switch_32.S.
+     if (!is_mac && !is_ios && !is_nacl && target_cpu != "x86" &&
+-        (use_gold || use_lld)) {
++        (use_gold || use_lld) && !is_bsd) {
+       if (is_clang) {
+         # This flag enables the GNU-format pubnames and pubtypes sections,
+         # which lld needs in order to generate a correct GDB index.
+@@ -2207,7 +2201,7 @@
+   if (!is_win && fatal_linker_warnings &&
+       !(is_chromeos && current_cpu == "arm") &&
+       !(is_android && use_order_profiling) && !is_mac && !is_ios &&
+-      current_os != "aix") {
++      current_os != "aix" && !is_bsd) {
+     # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
+     # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1
+     # crbug.com/485542

Added: head/www/iridium/files/patch-build_linux_chrome.map
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/iridium/files/patch-build_linux_chrome.map	Wed Jan  9 16:38:15 2019	(r489815)
@@ -0,0 +1,29 @@
+--- build/linux/chrome.map.orig	2019-01-07 21:40:23.691384000 +0100
++++ build/linux/chrome.map	2019-01-07 21:43:11.729540000 +0100
+@@ -1,4 +1,7 @@
+ {
++local:
++  *;
++
+ global:
+   __bss_start;
+   __data_start;
+@@ -20,6 +23,10 @@
+   # Program entry point.
+   _start;
+ 
++  # FreeBSD specific variables.
++  __progname;
++  environ;
++
+   # Memory allocation symbols.  We want chrome and any libraries to
+   # share the same heap, so it is correct to export these symbols.
+   calloc;
+@@ -81,7 +88,4 @@
+   localtime64;
+   localtime64_r;
+   localtime_r;
+-
+-local:
+-  *;
+ };

Added: head/www/iridium/files/patch-build_toolchain_gcc_toolchain.gni
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/iridium/files/patch-build_toolchain_gcc_toolchain.gni	Wed Jan  9 16:38:15 2019	(r489815)
@@ -0,0 +1,45 @@
+--- build/toolchain/gcc_toolchain.gni.orig	2018-05-09 21:05:34.000000000 +0200
++++ build/toolchain/gcc_toolchain.gni	2019-01-07 22:08:08.298662000 +0100
+@@ -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).
+ #
+@@ -608,13 +613,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,
+                            [

Modified: head/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc
==============================================================================
--- head/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc	Wed Jan  9 16:28:18 2019	(r489814)
+++ head/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc	Wed Jan  9 16:38:15 2019	(r489815)
@@ -1,6 +1,6 @@
---- chrome/app/chrome_main_delegate.cc.orig	2018-02-24 16:25:09.000000000 +0100
-+++ chrome/app/chrome_main_delegate.cc	2018-03-03 20:07:40.484969000 +0100
-@@ -98,7 +98,7 @@
+--- chrome/app/chrome_main_delegate.cc.orig	2018-05-09 21:05:35.000000000 +0200
++++ chrome/app/chrome_main_delegate.cc	2019-01-07 21:51:11.921543000 +0100
+@@ -97,7 +97,7 @@
  #include "chrome/app/shutdown_signal_handlers_posix.h"
  #endif
  
@@ -9,7 +9,7 @@
  #include "components/nacl/common/nacl_paths.h"
  #include "components/nacl/zygote/nacl_fork_delegate_linux.h"
  #endif
-@@ -133,7 +133,7 @@
+@@ -131,7 +131,7 @@
  #include "v8/include/v8.h"
  #endif
  
@@ -18,7 +18,7 @@
  #include "base/environment.h"
  #endif
  
-@@ -238,7 +238,7 @@
+@@ -236,7 +236,7 @@
  
  #endif  // defined(OS_WIN)
  
@@ -27,7 +27,7 @@
  void AdjustLinuxOOMScore(const std::string& process_type) {
    // Browsers and zygotes should still be killable, but killed last.
    const int kZygoteScore = 0;
-@@ -407,7 +407,7 @@
+@@ -404,7 +404,7 @@
    std::string process_type =
        command_line->GetSwitchValueASCII(switches::kProcessType);
  
@@ -36,7 +36,7 @@
    // On Linux, Chrome does not support running multiple copies under different
    // DISPLAYs, so the profile directory can be specified in the environment to
    // support the virtual desktop use-case.
-@@ -581,7 +581,7 @@
+@@ -576,7 +576,7 @@
  #if defined(OS_CHROMEOS)
    chromeos::RegisterPathProvider();
  #endif
@@ -45,25 +45,7 @@
    nacl::RegisterPathProvider();
  #endif
  
-@@ -603,7 +603,7 @@
-       std::string format_str =
-           command_line.GetSwitchValueASCII(switches::kDiagnosticsFormat);
-       if (format_str == "machine") {
--        format = diagnostics::DiagnosticsWriter::MACHINE;
-+        format = diagnostics::DiagnosticsWriter::THEMACHINE;
-       } else if (format_str == "log") {
-         format = diagnostics::DiagnosticsWriter::LOG;
-       } else {
-@@ -653,7 +653,7 @@
-       std::string format_str =
-           command_line.GetSwitchValueASCII(switches::kDiagnosticsFormat);
-       if (format_str == "machine") {
--        format = diagnostics::DiagnosticsWriter::MACHINE;
-+        format = diagnostics::DiagnosticsWriter::THEMACHINE;
-       } else if (format_str == "human") {
-         format = diagnostics::DiagnosticsWriter::HUMAN;
-       } else {
-@@ -915,7 +915,7 @@
+@@ -893,7 +893,7 @@
    InitializePDF();
  #endif
  
@@ -72,7 +54,7 @@
    // Zygote needs to call InitCrashReporter() in RunZygote().
    if (process_type != switches::kZygoteProcess) {
  #if defined(OS_ANDROID)
-@@ -931,7 +931,7 @@
+@@ -909,7 +909,7 @@
      breakpad::InitCrashReporter(process_type);
  #endif  // defined(OS_ANDROID)
    }
@@ -81,7 +63,7 @@
  
    // After all the platform Breakpads have been initialized, store the command
    // line for crash reporting.
-@@ -941,7 +941,7 @@
+@@ -919,7 +919,7 @@
  void ChromeMainDelegate::SandboxInitialized(const std::string& process_type) {
    // Note: If you are adding a new process type below, be sure to adjust the
    // AdjustLinuxOOMScore function too.

Modified: head/www/iridium/files/patch-chrome_browser_diagnostics_diagnostics__writer.h
==============================================================================
--- head/www/iridium/files/patch-chrome_browser_diagnostics_diagnostics__writer.h	Wed Jan  9 16:28:18 2019	(r489814)
+++ head/www/iridium/files/patch-chrome_browser_diagnostics_diagnostics__writer.h	Wed Jan  9 16:38:15 2019	(r489815)
@@ -1,11 +1,11 @@
---- chrome/browser/diagnostics/diagnostics_writer.h.orig	2017-06-05 19:03:02 UTC
-+++ chrome/browser/diagnostics/diagnostics_writer.h
-@@ -19,7 +19,7 @@ class DiagnosticsWriter : public DiagnosticsModel::Obs
+--- chrome/browser/diagnostics/diagnostics_writer.h.orig	2018-05-09 21:05:37.000000000 +0200
++++ chrome/browser/diagnostics/diagnostics_writer.h	2019-01-07 21:53:10.249123000 +0100
+@@ -15,6 +15,8 @@
+ // Console base class used internally.
+ class SimpleConsole;
+
++#undef MACHINE
++
+ class DiagnosticsWriter : public DiagnosticsModel::Observer {
   public:
    // The type of formatting done by this writer.
-   enum FormatType {
--    MACHINE,
-+    THEMACHINE,
-     LOG,
-     HUMAN
-   };

Added: head/www/iridium/files/patch-mojo_public_c_system_thunks.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/iridium/files/patch-mojo_public_c_system_thunks.cc	Wed Jan  9 16:38:15 2019	(r489815)
@@ -0,0 +1,29 @@
+--- mojo/public/c/system/thunks.cc.orig	2019-01-09 11:00:07.794493000 +0100
++++ mojo/public/c/system/thunks.cc	2019-01-09 11:03:08.369317000 +0100
+@@ -14,7 +14,7 @@
+ #include "build/build_config.h"
+ #include "mojo/public/c/system/core.h"
+ 
+-#if defined(OS_CHROMEOS) || defined(OS_LINUX)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD)
+ #include "base/environment.h"
+ #include "base/files/file_path.h"
+ #include "base/optional.h"
+@@ -38,7 +38,7 @@
+   typedef void (*MojoGetSystemThunksFunction)(MojoSystemThunks* thunks);
+ 
+   CoreLibraryInitializer() {
+-#if defined(OS_CHROMEOS) || defined(OS_LINUX)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD)
+     auto environment = base::Environment::Create();
+ 
+     base::FilePath library_path;
+@@ -80,7 +80,7 @@
+   ~CoreLibraryInitializer() = default;
+ 
+  private:
+-#if defined(OS_CHROMEOS) || defined(OS_LINUX)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD)
+   base::Optional<base::ScopedNativeLibrary> library_;
+ #endif
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901091638.x09GcGV1041910>