From 85fdad94d93255b58eefee506d77876aae1d7db9 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Wed, 14 Mar 2018 12:59:04 +0000 Subject: Initial revision --- chromium/build/patches/chromium_clang-r3.patch | 19 +++++++ chromium/build/patches/chromium_gcc5_2.patch | 58 ++++++++++++++++++++++ .../build/patches/chromium_gcc_round_fix.patch | 17 +++++++ chromium/build/patches/chromium_math.h-r0.patch | 15 ++++++ chromium/build/patches/chromium_revert_tuple.patch | 54 ++++++++++++++++++++ 5 files changed, 163 insertions(+) create mode 100644 chromium/build/patches/chromium_clang-r3.patch create mode 100644 chromium/build/patches/chromium_gcc5_2.patch create mode 100644 chromium/build/patches/chromium_gcc_round_fix.patch create mode 100644 chromium/build/patches/chromium_math.h-r0.patch create mode 100644 chromium/build/patches/chromium_revert_tuple.patch (limited to 'chromium/build/patches') diff --git a/chromium/build/patches/chromium_clang-r3.patch b/chromium/build/patches/chromium_clang-r3.patch new file mode 100644 index 00000000..d66ca5a1 --- /dev/null +++ b/chromium/build/patches/chromium_clang-r3.patch @@ -0,0 +1,19 @@ +# Taken from gentoo: +# https://gitweb.gentoo.org/repo/gentoo.git/plain/www-client/chromium/files/chromium-clang-r3.patch +# +# Prevents this error: +# ../../device/u2f/u2f_ble_transaction.cc:134:27: error: no viable overloaded '=' +# request_cont_fragments_ = {}; +# ~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~ + +--- a/device/u2f/u2f_ble_transaction.cc ++++ b/device/u2f/u2f_ble_transaction.cc +@@ -131,7 +131,7 @@ + + void U2fBleTransaction::OnError() { + request_frame_.reset(); +- request_cont_fragments_ = {}; ++ request_cont_fragments_ = base::queue(); + response_frame_assembler_.reset(); + std::move(callback_).Run(base::nullopt); + } diff --git a/chromium/build/patches/chromium_gcc5_2.patch b/chromium/build/patches/chromium_gcc5_2.patch new file mode 100644 index 00000000..ddcf3520 --- /dev/null +++ b/chromium/build/patches/chromium_gcc5_2.patch @@ -0,0 +1,58 @@ +--- a/content/browser/accessibility/accessibility_tree_formatter_blink.cc 2018-03-13 21:40:54.741459989 +0100 ++++ b/content/browser/accessibility/accessibility_tree_formatter_blink.cc 2018-03-13 21:50:37.661460741 +0100 +@@ -4,7 +4,7 @@ + + #include "content/browser/accessibility/accessibility_tree_formatter_blink.h" + +-#include ++#include + #include + + #include +@@ -194,7 +194,7 @@ + attr_index <= ui::AX_FLOAT_ATTRIBUTE_LAST; + ++attr_index) { + auto attr = static_cast(attr_index); +- if (node.HasFloatAttribute(attr) && isfinite(node.GetFloatAttribute(attr))) ++ if (node.HasFloatAttribute(attr) && std::isfinite(node.GetFloatAttribute(attr))) + dict->SetDouble(ui::ToString(attr), node.GetFloatAttribute(attr)); + } + +--- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp 2018-03-07 00:05:05.000000000 +0100 ++++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp 2018-03-14 09:52:43.832466351 +0100 +@@ -1559,7 +1559,7 @@ + + if (IsNativeSlider() || IsNativeSpinButton()) { + *out_value = ToHTMLInputElement(*GetNode()).valueAsNumber(); +- return isfinite(*out_value); ++ return std::isfinite(*out_value); + } + + if (auto* meter = ToHTMLMeterElementOrNull(GetNode())) { +@@ -1604,7 +1604,7 @@ + + if (IsNativeSlider() || IsNativeSpinButton()) { + *out_value = static_cast(ToHTMLInputElement(*GetNode()).Maximum()); +- return isfinite(*out_value); ++ return std::isfinite(*out_value); + } + + if (auto* meter = ToHTMLMeterElementOrNull(GetNode())) { +@@ -1637,7 +1637,7 @@ + + if (IsNativeSlider() || IsNativeSpinButton()) { + *out_value = static_cast(ToHTMLInputElement(*GetNode()).Minimum()); +- return isfinite(*out_value); ++ return std::isfinite(*out_value); + } + + if (auto* meter = ToHTMLMeterElementOrNull(GetNode())) { +@@ -1666,7 +1666,7 @@ + Decimal step = + ToHTMLInputElement(*GetNode()).CreateStepRange(kRejectAny).Step(); + *out_value = step.ToString().ToFloat(); +- return isfinite(*out_value); ++ return std::isfinite(*out_value); + } + + switch (AriaRoleAttribute()) { diff --git a/chromium/build/patches/chromium_gcc_round_fix.patch b/chromium/build/patches/chromium_gcc_round_fix.patch new file mode 100644 index 00000000..ad634505 --- /dev/null +++ b/chromium/build/patches/chromium_gcc_round_fix.patch @@ -0,0 +1,17 @@ +Taken from Fedora's chromium SPEC file: + +To use round with gcc, you need to #include + +diff -up chromium-65.0.3325.146/third_party/webrtc/p2p/base/port.cc.gcc-round-fix chromium-65.0.3325.146/third_party/webrtc/p2p/base/port.cc +--- chromium-65.0.3325.146/third_party/webrtc/p2p/base/port.cc.gcc-round-fix 2018-03-07 10:57:11.284376048 -0500 ++++ chromium-65.0.3325.146/third_party/webrtc/p2p/base/port.cc 2018-03-07 10:58:16.590742636 -0500 +@@ -10,7 +10,7 @@ + + #include "p2p/base/port.h" + +-#include ++#include + + #include + #include + diff --git a/chromium/build/patches/chromium_math.h-r0.patch b/chromium/build/patches/chromium_math.h-r0.patch new file mode 100644 index 00000000..f762f2c4 --- /dev/null +++ b/chromium/build/patches/chromium_math.h-r0.patch @@ -0,0 +1,15 @@ +Fix build with glibc 2.27 + +diff --git a/components/assist_ranker/ranker_example_util.cc b/components/assist_ranker/ranker_example_util.cc +index 54d4dbd..ceedd8f 100644 +--- a/components/assist_ranker/ranker_example_util.cc ++++ b/components/assist_ranker/ranker_example_util.cc +@@ -2,6 +2,8 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + ++#include ++ + #include "components/assist_ranker/ranker_example_util.h" + #include "base/bit_cast.h" + #include "base/format_macros.h" diff --git a/chromium/build/patches/chromium_revert_tuple.patch b/chromium/build/patches/chromium_revert_tuple.patch new file mode 100644 index 00000000..2727fc89 --- /dev/null +++ b/chromium/build/patches/chromium_revert_tuple.patch @@ -0,0 +1,54 @@ +[gpu] Switch to std::tuple for FormatType. + +Now that std::tuple is allowed, there is no need to construct a +struct for FormatType. + +Bug: None +Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel +Change-Id: I8294ff9d3a1e78ca59da95ae9d7c69b9635c0afb +Reviewed-on: https://chromium-review.googlesource.com/832367 +Commit-Queue: Rijubrata Bhaumik +Reviewed-by: Zhenyao Mo +Cr-Commit-Position: refs/heads/master@{#524980} +diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc +index 437e0b9..8a2c00c 100644 +--- a/gpu/command_buffer/service/texture_manager.cc ++++ b/gpu/command_buffer/service/texture_manager.cc +@@ -9,6 +9,7 @@ + + #include + #include ++#include + #include + + #include "base/bits.h" +@@ -283,21 +284,16 @@ + } + + private: +- // TODO(zmo): once std::tuple is allowed, switch over to that. +- struct FormatType { +- GLenum internal_format; +- GLenum format; +- GLenum type; +- }; +- ++ // FormatType is a tuple of ++ typedef std::tuple FormatType; + struct FormatTypeCompare { + bool operator() (const FormatType& lhs, const FormatType& rhs) const { +- return (lhs.internal_format < rhs.internal_format || +- ((lhs.internal_format == rhs.internal_format) && +- (lhs.format < rhs.format)) || +- ((lhs.internal_format == rhs.internal_format) && +- (lhs.format == rhs.format) && +- (lhs.type < rhs.type))); ++ return (std::get<0>(lhs) < std::get<0>(rhs) || ++ ((std::get<0>(lhs) == std::get<0>(rhs)) && ++ (std::get<1>(lhs) < std::get<1>(rhs))) || ++ ((std::get<0>(lhs) == std::get<0>(rhs)) && ++ (std::get<1>(lhs) == std::get<1>(rhs)) && ++ (std::get<2>(lhs) < std::get<2>(rhs)))); + } + }; + -- cgit v1.2.3-65-gdbad