commit 51b388c66cc713f088d5a07a75e49f5fd9424292
Author: Akarshan Biswas <akarshanbiswas(a)fedoraproject.org>
Date: Thu Jun 13 10:43:12 2019 +0530
Use %autosetup and switch back to GCC (build fails on clang often which makes it non
beneficial to GCC)
Change recommends to libva-utils since acceleration is broken on few intel devices
chromium-angle-gcc9.patch | 44 +++++++++++
libstdc.patch => chromium-gcc9-r654570.patch | 5 +-
chromium-gcc9-r666279.patch | 59 ++++++++++++++
chromium-gcc9-r666714.patch | 111 +++++++++++++++++++++++++++
chromium-vaapi.spec | 59 +++++++-------
5 files changed, 249 insertions(+), 29 deletions(-)
---
diff --git a/chromium-angle-gcc9.patch b/chromium-angle-gcc9.patch
new file mode 100644
index 0000000..05e5f59
--- /dev/null
+++ b/chromium-angle-gcc9.patch
@@ -0,0 +1,44 @@
+From 926f1caa8b5c34a6d2e3a9fa9f10976ca6d51323 Mon Sep 17 00:00:00 2001
+From: Yi Xu <yiyix(a)chromium.org>
+Date: Wed, 1 May 2019 14:03:05 -0400
+Subject: [PATCH] Add support for GCC Compilers
+
+Add support for GCC Compilers, so it can be build on Ubuntu.
+
+BUG=angleproject:3392
+
+Change-Id: I2f5ac7355a40f52123bd465f86b1e966c59c943d
+Reviewed-on:
https://chromium-review.googlesource.com/c/angle/angle/+/1592062
+Reviewed-by: Geoff Lang <geofflang(a)chromium.org>
+Commit-Queue: Yi Xu <yiyix(a)chromium.org>
+---
+ src/common/debug.h | 4 +-
+ .../GPUTestExpectationsParser_unittest.cpp | 20 +++
+ .../vulkan_command_buffer_utils.cpp | 116 +++++++++---------
+ 3 files changed, 80 insertions(+), 60 deletions(-)
+
+diff --git a/src/common/debug.h b/src/common/debug.h
+index 64783687b..3e687b816 100644
+--- a/third_party/angle/src/common/debug.h
++++ b/third_party/angle/src/common/debug.h
+@@ -248,7 +248,7 @@ std::ostream &FmtHex(std::ostream &os, T value)
+ # define EVENT(message, ...) (void(0))
+ #endif
+
+-#if defined(COMPILER_GCC) || defined(__clang__)
++#if defined(__GNUC__)
+ # define ANGLE_CRASH() __builtin_trap()
+ #else
+ # define ANGLE_CRASH() ((void)(*(volatile char *)0 = 0)), __assume(0)
+@@ -336,7 +336,7 @@ std::ostream &FmtHex(std::ostream &os, T value)
+ # define ANGLE_ENABLE_STRUCT_PADDING_WARNINGS \
+ _Pragma("clang diagnostic push") _Pragma("clang diagnostic error
\"-Wpadded\"")
+ # define ANGLE_DISABLE_STRUCT_PADDING_WARNINGS _Pragma("clang diagnostic
pop")
+-#elif defined(COMPILER_GCC)
++#elif defined(__GNUC__)
+ # define ANGLE_ENABLE_STRUCT_PADDING_WARNINGS \
+ _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic error
\"-Wpadded\"")
+ # define ANGLE_DISABLE_STRUCT_PADDING_WARNINGS _Pragma("GCC diagnostic
pop")
+--
+2.21.0
+
diff --git a/libstdc.patch b/chromium-gcc9-r654570.patch
similarity index 97%
rename from libstdc.patch
rename to chromium-gcc9-r654570.patch
index 2a2cad0..6302b0c 100644
--- a/libstdc.patch
+++ b/chromium-gcc9-r654570.patch
@@ -20,7 +20,7 @@ Cr-Commit-Position: refs/heads/master@{#654570}
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cc/scheduler/compositor_frame_reporting_controller.cc
b/cc/scheduler/compositor_frame_reporting_controller.cc
-index f1587ed158..1b17021fd2 100644
+index f1587ed158d4..1b17021fd229 100644
--- a/cc/scheduler/compositor_frame_reporting_controller.cc
+++ b/cc/scheduler/compositor_frame_reporting_controller.cc
@@ -31,8 +31,8 @@ void CompositorFrameReportingController::WillBeginImplFrame() {
@@ -34,3 +34,6 @@ index f1587ed158..1b17021fd2 100644
reporters_[PipelineStage::kBeginImplFrame]->StartStage(
"SendBeginMainFrameToCommit");
AdvanceReporterStage(PipelineStage::kBeginImplFrame,
+--
+2.21.0
+
diff --git a/chromium-gcc9-r666279.patch b/chromium-gcc9-r666279.patch
new file mode 100644
index 0000000..0e8b680
--- /dev/null
+++ b/chromium-gcc9-r666279.patch
@@ -0,0 +1,59 @@
+From cdf306db81efaaaa954487585d5a5a16205a5ebd Mon Sep 17 00:00:00 2001
+From: Jose Dapena Paz <jose.dapena(a)lge.com>
+Date: Wed, 5 Jun 2019 14:45:06 +0000
+Subject: [PATCH] Avoid pure virtual crash destroying RenderProcessUserData
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When RenderProcessUserData is destroyed from the destructor of
+RenderProcessHostImpl, it is done in the destructor of RenderProcessHost.
+At this point RemoveObserver override is already freed, so RenderProcessHost
+is pure virtual. This crash happens at least building with GCC:
+
+ at /usr/include/c++/8/ext/new_allocator.h:140
+ (this=0x7fffffffcb50, __in_chrg=<optimized out>) at
/usr/include/c++/8/bits/stl_tree.h:964
+
+We need to destroy RenderProcessUserData before that happens. To do that
+we can just override RenderProcessHostDestroyed.
+
+Bug: 910288
+Change-Id: I38107b178829b0cb7494f5333b765e5b087d82cd
+Reviewed-on:
https://chromium-review.googlesource.com/c/chromium/src/+/1645366
+Commit-Queue: Sigurður Ásgeirsson <siggi(a)chromium.org>
+Reviewed-by: Sigurður Ásgeirsson <siggi(a)chromium.org>
+Cr-Commit-Position: refs/heads/master@{#666279}
+---
+ .../browser/performance_manager/render_process_user_data.cc | 5 +++++
+ .../browser/performance_manager/render_process_user_data.h | 1 +
+ 2 files changed, 6 insertions(+)
+
+diff --git a/chrome/browser/performance_manager/render_process_user_data.cc
b/chrome/browser/performance_manager/render_process_user_data.cc
+index 2e2c199d4fff..ef6e1fbfb986 100644
+--- a/chrome/browser/performance_manager/render_process_user_data.cc
++++ b/chrome/browser/performance_manager/render_process_user_data.cc
+@@ -116,4 +116,9 @@ void RenderProcessUserData::RenderProcessExited(
+ base::Unretained(process_node_.get()), info.exit_code));
+ }
+
++void RenderProcessUserData::RenderProcessHostDestroyed(
++ content::RenderProcessHost* host) {
++ host->RemoveUserData(kRenderProcessUserDataKey);
++}
++
+ } // namespace performance_manager
+diff --git a/chrome/browser/performance_manager/render_process_user_data.h
b/chrome/browser/performance_manager/render_process_user_data.h
+index ac74b1df2040..f3b4d162e6d3 100644
+--- a/chrome/browser/performance_manager/render_process_user_data.h
++++ b/chrome/browser/performance_manager/render_process_user_data.h
+@@ -47,6 +47,7 @@ class RenderProcessUserData : public base::SupportsUserData::Data,
+ void RenderProcessExited(
+ content::RenderProcessHost* host,
+ const content::ChildProcessTerminationInfo& info) override;
++ void RenderProcessHostDestroyed(content::RenderProcessHost* host) override;
+
+ // All instances are linked together in a doubly linked list to allow orderly
+ // destruction at browser shutdown time.
+--
+2.21.0
+
diff --git a/chromium-gcc9-r666714.patch b/chromium-gcc9-r666714.patch
new file mode 100644
index 0000000..77f71dd
--- /dev/null
+++ b/chromium-gcc9-r666714.patch
@@ -0,0 +1,111 @@
+From 41d954dec0669c9a85730c0bde7df7ba7a0ff43e Mon Sep 17 00:00:00 2001
+From: Jose Dapena Paz <jose.dapena(a)lge.com>
+Date: Thu, 6 Jun 2019 15:30:49 +0000
+Subject: [PATCH] Fix AutocompleteMatch move constructor/assign operator
+ noexcept
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+For AutocompleteMatch to declare noexcept them, all the contained
+properties need to be noexcept too. This is required at least
+for SuggestionAnswer, because base::string16 will make default
+calculated signature of the move operator noexcept(false).
+
+To avoid this issue we explicitely declare them on SuggestionAnswer,
+and its member classes TextField and ImageLine.
+
+Bug: 819294
+Change-Id: I8714f2c6352a3292bdebdc3aed9790270e49c580
+Reviewed-on:
https://chromium-review.googlesource.com/c/chromium/src/+/1554669
+Reviewed-by: Kevin Bailey <krb(a)chromium.org>
+Commit-Queue: José Dapena Paz <jose.dapena(a)lge.com>
+Cr-Commit-Position: refs/heads/master@{#666714}
+---
+ components/omnibox/browser/suggestion_answer.cc | 14 ++++++++++++++
+ components/omnibox/browser/suggestion_answer.h | 8 ++++++++
+ 2 files changed, 22 insertions(+)
+
+diff --git a/components/omnibox/browser/suggestion_answer.cc
b/components/omnibox/browser/suggestion_answer.cc
+index 151e55f7dd58..a0c9049afedb 100644
+--- a/components/omnibox/browser/suggestion_answer.cc
++++ b/components/omnibox/browser/suggestion_answer.cc
+@@ -55,6 +55,12 @@ void AppendWithSpace(const SuggestionAnswer::TextField* text,
+
+ SuggestionAnswer::TextField::TextField() = default;
+ SuggestionAnswer::TextField::~TextField() = default;
++SuggestionAnswer::TextField::TextField(const TextField&) = default;
++SuggestionAnswer::TextField::TextField(TextField&&) noexcept = default;
++SuggestionAnswer::TextField& SuggestionAnswer::TextField::operator=(
++ const TextField&) = default;
++SuggestionAnswer::TextField& SuggestionAnswer::TextField::operator=(
++ TextField&&) noexcept = default;
+
+ // static
+ bool SuggestionAnswer::TextField::ParseTextField(const base::Value& field_json,
+@@ -93,9 +99,12 @@ size_t SuggestionAnswer::TextField::EstimateMemoryUsage() const {
+ SuggestionAnswer::ImageLine::ImageLine()
+ : num_text_lines_(1) {}
+ SuggestionAnswer::ImageLine::ImageLine(const ImageLine& line) = default;
++SuggestionAnswer::ImageLine::ImageLine(ImageLine&&) noexcept = default;
+
+ SuggestionAnswer::ImageLine& SuggestionAnswer::ImageLine::operator=(
+ const ImageLine& line) = default;
++SuggestionAnswer::ImageLine& SuggestionAnswer::ImageLine::operator=(
++ ImageLine&&) noexcept = default;
+
+ SuggestionAnswer::ImageLine::~ImageLine() {}
+
+@@ -251,9 +260,14 @@ SuggestionAnswer::SuggestionAnswer() = default;
+
+ SuggestionAnswer::SuggestionAnswer(const SuggestionAnswer& answer) = default;
+
++SuggestionAnswer::SuggestionAnswer(SuggestionAnswer&&) noexcept = default;
++
+ SuggestionAnswer& SuggestionAnswer::operator=(const SuggestionAnswer& answer) =
+ default;
+
++SuggestionAnswer& SuggestionAnswer::operator=(SuggestionAnswer&&) noexcept
=
++ default;
++
+ SuggestionAnswer::~SuggestionAnswer() = default;
+
+ // static
+diff --git a/components/omnibox/browser/suggestion_answer.h
b/components/omnibox/browser/suggestion_answer.h
+index 31be937ccbed..2840ace1c117 100644
+--- a/components/omnibox/browser/suggestion_answer.h
++++ b/components/omnibox/browser/suggestion_answer.h
+@@ -125,6 +125,10 @@ class SuggestionAnswer {
+ public:
+ TextField();
+ ~TextField();
++ TextField(const TextField&);
++ TextField(TextField&&) noexcept;
++ TextField& operator=(const TextField&);
++ TextField& operator=(TextField&&) noexcept;
+
+ // Parses |field_json| dictionary and populates |text_field| with the
+ // contents. If any of the required elements is missing, returns false and
+@@ -162,7 +166,9 @@ class SuggestionAnswer {
+ public:
+ ImageLine();
+ explicit ImageLine(const ImageLine& line);
++ ImageLine(ImageLine&&) noexcept;
+ ImageLine& operator=(const ImageLine& line);
++ ImageLine& operator=(ImageLine&&) noexcept;
+ ~ImageLine();
+
+ // Parses dictionary |line_json| and populates |image_line| with the
+@@ -213,7 +219,9 @@ class SuggestionAnswer {
+
+ SuggestionAnswer();
+ SuggestionAnswer(const SuggestionAnswer& answer);
++ SuggestionAnswer(SuggestionAnswer&&) noexcept;
+ SuggestionAnswer& operator=(const SuggestionAnswer& answer);
++ SuggestionAnswer& operator=(SuggestionAnswer&&) noexcept;
+ ~SuggestionAnswer();
+
+ // Parses dictionary |answer_json| and fills a SuggestionAnswer containing the
+--
+2.21.0
+
diff --git a/chromium-vaapi.spec b/chromium-vaapi.spec
index 891bf24..814c333 100644
--- a/chromium-vaapi.spec
+++ b/chromium-vaapi.spec
@@ -58,13 +58,13 @@
%global jumbo 1
#------------------------------------------------------
#Build debug packages for debugging
-%global debug_pkg 0
+%global debug_pkg 1
# Enable building with ozone support
%global ozone 0
##############################Package Definitions######################################
Name: chromium-vaapi
Version: 75.0.3770.80
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A Chromium web browser with video decoding acceleration
License: BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL
and (MPLv1.1 or GPLv2 or LGPLv2)
URL:
https://www.chromium.org/Home
@@ -97,8 +97,7 @@ Source15: LICENSE
########################################################################################
#Compiler settings
# Make sure we don't encounter any bug
-BuildRequires: clang, llvm
-BuildRequires: lld
+BuildRequires: gcc-c++
# Basic tools and libraries needed for building
BuildRequires: ninja-build, nodejs, bison, gperf, hwdata
BuildRequires: libgcc, glibc, libatomic
@@ -180,8 +179,7 @@ BuildRequires: libstdc++-static
#Runtime Requirements
Requires: hicolor-icon-theme
#Some recommendations
-Recommends: libva-intel-hybrid-driver%{?_isa}
-Recommends: libva-intel-driver%{?_isa}
+Recommends: libva-utils
%if !%{debug_pkg}
%global debug_package %{nil}
%endif
@@ -205,13 +203,17 @@ Patch65: chromium-73.0.3683.75-pipewire-cstring-fix.patch
# Fix some chromium regressions against certain type of window compositors
# Patch status: backported from
https://chromium-review.googlesource.com/c/chromium/src/+/1597388
Patch67: fixwindowflashm74.patch
-Patch68: libstdc.patch
+# GCC patches
+Patch70: chromium-angle-gcc9.patch
+Patch71: chromium-gcc9-r654570.patch
+Patch72: chromium-gcc9-r666279.patch
+Patch73: chromium-gcc9-r666714.patch
%description
chromium-vaapi is an open-source web browser, powered by WebKit (Blink)
############################################PREP###########################################################
%prep
-%setup -q -n chromium-%{version}
+%autosetup -n chromium-%{version} -N
## Apply patches here ##
%patch1 -p1 -b .vaapi
%patch2 -p1 -b .widevine
@@ -227,12 +229,12 @@ chromium-vaapi is an open-source web browser, powered by WebKit
(Blink)
%patch65 -p1 -b .pipewire
%endif
%patch67 -p1 -b .fwfm74
-%patch68 -p1 -b .libstdc
+# GCC patches area
+%patch70 -p1 -b .gcc1
+%patch71 -p1 -b .gcc2
+%patch72 -p1 -b .gcc3
+%patch73 -p1 -b .gcc4
-%if 0%{?fedora} >= 30
-# Add a workaround for a race condition in clang-llvm8+ compiler
-sed -i 's|const std::vector<Delta> deltas_;|std::vector<Delta>
deltas_;|' chrome/browser/ui/tabs/tab_strip_model_observer.h
-%endif
#Let's change the default shebang of python files.
find -depth -type f -writable -name "*.py" -exec sed -iE '1s=^#!
*/usr/bin/\(python\|env python\)[23]\?=#!%{__python2}=' {} +
@@ -471,13 +473,6 @@ find -depth -type f -writable -name "*.py" -exec sed -iE
'1s=^#! */usr/bin/\(pyt
sed -i 's|//third_party/usb_ids|/usr/share/hwdata|g' device/usb/BUILD.gn
-
-# Remove compiler flags not supported by our system clang
-# sed -i \
-# -e '/"-Wno-ignored-pragma-optimize"/d' \
-# build/config/compiler/BUILD.gn
-
-
rmdir third_party/markupsafe
ln -s %{python2_sitearch}/markupsafe third_party/markupsafe
@@ -494,9 +489,12 @@ sed -i.orig -e
's/getenv("CHROME_VERSION_EXTRA")/"%{name}"/' $FILE
#####################################BUILD#############################################
%build
#export compilar variables
-export AR=llvm-ar NM=llvm-nm AS=llvm-as
-export CC=clang CXX=clang++
-export CXXFLAGS=$CXXFLAGS" -fpermissive"
+export AR=ar NM=nm AS=as
+export CC=gcc CXX=g++
+
+# GN needs gold to bootstrap
+export LDFLAGS="$LDFLAGS -fuse-ld=gold"
+
gn_args=(
is_debug=false
use_vaapi=true
@@ -530,7 +528,7 @@ gn_args=(
fatal_linker_warnings=false
treat_warnings_as_errors=false
linux_use_bundled_binutils=false
- remove_webcore_debug_symbols=true
+ blink_symbol_level = 0
fieldtrial_testing_like_official_build=true
'custom_toolchain="//build/toolchain/linux/unbundle:default"'
'host_toolchain="//build/toolchain/linux/unbundle:default"'
@@ -540,11 +538,12 @@ gn_args=(
)
#compiler settings
+# 'clang_base_path = "/usr"'
+# use_lld=false
+ # clang_use_chrome_plugins=false
+# Switched back to GCC, clang itself is broken
gn_args+=(
- is_clang=true
- use_lld=true
- 'clang_base_path = "/usr"'
- clang_use_chrome_plugins=false
+ is_clang=false
)
#Jumbo stuff
gn_args+=(
@@ -671,6 +670,10 @@ appstream-util validate-relax --nonet
"%{buildroot}%{_metainfodir}/%{name}.appda
%{chromiumdir}/locales/*.pak
#########################################changelogs#################################################
%changelog
+* Wed Jun 12 2019 Akarshan Biswas <akarshanbiswas(a)fedoraproject.org>
75.0.3770.80-2
+- Use %%autosetup and switch back to GCC (build fails on clang often which makes it non
beneficial to GCC)
+- Change recommends to libva-utils since acceleration is broken on few intel devices
+
* Sat Jun 08 2019 Akarshan Biswas <akarshanbiswas(a)fedoraproject.org>
75.0.3770.80-1
- Update to 75.0.3770.80