diff --git a/chromium-86-fix-vaapi-on-intel.patch b/chromium-86-fix-vaapi-on-intel.patch index e8ae322..de5d354 100644 --- a/chromium-86-fix-vaapi-on-intel.patch +++ b/chromium-86-fix-vaapi-on-intel.patch @@ -1,8 +1,8 @@ -Index: electron-16.0.6/media/gpu/vaapi/vaapi_video_decode_accelerator.cc +Index: electron-17.1.0/media/gpu/vaapi/vaapi_video_decode_accelerator.cc =================================================================== ---- electron-16.0.6.orig/media/gpu/vaapi/vaapi_video_decode_accelerator.cc 2022-01-10 16:06:52.097311842 +0100 -+++ electron-16.0.6/media/gpu/vaapi/vaapi_video_decode_accelerator.cc 2022-01-13 16:03:42.777745377 +0100 -@@ -60,6 +60,7 @@ unsigned int GetVaFormatForVideoCodecPro +--- electron-17.1.0.orig/media/gpu/vaapi/vaapi_video_decode_accelerator.cc 2022-03-07 17:20:36.424835840 +0100 ++++ electron-17.1.0/media/gpu/vaapi/vaapi_video_decode_accelerator.cc 2022-03-09 08:25:30.358242211 +0100 +@@ -58,6 +58,7 @@ unsigned int GetVaFormatForVideoCodecPro return VA_RT_FORMAT_YUV420; } @@ -10,7 +10,7 @@ Index: electron-16.0.6/media/gpu/vaapi/vaapi_video_decode_accelerator.cc // Returns true if the CPU is an Intel Gemini Lake or later (including Kaby // Lake) Cpu platform id's are referenced from the following file in kernel // source arch/x86/include/asm/intel-family.h -@@ -72,6 +73,7 @@ bool IsGeminiLakeOrLater() { +@@ -70,6 +71,7 @@ bool IsGeminiLakeOrLater() { cpuid.model() >= kGeminiLakeModelId; return is_geminilake_or_later; } @@ -18,7 +18,7 @@ Index: electron-16.0.6/media/gpu/vaapi/vaapi_video_decode_accelerator.cc } // namespace -@@ -1227,6 +1229,8 @@ VaapiVideoDecodeAccelerator::DecideBuffe +@@ -1228,6 +1230,8 @@ VaapiVideoDecodeAccelerator::DecideBuffe if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT) return BufferAllocationMode::kNormal; @@ -27,7 +27,7 @@ Index: electron-16.0.6/media/gpu/vaapi/vaapi_video_decode_accelerator.cc // On Gemini Lake, Kaby Lake and later we can pass to libva the client's // PictureBuffers to decode onto, which skips the use of the Vpp unit and its // associated format reconciliation copy, avoiding all internal buffer -@@ -1242,6 +1246,7 @@ VaapiVideoDecodeAccelerator::DecideBuffe +@@ -1243,6 +1247,7 @@ VaapiVideoDecodeAccelerator::DecideBuffe num_extra_pics_ = 3; return BufferAllocationMode::kNone; } diff --git a/chromium-93-ffmpeg-4.4.patch b/chromium-93-ffmpeg-4.4.patch index c24bb86..f56c987 100644 --- a/chromium-93-ffmpeg-4.4.patch +++ b/chromium-93-ffmpeg-4.4.patch @@ -21,11 +21,11 @@ Signed-off-by: Marek Behún media/filters/ffmpeg_demuxer.cc | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) -Index: electron-16.0.6/media/filters/audio_decoder_unittest.cc +Index: electron-17.1.2/media/filters/audio_decoder_unittest.cc =================================================================== ---- electron-16.0.6.orig/media/filters/audio_decoder_unittest.cc 2022-01-10 16:06:52.057311576 +0100 -+++ electron-16.0.6/media/filters/audio_decoder_unittest.cc 2022-01-13 16:04:27.849990428 +0100 -@@ -109,7 +109,11 @@ void SetDiscardPadding(AVPacket* packet, +--- electron-17.1.2.orig/media/filters/audio_decoder_unittest.cc 2022-03-11 08:49:30.740949416 +0100 ++++ electron-17.1.2/media/filters/audio_decoder_unittest.cc 2022-03-11 09:17:36.916088893 +0100 +@@ -102,7 +102,11 @@ void SetDiscardPadding(AVPacket* packet, } // If the timestamp is positive, try to use FFmpeg's discard data. @@ -37,11 +37,11 @@ Index: electron-16.0.6/media/filters/audio_decoder_unittest.cc const uint32_t* skip_samples_ptr = reinterpret_cast(av_packet_get_side_data( packet, AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size)); -Index: electron-16.0.6/media/filters/ffmpeg_demuxer.cc +Index: electron-17.1.2/media/filters/ffmpeg_demuxer.cc =================================================================== ---- electron-16.0.6.orig/media/filters/ffmpeg_demuxer.cc 2022-01-10 16:06:52.061311603 +0100 -+++ electron-16.0.6/media/filters/ffmpeg_demuxer.cc 2022-01-13 16:04:27.853990450 +0100 -@@ -403,11 +403,19 @@ void FFmpegDemuxerStream::EnqueuePacket( +--- electron-17.1.2.orig/media/filters/ffmpeg_demuxer.cc 2022-03-11 08:49:30.744949436 +0100 ++++ electron-17.1.2/media/filters/ffmpeg_demuxer.cc 2022-03-11 09:17:36.916088893 +0100 +@@ -404,11 +404,19 @@ void FFmpegDemuxerStream::EnqueuePacket( scoped_refptr buffer; if (type() == DemuxerStream::TEXT) { @@ -61,7 +61,7 @@ Index: electron-16.0.6/media/filters/ffmpeg_demuxer.cc uint8_t* settings_data = av_packet_get_side_data( packet.get(), AV_PKT_DATA_WEBVTT_SETTINGS, &settings_size); -@@ -419,7 +427,11 @@ void FFmpegDemuxerStream::EnqueuePacket( +@@ -420,7 +428,11 @@ void FFmpegDemuxerStream::EnqueuePacket( buffer = DecoderBuffer::CopyFrom(packet->data, packet->size, side_data.data(), side_data.size()); } else { @@ -73,7 +73,7 @@ Index: electron-16.0.6/media/filters/ffmpeg_demuxer.cc uint8_t* side_data = av_packet_get_side_data( packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size); -@@ -480,7 +492,11 @@ void FFmpegDemuxerStream::EnqueuePacket( +@@ -481,7 +493,11 @@ void FFmpegDemuxerStream::EnqueuePacket( packet->size - data_offset); } diff --git a/chromium-94-ffmpeg-roll.patch b/chromium-94-ffmpeg-roll.patch deleted file mode 100644 index fcffc01..0000000 --- a/chromium-94-ffmpeg-roll.patch +++ /dev/null @@ -1,49 +0,0 @@ -From b94755e4633045be96ab5e0bdde0db7e16a804bd Mon Sep 17 00:00:00 2001 -From: "liberato@chromium.org" -Date: Fri, 6 Aug 2021 04:25:31 +0000 -Subject: [PATCH] FFmpeg M94 roll. - -Contains DEPS update + chromium-side fixes. - -Bug: 1227259 -Change-Id: I61c5eaa789ea12c17d0cbcbf837435b9cf32479b -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3011889 -Reviewed-by: Thomas Guilbert -Commit-Queue: Frank Liberato -Cr-Commit-Position: refs/heads/master@{#909174} ---- - media/ffmpeg/ffmpeg_common.h | 1 + - media/filters/ffmpeg_demuxer.cc | 4 ++-- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h -index cede8ac5a7..97d6307e28 100644 ---- a/media/ffmpeg/ffmpeg_common.h -+++ b/media/ffmpeg/ffmpeg_common.h -@@ -29,7 +29,6 @@ extern "C" { - #include - #include - #include --#include - #include - #include - #include -diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc -index ac4713b072..605001d935 100644 ---- a/media/filters/ffmpeg_demuxer.cc -+++ b/media/filters/ffmpeg_demuxer.cc -@@ -106,12 +106,12 @@ static base::TimeDelta ExtractStartTime(AVStream* stream) { - - // Next try to use the first DTS value, for codecs where we know PTS == DTS - // (excludes all H26x codecs). The start time must be returned in PTS. -+ if (stream->first_dts != kNoFFmpegTimestamp && -- if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp && - stream->codecpar->codec_id != AV_CODEC_ID_HEVC && - stream->codecpar->codec_id != AV_CODEC_ID_H264 && - stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) { - const base::TimeDelta first_pts = -+ ConvertFromTimeBase(stream->time_base, stream->first_dts); -- ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream)); - if (first_pts < start_time) - start_time = first_pts; - } diff --git a/chromium-96-CommandLine-include.patch b/chromium-96-CommandLine-include.patch deleted file mode 100644 index 29b5bd9..0000000 --- a/chromium-96-CommandLine-include.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 39e6e77798d86033e5eb1fb2a2caf20a5bca2262 Mon Sep 17 00:00:00 2001 -From: Stephan Hartmann -Date: Sat, 9 Oct 2021 08:27:04 +0000 -Subject: [PATCH] IWYU: add memory for std::unique_ptr in base::CommandLine - ---- - base/command_line.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/base/command_line.h b/base/command_line.h -index 706726a..ad02812 100644 ---- a/base/command_line.h -+++ b/base/command_line.h -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - #include - #include - --- -2.32.0 - diff --git a/chromium-96-CouponDB-include.patch b/chromium-96-CouponDB-include.patch index 96132e6..6f935be 100644 --- a/chromium-96-CouponDB-include.patch +++ b/chromium-96-CouponDB-include.patch @@ -7,19 +7,16 @@ Subject: [PATCH] IWYU: add vector for std::vector in CouponDB chrome/browser/commerce/coupons/coupon_db.h | 2 ++ 1 file changed, 2 insertions(+) -diff --git a/chrome/browser/commerce/coupons/coupon_db.h b/chrome/browser/commerce/coupons/coupon_db.h -index f0758f4..93e2dd3 100644 ---- a/chrome/browser/commerce/coupons/coupon_db.h -+++ b/chrome/browser/commerce/coupons/coupon_db.h -@@ -5,6 +5,8 @@ - #ifndef CHROME_BROWSER_COMMERCE_COUPONS_COUPON_DB_H_ - #define CHROME_BROWSER_COMMERCE_COUPONS_COUPON_DB_H_ +Index: electron-17.1.0/chrome/browser/commerce/coupons/coupon_db.h +=================================================================== +--- electron-17.1.0.orig/chrome/browser/commerce/coupons/coupon_db.h 2022-03-07 17:20:30.800813005 +0100 ++++ electron-17.1.0/chrome/browser/commerce/coupons/coupon_db.h 2022-03-09 08:26:32.625221232 +0100 +@@ -7,6 +7,8 @@ + + #include +#include + #include "base/callback_helpers.h" + #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" - #include "url/gurl.h" --- -2.32.0 - diff --git a/chromium-96-DrmRenderNodePathFinder-include.patch b/chromium-96-DrmRenderNodePathFinder-include.patch deleted file mode 100644 index 02eab77..0000000 --- a/chromium-96-DrmRenderNodePathFinder-include.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 9e36b3c28935fb50d43ccef443be786a8e3f8a5f Mon Sep 17 00:00:00 2001 -From: Stephan Hartmann -Date: Sat, 9 Oct 2021 16:17:34 +0000 -Subject: [PATCH] IWYU: add string.h for memcmp in ui:: DrmRenderNodePathFinder - ---- - ui/ozone/platform/wayland/gpu/drm_render_node_path_finder.cc | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/ui/ozone/platform/wayland/gpu/drm_render_node_path_finder.cc b/ui/ozone/platform/wayland/gpu/drm_render_node_path_finder.cc -index 06776a7..d5b7b71 100644 ---- a/ui/ozone/platform/wayland/gpu/drm_render_node_path_finder.cc -+++ b/ui/ozone/platform/wayland/gpu/drm_render_node_path_finder.cc -@@ -5,6 +5,7 @@ - #include "ui/ozone/platform/wayland/gpu/drm_render_node_path_finder.h" - - #include -+#include - #include - #include - #include --- -2.32.0 - diff --git a/chromium-96-RestrictedCookieManager-tuple.patch b/chromium-96-RestrictedCookieManager-tuple.patch deleted file mode 100644 index d3b95e5..0000000 --- a/chromium-96-RestrictedCookieManager-tuple.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 86b1886673c3e75d3a7b8c802b3e9fa6ea945a1e Mon Sep 17 00:00:00 2001 -From: Jose Dapena Paz -Date: Fri, 08 Oct 2021 06:32:55 +0000 -Subject: [PATCH] libstdc++: no implicit conversion from tuple created with std::tie to an std::pair in restricted cookie manager. - -Fix compilation error: - ../../services/network/restricted_cookie_manager.cc:164:30: error: no match for ‘operator[]’ (operand types are ‘network::CookieAccessesByURLAndSite’ {aka ‘std::map, std::unique_ptr > >’} and ‘std::tuple’) - -There is no conversion from tuple to pair. - -Bug: 957519 -Change-Id: Idf29c7b21895ae28f45b35d6193ab4ac555945c8 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3211752 -Reviewed-by: Robbie McElrath -Commit-Queue: José Dapena Paz -Cr-Commit-Position: refs/heads/main@{#929597} ---- - -diff --git a/services/network/restricted_cookie_manager.cc b/services/network/restricted_cookie_manager.cc -index 425426f..c8c10c6 100644 ---- a/services/network/restricted_cookie_manager.cc -+++ b/services/network/restricted_cookie_manager.cc -@@ -161,7 +161,7 @@ - const GURL& url, - const net::SiteForCookies& site_for_cookies) { - std::unique_ptr& entry = -- recent_cookie_accesses_[std::tie(url, site_for_cookies)]; -+ recent_cookie_accesses_[std::make_pair(url, site_for_cookies)]; - if (!entry) { - entry = std::make_unique(); - } diff --git a/chromium-98-EnumTable-crash.patch b/chromium-98-EnumTable-crash.patch new file mode 100644 index 0000000..c506dbf --- /dev/null +++ b/chromium-98-EnumTable-crash.patch @@ -0,0 +1,76 @@ +diff --git a/components/cast_channel/enum_table.h b/components/cast_channel/enum_table.h +index 842553a..89de703 100644 +--- a/components/cast_channel/enum_table.h ++++ b/components/cast_channel/enum_table.h +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + + #include "base/check_op.h" + #include "base/notreached.h" +@@ -187,7 +188,6 @@ class + inline constexpr GenericEnumTableEntry(int32_t value); + inline constexpr GenericEnumTableEntry(int32_t value, base::StringPiece str); + +- GenericEnumTableEntry(const GenericEnumTableEntry&) = delete; + GenericEnumTableEntry& operator=(const GenericEnumTableEntry&) = delete; + + private: +@@ -253,7 +253,6 @@ class EnumTable { + constexpr Entry(E value, base::StringPiece str) + : GenericEnumTableEntry(static_cast(value), str) {} + +- Entry(const Entry&) = delete; + Entry& operator=(const Entry&) = delete; + }; + +@@ -312,15 +311,14 @@ class EnumTable { + if (is_sorted_) { + const std::size_t index = static_cast(value); + if (ANALYZER_ASSUME_TRUE(index < data_.size())) { +- const auto& entry = data_.begin()[index]; ++ const auto& entry = data_[index]; + if (ANALYZER_ASSUME_TRUE(entry.has_str())) + return entry.str(); + } + return absl::nullopt; + } + return GenericEnumTableEntry::FindByValue( +- reinterpret_cast(data_.begin()), +- data_.size(), static_cast(value)); ++ &data_[0], data_.size(), static_cast(value)); + } + + // This overload of GetString is designed for cases where the argument is a +@@ -348,8 +346,7 @@ class EnumTable { + // enum value directly. + absl::optional GetEnum(base::StringPiece str) const { + auto* entry = GenericEnumTableEntry::FindByString( +- reinterpret_cast(data_.begin()), +- data_.size(), str); ++ &data_[0], data_.size(), str); + return entry ? static_cast(entry->value) : absl::optional(); + } + +@@ -364,7 +361,7 @@ class EnumTable { + // Align the data on a cache line boundary. + alignas(64) + #endif +- std::initializer_list data_; ++ const std::vector data_; + bool is_sorted_; + + constexpr EnumTable(std::initializer_list data, bool is_sorted) +@@ -376,8 +373,8 @@ class EnumTable { + + for (std::size_t i = 0; i < data.size(); i++) { + for (std::size_t j = i + 1; j < data.size(); j++) { +- const Entry& ei = data.begin()[i]; +- const Entry& ej = data.begin()[j]; ++ const Entry& ei = data[i]; ++ const Entry& ej = data[j]; + DCHECK(ei.value != ej.value) + << "Found duplicate enum values at indices " << i << " and " << j; + DCHECK(!(ei.has_str() && ej.has_str() && ei.str() == ej.str())) diff --git a/chromium-98-MiraclePtr-gcc-ice.patch b/chromium-98-MiraclePtr-gcc-ice.patch new file mode 100644 index 0000000..7c7ed0c --- /dev/null +++ b/chromium-98-MiraclePtr-gcc-ice.patch @@ -0,0 +1,99 @@ +Workaround GCC ICE with MiraclePtr, see https://gcc.gnu.org/PR103455 + +Index: electron-17.1.2/gpu/command_buffer/client/gl_helper.h +=================================================================== +--- electron-17.1.2.orig/gpu/command_buffer/client/gl_helper.h 2022-03-11 08:49:29.988945132 +0100 ++++ electron-17.1.2/gpu/command_buffer/client/gl_helper.h 2022-03-11 09:19:54.553074408 +0100 +@@ -34,7 +34,7 @@ class ScopedGLuint { + GenFunc gen_func, + DeleteFunc delete_func) + : gl_(gl), id_(0u), delete_func_(delete_func) { +- (gl_->*gen_func)(1, &id_); ++ (gl_.get()->*gen_func)(1, &id_); + } + + operator GLuint() const { return id_; } +@@ -46,7 +46,7 @@ class ScopedGLuint { + + ~ScopedGLuint() { + if (id_ != 0) { +- (gl_->*delete_func_)(1, &id_); ++ (gl_.get()->*delete_func_)(1, &id_); + } + } + +@@ -86,13 +86,13 @@ class ScopedBinder { + typedef void (gles2::GLES2Interface::*BindFunc)(GLenum target, GLuint id); + ScopedBinder(gles2::GLES2Interface* gl, GLuint id, BindFunc bind_func) + : gl_(gl), bind_func_(bind_func) { +- (gl_->*bind_func_)(Target, id); ++ (gl_.get()->*bind_func_)(Target, id); + } + + ScopedBinder(const ScopedBinder&) = delete; + ScopedBinder& operator=(const ScopedBinder&) = delete; + +- virtual ~ScopedBinder() { (gl_->*bind_func_)(Target, 0); } ++ virtual ~ScopedBinder() { (gl_.get()->*bind_func_)(Target, 0); } + + private: + raw_ptr gl_; +Index: electron-17.1.2/ui/accessibility/ax_node.h +=================================================================== +--- electron-17.1.2.orig/ui/accessibility/ax_node.h 2022-03-11 08:49:41.565011045 +0100 ++++ electron-17.1.2/ui/accessibility/ax_node.h 2022-03-11 09:19:54.553074408 +0100 +@@ -826,10 +826,10 @@ AXNode::ChildIteratorBase*LastChild)()) ++ if (child_ == (parent_.get()->*LastChild)()) + child_ = nullptr; + else +- child_ = (child_->*NextSibling)(); ++ child_ = (child_.get()->*NextSibling)(); + } + + return *this; +@@ -854,12 +854,12 @@ AXNode::ChildIteratorBase*LastChild)(); ++ child_ = (parent_.get()->*LastChild)(); + // Decrement the iterator gives us the previous element, except when the + // iterator is at the beginning; in which case, decrementing the iterator + // remains at the beginning. +- else if (child_ != (parent_->*FirstChild)()) +- child_ = (child_->*PreviousSibling)(); ++ else if (child_ != (parent_.get()->*FirstChild)()) ++ child_ = (child_.get()->*PreviousSibling)(); + } + + return *this; +Index: electron-17.1.2/ui/views/layout/flex_layout_types.cc +=================================================================== +--- electron-17.1.2.orig/ui/views/layout/flex_layout_types.cc 2022-03-11 08:49:42.053013824 +0100 ++++ electron-17.1.2/ui/views/layout/flex_layout_types.cc 2022-03-11 09:19:54.557074435 +0100 +@@ -59,7 +59,7 @@ class LazySize { + const gfx::Size& operator*() const { return *get(); } + const gfx::Size* get() const { + if (!size_) +- size_ = (view_->*size_func_)(); ++ size_ = (view_.get()->*size_func_)(); + return &size_.value(); + } + LazyDimension width() const { +Index: electron-17.1.2/chrome/browser/ui/views/passwords/auto_signin_first_run_dialog_view.cc +=================================================================== +--- electron-17.1.2.orig/chrome/browser/ui/views/passwords/auto_signin_first_run_dialog_view.cc 2022-03-11 08:49:26.600925841 +0100 ++++ electron-17.1.2/chrome/browser/ui/views/passwords/auto_signin_first_run_dialog_view.cc 2022-03-11 09:19:54.557074435 +0100 +@@ -37,7 +37,7 @@ AutoSigninFirstRunDialogView::AutoSignin + auto call_controller = [](AutoSigninFirstRunDialogView* dialog, + ControllerCallbackFn func) { + if (dialog->controller_) { +- (dialog->controller_->*func)(); ++ (dialog->controller_.get()->*func)(); + } + }; + SetAcceptCallback( diff --git a/chromium-98-WaylandFrameManager-check.patch b/chromium-98-WaylandFrameManager-check.patch new file mode 100644 index 0000000..d2adf70 --- /dev/null +++ b/chromium-98-WaylandFrameManager-check.patch @@ -0,0 +1,27 @@ +From 8e2458ffc6727943518a622753b074b42e713403 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Sat, 18 Dec 2021 08:38:57 +0000 +Subject: [PATCH] libstdc++: fix DCHECK_NE in ui::WaylandFrameManager + +There is no CheckOpValueStr() for std::unique_ptr. Use get() to +compare pointer values. +--- + ui/ozone/platform/wayland/host/wayland_frame_manager.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ui/ozone/platform/wayland/host/wayland_frame_manager.cc b/ui/ozone/platform/wayland/host/wayland_frame_manager.cc +index 569526c..58fae14 100644 +--- a/ui/ozone/platform/wayland/host/wayland_frame_manager.cc ++++ b/ui/ozone/platform/wayland/host/wayland_frame_manager.cc +@@ -379,7 +379,7 @@ void WaylandFrameManager::OnPresentation( + // Investigate the issue with surface sync. + frame->feedback = gfx::PresentationFeedback::Failure(); + } +- CHECK_NE(frame, submitted_frames_.back()); ++ CHECK_NE(frame.get(), submitted_frames_.back().get()); + } + MaybeProcessSubmittedFrames(); + } +-- +2.32.0 + diff --git a/chromium-95-compiler.patch b/chromium-98-compiler.patch similarity index 83% rename from chromium-95-compiler.patch rename to chromium-98-compiler.patch index e113064..79af0b3 100644 --- a/chromium-95-compiler.patch +++ b/chromium-98-compiler.patch @@ -1,30 +1,31 @@ -From f4d0b0eb899005b4b8b6388e1d8bb82cc0018fc8 Mon Sep 17 00:00:00 2001 +From 307a0f63dd9b118f4b8470ed3d7567e81fdb7a6d Mon Sep 17 00:00:00 2001 From: Mike Gilbert -Date: Sat, 4 Sep 2021 15:13:20 +0000 +Date: Fri, 3 Dec 2021 09:50:31 +0000 Subject: [PATCH] Disable various compiler configs --- build/config/compiler/BUILD.gn | 105 ++++++--------------------------- 1 file changed, 17 insertions(+), 88 deletions(-) -Index: electron-16.0.6/build/config/compiler/BUILD.gn -=================================================================== ---- electron-16.0.6.orig/build/config/compiler/BUILD.gn 2022-01-10 16:06:45.853270221 +0100 -+++ electron-16.0.6/build/config/compiler/BUILD.gn 2022-01-13 16:02:25.885331379 +0100 -@@ -293,8 +293,6 @@ config("compiler") { +diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn +index 5365544..e6d9b56 100644 +--- a/build/config/compiler/BUILD.gn ++++ b/build/config/compiler/BUILD.gn +@@ -291,9 +291,7 @@ config("compiler") { configs += [ # See the definitions below. - ":clang_revision", + ":rustc_revision", - ":compiler_cpu_abi", ":compiler_codegen", ":compiler_deterministic", ] -@@ -533,24 +531,6 @@ config("compiler") { +@@ -534,31 +532,6 @@ config("compiler") { ldflags += [ "-Wl,-z,keep-text-section-prefix" ] } -- if (is_clang && !is_nacl && !use_xcode_clang) { +- if (is_clang && !is_nacl && current_os != "zos") { - cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] - - # TODO(hans): Remove this once Clang generates better optimized debug info @@ -40,12 +41,19 @@ Index: electron-16.0.6/build/config/compiler/BUILD.gn - ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ] - } - } +- +- # TODO(crbug.com/1235145): Investigate why/if this should be needed. +- if (is_win) { +- cflags += [ "/clang:-ffp-contract=off" ] +- } else { +- cflags += [ "-ffp-contract=off" ] +- } - } - # C11/C++11 compiler flags setup. # --------------------------- if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) || -@@ -1241,45 +1221,6 @@ config("compiler_deterministic") { +@@ -1231,45 +1204,6 @@ config("compiler_deterministic") { } } @@ -91,7 +99,7 @@ Index: electron-16.0.6/build/config/compiler/BUILD.gn # Tells the compiler not to use absolute paths when passing the default # paths to the tools it invokes. We don't want this because we don't # really need it and it can mess up the goma cache entries. -@@ -1562,7 +1503,7 @@ config("chromium_code") { +@@ -1556,7 +1490,7 @@ config("chromium_code") { defines = [ "_HAS_NODISCARD" ] } } else { @@ -100,7 +108,7 @@ Index: electron-16.0.6/build/config/compiler/BUILD.gn if (treat_warnings_as_errors) { cflags += [ "-Werror" ] -@@ -1571,10 +1512,6 @@ config("chromium_code") { +@@ -1565,10 +1499,6 @@ config("chromium_code") { # well. ldflags = [ "-Werror" ] } @@ -111,7 +119,7 @@ Index: electron-16.0.6/build/config/compiler/BUILD.gn # In Chromium code, we define __STDC_foo_MACROS in order to get the # C99 macros on Mac and Linux. -@@ -1583,15 +1520,6 @@ config("chromium_code") { +@@ -1577,15 +1507,6 @@ config("chromium_code") { "__STDC_FORMAT_MACROS", ] @@ -127,7 +135,7 @@ Index: electron-16.0.6/build/config/compiler/BUILD.gn if (is_mac) { cflags_objc = [ "-Wobjc-missing-property-synthesis" ] cflags_objcc = [ "-Wobjc-missing-property-synthesis" ] -@@ -1961,7 +1889,8 @@ config("default_stack_frames") { +@@ -1988,7 +1909,8 @@ config("default_stack_frames") { } # Default "optimization on" config. @@ -137,7 +145,7 @@ Index: electron-16.0.6/build/config/compiler/BUILD.gn if (is_win) { if (chrome_pgo_phase != 2) { # Favor size over speed, /O1 must be before the common flags. -@@ -2001,7 +1930,8 @@ config("optimize") { +@@ -2026,7 +1948,8 @@ config("optimize") { } # Turn off optimizations. @@ -147,7 +155,7 @@ Index: electron-16.0.6/build/config/compiler/BUILD.gn if (is_win) { cflags = [ "/Od", # Disable optimization. -@@ -2041,7 +1971,8 @@ config("no_optimize") { +@@ -2066,7 +1989,8 @@ config("no_optimize") { # Turns up the optimization level. On Windows, this implies whole program # optimization and link-time code generation which is very expensive and should # be used sparingly. @@ -157,7 +165,7 @@ Index: electron-16.0.6/build/config/compiler/BUILD.gn if (is_nacl && is_nacl_irt) { # The NaCl IRT is a special case and always wants its own config. # Various components do: -@@ -2074,7 +2005,8 @@ config("optimize_max") { +@@ -2099,7 +2023,8 @@ config("optimize_max") { # # TODO(crbug.com/621335) - rework how all of these configs are related # so that we don't need this disclaimer. @@ -167,7 +175,7 @@ Index: electron-16.0.6/build/config/compiler/BUILD.gn if (is_nacl && is_nacl_irt) { # The NaCl IRT is a special case and always wants its own config. # Various components do: -@@ -2100,7 +2032,8 @@ config("optimize_speed") { +@@ -2125,7 +2050,8 @@ config("optimize_speed") { } } @@ -177,7 +185,7 @@ Index: electron-16.0.6/build/config/compiler/BUILD.gn cflags = [ "-O1" ] + common_optimize_on_cflags rustflags = [ "-Copt-level=1" ] ldflags = common_optimize_on_ldflags -@@ -2220,7 +2153,8 @@ config("win_pdbaltpath") { +@@ -2245,7 +2171,8 @@ config("win_pdbaltpath") { } # Full symbols. @@ -187,7 +195,7 @@ Index: electron-16.0.6/build/config/compiler/BUILD.gn if (is_win) { if (is_clang) { cflags = [ "/Z7" ] # Debug information in the .obj files. -@@ -2334,7 +2268,8 @@ config("symbols") { +@@ -2369,7 +2296,8 @@ config("symbols") { # Minimal symbols. # This config guarantees to hold symbol for stack trace which are shown to user # when crash happens in unittests running on buildbot. @@ -197,7 +205,7 @@ Index: electron-16.0.6/build/config/compiler/BUILD.gn if (is_win) { # Functions, files, and line tables only. cflags = [] -@@ -2406,7 +2341,8 @@ config("minimal_symbols") { +@@ -2438,7 +2366,8 @@ config("minimal_symbols") { # This configuration contains function names only. That is, the compiler is # told to not generate debug information and the linker then just puts function # names in the final debug information. @@ -207,3 +215,6 @@ Index: electron-16.0.6/build/config/compiler/BUILD.gn if (is_win) { ldflags = [ "/DEBUG" ] +-- +2.32.0 + diff --git a/chromium-disable-parallel-gold.patch b/chromium-disable-parallel-gold.patch index 6334888..f4722e2 100644 --- a/chromium-disable-parallel-gold.patch +++ b/chromium-disable-parallel-gold.patch @@ -1,8 +1,8 @@ -Index: electron-16.0.6/build/config/compiler/BUILD.gn +Index: electron-17.1.0/build/config/compiler/BUILD.gn =================================================================== ---- electron-16.0.6.orig/build/config/compiler/BUILD.gn 2022-01-13 16:02:25.885331379 +0100 -+++ electron-16.0.6/build/config/compiler/BUILD.gn 2022-01-13 16:02:32.341363898 +0100 -@@ -473,8 +473,6 @@ config("compiler") { +--- electron-17.1.0.orig/build/config/compiler/BUILD.gn 2022-03-09 08:24:51.706873982 +0100 ++++ electron-17.1.0/build/config/compiler/BUILD.gn 2022-03-09 08:24:53.098851231 +0100 +@@ -475,8 +475,6 @@ config("compiler") { # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36 # Only apply this to the target linker, since the host # linker might not be gold, but isn't used much anyway. diff --git a/chromium-ffmpeg-first-dts.patch b/chromium-ffmpeg-first-dts.patch new file mode 100644 index 0000000..fafe5a6 --- /dev/null +++ b/chromium-ffmpeg-first-dts.patch @@ -0,0 +1,120 @@ +From 2aef9000a1c8d76d3072365ffcb471ebffa20d3d Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Tue, 15 Mar 2022 14:26:16 +0100 +Subject: [PATCH] Track first_dts instead of using non-upstream functions + +The function av_stream_get_first_dts() is not an upstream ffmpeg function and +is not available if you build with system ffmpeg. We can easily track the +first_dts on our own. + +See also +https://ffmpeg.org/pipermail/ffmpeg-devel/2021-September/285401.html + +Bug: 1306560 + +Signed-off-by: Andreas Schneider +Change-Id: I90ba3cf2f2e16f56a0b405f26c67f911349fb71d +--- + media/filters/ffmpeg_demuxer.cc | 18 ++++++++++++------ + media/filters/ffmpeg_demuxer.h | 3 +++ + 3 files changed, 16 insertions(+), 6 deletions(-) + +diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc +index 111899b661..799fc6e941 100644 +--- a/media/filters/ffmpeg_demuxer.cc ++++ b/media/filters/ffmpeg_demuxer.cc +@@ -97,7 +97,7 @@ static base::TimeDelta FramesToTimeDelta(int frames, double sample_rate) { + sample_rate); + } + +-static base::TimeDelta ExtractStartTime(AVStream* stream) { ++static base::TimeDelta ExtractStartTime(AVStream* stream, int64_t first_dts) { + // The default start time is zero. + base::TimeDelta start_time; + +@@ -107,12 +107,12 @@ static base::TimeDelta ExtractStartTime(AVStream* stream) { + + // Next try to use the first DTS value, for codecs where we know PTS == DTS + // (excludes all H26x codecs). The start time must be returned in PTS. +- if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp && ++ if (first_dts != AV_NOPTS_VALUE && + stream->codecpar->codec_id != AV_CODEC_ID_HEVC && + stream->codecpar->codec_id != AV_CODEC_ID_H264 && + stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) { + const base::TimeDelta first_pts = +- ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream)); ++ ConvertFromTimeBase(stream->time_base, first_dts); + if (first_pts < start_time) + start_time = first_pts; + } +@@ -283,6 +283,7 @@ FFmpegDemuxerStream::FFmpegDemuxerStream( + fixup_negative_timestamps_(false), + fixup_chained_ogg_(false), + num_discarded_packet_warnings_(0), ++ first_dts_(AV_NOPTS_VALUE), + last_packet_pos_(AV_NOPTS_VALUE), + last_packet_dts_(AV_NOPTS_VALUE) { + DCHECK(demuxer_); +@@ -349,6 +350,10 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) { + int64_t packet_dts = + packet->dts == AV_NOPTS_VALUE ? packet->pts : packet->dts; + ++ if (first_dts_ == AV_NOPTS_VALUE) { ++ first_dts_ = packet_dts; ++ } ++ + // Chained ogg files have non-monotonically increasing position and time stamp + // values, which prevents us from using them to determine if a packet should + // be dropped. Since chained ogg is only allowed on single track audio only +@@ -1442,7 +1447,8 @@ void FFmpegDemuxer::OnFindStreamInfoDone(int result) { + + max_duration = std::max(max_duration, streams_[i]->duration()); + +- base::TimeDelta start_time = ExtractStartTime(stream); ++ base::TimeDelta start_time = ++ ExtractStartTime(stream, streams_[i]->first_dts()); + + // Note: This value is used for seeking, so we must take the true value and + // not the one possibly clamped to zero below. +@@ -1599,7 +1605,7 @@ FFmpegDemuxerStream* FFmpegDemuxer::FindStreamWithLowestStartTimestamp( + for (const auto& stream : streams_) { + if (!stream || stream->IsEnabled() != enabled) + continue; +- if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker) ++ if (stream->first_dts() == AV_NOPTS_VALUE) + continue; + if (!lowest_start_time_stream || + stream->start_time() < lowest_start_time_stream->start_time()) { +@@ -1620,7 +1626,7 @@ FFmpegDemuxerStream* FFmpegDemuxer::FindPreferredStreamForSeeking( + if (stream->type() != DemuxerStream::VIDEO) + continue; + +- if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker) ++ if (stream->first_dts() == AV_NOPTS_VALUE) + continue; + + if (!stream->IsEnabled()) +diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h +index c147309d6f..48a8f6ad8c 100644 +--- a/media/filters/ffmpeg_demuxer.h ++++ b/media/filters/ffmpeg_demuxer.h +@@ -151,6 +151,8 @@ class MEDIA_EXPORT FFmpegDemuxerStream : public DemuxerStream { + base::TimeDelta start_time() const { return start_time_; } + void set_start_time(base::TimeDelta time) { start_time_ = time; } + ++ int64_t first_dts() const { return first_dts_; } ++ + private: + friend class FFmpegDemuxerTest; + +@@ -208,6 +210,7 @@ class MEDIA_EXPORT FFmpegDemuxerStream : public DemuxerStream { + bool fixup_chained_ogg_; + + int num_discarded_packet_warnings_; ++ int64_t first_dts_; + int64_t last_packet_pos_; + int64_t last_packet_dts_; + }; +-- +2.35.1 + diff --git a/chromium-gcc11.patch b/chromium-gcc11.patch index e3ddddb..3880c02 100644 --- a/chromium-gcc11.patch +++ b/chromium-gcc11.patch @@ -1,7 +1,7 @@ -Index: electron-16.0.6/third_party/angle/src/libANGLE/HandleAllocator.cpp +Index: electron-17.1.0/third_party/angle/src/libANGLE/HandleAllocator.cpp =================================================================== ---- electron-16.0.6.orig/third_party/angle/src/libANGLE/HandleAllocator.cpp 2022-01-10 16:09:11.798243050 +0100 -+++ electron-16.0.6/third_party/angle/src/libANGLE/HandleAllocator.cpp 2022-01-13 16:02:43.673424038 +0100 +--- electron-17.1.0.orig/third_party/angle/src/libANGLE/HandleAllocator.cpp 2022-03-07 17:22:29.553295179 +0100 ++++ electron-17.1.0/third_party/angle/src/libANGLE/HandleAllocator.cpp 2022-03-09 08:25:10.346569313 +0100 @@ -9,6 +9,7 @@ #include "libANGLE/HandleAllocator.h" @@ -10,10 +10,10 @@ Index: electron-16.0.6/third_party/angle/src/libANGLE/HandleAllocator.cpp #include #include -Index: electron-16.0.6/third_party/perfetto/src/trace_processor/containers/string_pool.cc +Index: electron-17.1.0/third_party/perfetto/src/trace_processor/containers/string_pool.cc =================================================================== ---- electron-16.0.6.orig/third_party/perfetto/src/trace_processor/containers/string_pool.cc 2022-01-10 16:14:42.636448325 +0100 -+++ electron-16.0.6/third_party/perfetto/src/trace_processor/containers/string_pool.cc 2022-01-13 16:02:43.673424038 +0100 +--- electron-17.1.0.orig/third_party/perfetto/src/trace_processor/containers/string_pool.cc 2022-03-07 17:28:24.814737660 +0100 ++++ electron-17.1.0/third_party/perfetto/src/trace_processor/containers/string_pool.cc 2022-03-09 08:25:10.346569313 +0100 @@ -14,9 +14,9 @@ * limitations under the License. */ @@ -25,10 +25,10 @@ Index: electron-16.0.6/third_party/perfetto/src/trace_processor/containers/strin #include "perfetto/base/logging.h" #include "perfetto/ext/base/utils.h" -Index: electron-16.0.6/third_party/perfetto/src/trace_processor/db/column.cc +Index: electron-17.1.0/third_party/perfetto/src/trace_processor/db/column.cc =================================================================== ---- electron-16.0.6.orig/third_party/perfetto/src/trace_processor/db/column.cc 2022-01-10 16:14:42.636448325 +0100 -+++ electron-16.0.6/third_party/perfetto/src/trace_processor/db/column.cc 2022-01-13 16:02:43.673424038 +0100 +--- electron-17.1.0.orig/third_party/perfetto/src/trace_processor/db/column.cc 2022-03-07 17:28:24.814737660 +0100 ++++ electron-17.1.0/third_party/perfetto/src/trace_processor/db/column.cc 2022-03-09 08:25:10.346569313 +0100 @@ -14,6 +14,7 @@ * limitations under the License. */ @@ -37,10 +37,10 @@ Index: electron-16.0.6/third_party/perfetto/src/trace_processor/db/column.cc #include "src/trace_processor/db/column.h" #include "src/trace_processor/db/compare.h" -Index: electron-16.0.6/third_party/perfetto/src/trace_processor/types/variadic.cc +Index: electron-17.1.0/third_party/perfetto/src/trace_processor/types/variadic.cc =================================================================== ---- electron-16.0.6.orig/third_party/perfetto/src/trace_processor/types/variadic.cc 2022-01-10 16:14:42.656448460 +0100 -+++ electron-16.0.6/third_party/perfetto/src/trace_processor/types/variadic.cc 2022-01-13 16:02:43.677424060 +0100 +--- electron-17.1.0.orig/third_party/perfetto/src/trace_processor/types/variadic.cc 2022-03-07 17:28:24.838737758 +0100 ++++ electron-17.1.0/third_party/perfetto/src/trace_processor/types/variadic.cc 2022-03-09 08:25:10.346569313 +0100 @@ -14,6 +14,7 @@ * limitations under the License. */ @@ -49,10 +49,10 @@ Index: electron-16.0.6/third_party/perfetto/src/trace_processor/types/variadic.c #include "src/trace_processor/types/variadic.h" namespace perfetto { -Index: electron-16.0.6/ui/accessibility/platform/ax_platform_atk_hyperlink.cc +Index: electron-17.1.0/ui/accessibility/platform/ax_platform_atk_hyperlink.cc =================================================================== ---- electron-16.0.6.orig/ui/accessibility/platform/ax_platform_atk_hyperlink.cc 2022-01-10 16:07:03.045384820 +0100 -+++ electron-16.0.6/ui/accessibility/platform/ax_platform_atk_hyperlink.cc 2022-01-13 16:02:43.677424060 +0100 +--- electron-17.1.0.orig/ui/accessibility/platform/ax_platform_atk_hyperlink.cc 2022-03-07 17:20:48.460884710 +0100 ++++ electron-17.1.0/ui/accessibility/platform/ax_platform_atk_hyperlink.cc 2022-03-09 08:25:10.346569313 +0100 @@ -245,7 +245,7 @@ static void AXPlatformAtkHyperlinkInit(A } @@ -62,11 +62,11 @@ Index: electron-16.0.6/ui/accessibility/platform/ax_platform_atk_hyperlink.cc AXPlatformNodeAuraLinux::EnsureGTypeInit(); -Index: electron-16.0.6/ui/accessibility/platform/ax_platform_node_auralinux.cc +Index: electron-17.1.0/ui/accessibility/platform/ax_platform_node_auralinux.cc =================================================================== ---- electron-16.0.6.orig/ui/accessibility/platform/ax_platform_node_auralinux.cc 2022-01-10 16:07:03.049384849 +0100 -+++ electron-16.0.6/ui/accessibility/platform/ax_platform_node_auralinux.cc 2022-01-13 16:02:43.677424060 +0100 -@@ -2274,7 +2274,7 @@ void ClassInit(gpointer class_pointer, g +--- electron-17.1.0.orig/ui/accessibility/platform/ax_platform_node_auralinux.cc 2022-03-07 17:20:48.460884710 +0100 ++++ electron-17.1.0/ui/accessibility/platform/ax_platform_node_auralinux.cc 2022-03-09 08:25:10.346569313 +0100 +@@ -2275,7 +2275,7 @@ void ClassInit(gpointer class_pointer, g GType GetType() { AXPlatformNodeAuraLinux::EnsureGTypeInit(); @@ -75,10 +75,10 @@ Index: electron-16.0.6/ui/accessibility/platform/ax_platform_node_auralinux.cc if (g_once_init_enter(&type_volatile)) { static const GTypeInfo type_info = { sizeof(AXPlatformNodeAuraLinuxClass), // class_size -Index: electron-16.0.6/ui/gtk/gtk_key_bindings_handler.cc +Index: electron-17.1.0/ui/gtk/gtk_key_bindings_handler.cc =================================================================== ---- electron-16.0.6.orig/ui/gtk/gtk_key_bindings_handler.cc 2022-01-10 16:07:03.365386955 +0100 -+++ electron-16.0.6/ui/gtk/gtk_key_bindings_handler.cc 2022-01-13 16:02:43.677424060 +0100 +--- electron-17.1.0.orig/ui/gtk/gtk_key_bindings_handler.cc 2022-03-07 17:20:48.816886156 +0100 ++++ electron-17.1.0/ui/gtk/gtk_key_bindings_handler.cc 2022-03-09 08:25:10.346569313 +0100 @@ -120,7 +120,7 @@ void GtkKeyBindingsHandler::HandlerClass } @@ -88,10 +88,10 @@ Index: electron-16.0.6/ui/gtk/gtk_key_bindings_handler.cc if (g_once_init_enter(&type_id_volatile)) { GType type_id = g_type_register_static_simple( GTK_TYPE_TEXT_VIEW, g_intern_static_string("GtkKeyBindingsHandler"), -Index: electron-16.0.6/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc +Index: electron-17.1.0/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc =================================================================== ---- electron-16.0.6.orig/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc 2022-01-10 16:06:47.881283740 +0100 -+++ electron-16.0.6/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc 2022-01-13 16:02:43.681424081 +0100 +--- electron-17.1.0.orig/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc 2022-03-07 17:20:31.788817015 +0100 ++++ electron-17.1.0/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc 2022-03-09 08:25:10.346569313 +0100 @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -100,10 +100,10 @@ Index: electron-16.0.6/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" #include "base/observer_list.h" -Index: electron-16.0.6/components/bookmarks/browser/bookmark_expanded_state_tracker.cc +Index: electron-17.1.0/components/bookmarks/browser/bookmark_expanded_state_tracker.cc =================================================================== ---- electron-16.0.6.orig/components/bookmarks/browser/bookmark_expanded_state_tracker.cc 2022-01-10 16:06:49.325293365 +0100 -+++ electron-16.0.6/components/bookmarks/browser/bookmark_expanded_state_tracker.cc 2022-01-13 16:02:43.681424081 +0100 +--- electron-17.1.0.orig/components/bookmarks/browser/bookmark_expanded_state_tracker.cc 2022-03-07 17:20:33.308823187 +0100 ++++ electron-17.1.0/components/bookmarks/browser/bookmark_expanded_state_tracker.cc 2022-03-09 08:25:10.346569313 +0100 @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -112,10 +112,10 @@ Index: electron-16.0.6/components/bookmarks/browser/bookmark_expanded_state_trac #include "components/bookmarks/browser/bookmark_expanded_state_tracker.h" #include -Index: electron-16.0.6/components/bookmarks/browser/base_bookmark_model_observer.cc +Index: electron-17.1.0/components/bookmarks/browser/base_bookmark_model_observer.cc =================================================================== ---- electron-16.0.6.orig/components/bookmarks/browser/base_bookmark_model_observer.cc 2022-01-10 16:06:49.325293365 +0100 -+++ electron-16.0.6/components/bookmarks/browser/base_bookmark_model_observer.cc 2022-01-13 16:02:43.681424081 +0100 +--- electron-17.1.0.orig/components/bookmarks/browser/base_bookmark_model_observer.cc 2022-03-07 17:20:33.308823187 +0100 ++++ electron-17.1.0/components/bookmarks/browser/base_bookmark_model_observer.cc 2022-03-09 08:25:10.346569313 +0100 @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/chromium-glibc-2.34.patch b/chromium-glibc-2.34.patch index 6180296..f2adfb3 100644 --- a/chromium-glibc-2.34.patch +++ b/chromium-glibc-2.34.patch @@ -1,20 +1,8 @@ -Index: electron-16.0.6/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc +From: https://forums.gentoo.org/viewtopic-p-8644495.html +Index: electron-17.1.2/sandbox/linux/services/credentials.cc =================================================================== ---- electron-16.0.6.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2022-01-10 16:08:04.821796604 +0100 -+++ electron-16.0.6/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2022-01-13 16:03:37.805718344 +0100 -@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() { - // SIGSTKSZ may be too small to prevent the signal handlers from overrunning - // the alternative stack. Ensure that the size of the alternative stack is - // large enough. -- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); -+ static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); - - // Only set an alternative stack if there isn't already one, or if the current - // one is too small. -Index: electron-16.0.6/sandbox/linux/services/credentials.cc -=================================================================== ---- electron-16.0.6.orig/sandbox/linux/services/credentials.cc 2022-01-10 16:06:52.909317255 +0100 -+++ electron-16.0.6/sandbox/linux/services/credentials.cc 2022-01-13 16:03:37.805718344 +0100 +--- electron-17.1.2.orig/sandbox/linux/services/credentials.cc 2022-03-11 08:49:31.620954425 +0100 ++++ electron-17.1.2/sandbox/linux/services/credentials.cc 2022-03-11 09:17:31.024046235 +0100 @@ -100,7 +100,9 @@ bool ChrootToSafeEmptyDir() { // TODO(crbug.com/1247458) Broken in MSan builds after LLVM f1bb30a4956f. clone_flags |= CLONE_VM | CLONE_VFORK | CLONE_SETTLS; diff --git a/chromium-norar.patch b/chromium-norar.patch index dbac3a0..1841a0b 100644 --- a/chromium-norar.patch +++ b/chromium-norar.patch @@ -1,7 +1,7 @@ -Index: electron-16.0.6/chrome/common/safe_browsing/BUILD.gn +Index: electron-17.1.0/chrome/common/safe_browsing/BUILD.gn =================================================================== ---- electron-16.0.6.orig/chrome/common/safe_browsing/BUILD.gn 2022-01-10 16:06:48.181285739 +0100 -+++ electron-16.0.6/chrome/common/safe_browsing/BUILD.gn 2022-01-13 16:03:25.281650253 +0100 +--- electron-17.1.0.orig/chrome/common/safe_browsing/BUILD.gn 2022-03-07 17:20:32.164818543 +0100 ++++ electron-17.1.0/chrome/common/safe_browsing/BUILD.gn 2022-03-09 08:25:16.218473339 +0100 @@ -58,39 +58,6 @@ if (safe_browsing_mode == 1) { public_deps = [ "//components/safe_browsing/core/common/proto:csd_proto" ] } @@ -50,10 +50,10 @@ Index: electron-16.0.6/chrome/common/safe_browsing/BUILD.gn "//components/safe_browsing/core/common", ] -Index: electron-16.0.6/chrome/common/safe_browsing/DEPS +Index: electron-17.1.0/chrome/common/safe_browsing/DEPS =================================================================== ---- electron-16.0.6.orig/chrome/common/safe_browsing/DEPS 2022-01-13 16:02:48.153448394 +0100 -+++ electron-16.0.6/chrome/common/safe_browsing/DEPS 2022-01-13 16:02:59.521510198 +0100 +--- electron-17.1.0.orig/chrome/common/safe_browsing/DEPS 2022-03-07 17:20:32.164818543 +0100 ++++ electron-17.1.0/chrome/common/safe_browsing/DEPS 2022-03-09 08:25:16.218473339 +0100 @@ -3,6 +3,5 @@ include_rules = [ "+components/safe_browsing/core/common", "+third_party/maldoca", @@ -61,10 +61,10 @@ Index: electron-16.0.6/chrome/common/safe_browsing/DEPS - "+third_party/unrar", "+third_party/zlib", ] -Index: electron-16.0.6/chrome/services/file_util/BUILD.gn +Index: electron-17.1.0/chrome/services/file_util/BUILD.gn =================================================================== ---- electron-16.0.6.orig/chrome/services/file_util/BUILD.gn 2022-01-13 16:02:48.153448394 +0100 -+++ electron-16.0.6/chrome/services/file_util/BUILD.gn 2022-01-13 16:02:59.521510198 +0100 +--- electron-17.1.0.orig/chrome/services/file_util/BUILD.gn 2022-03-07 17:20:32.260818933 +0100 ++++ electron-17.1.0/chrome/services/file_util/BUILD.gn 2022-03-09 08:25:16.218473339 +0100 @@ -60,7 +60,6 @@ source_set("file_util") { deps += [ "//chrome/common/safe_browsing", @@ -73,11 +73,11 @@ Index: electron-16.0.6/chrome/services/file_util/BUILD.gn ] if (is_linux || is_win) { -Index: electron-16.0.6/chrome/services/file_util/safe_archive_analyzer.cc +Index: electron-17.1.0/chrome/services/file_util/safe_archive_analyzer.cc =================================================================== ---- electron-16.0.6.orig/chrome/services/file_util/safe_archive_analyzer.cc 2022-01-13 16:02:48.153448394 +0100 -+++ electron-16.0.6/chrome/services/file_util/safe_archive_analyzer.cc 2022-01-13 16:02:59.521510198 +0100 -@@ -45,10 +45,14 @@ void SafeArchiveAnalyzer::AnalyzeDmgFile +--- electron-17.1.0.orig/chrome/services/file_util/safe_archive_analyzer.cc 2022-03-07 17:20:32.264818949 +0100 ++++ electron-17.1.0/chrome/services/file_util/safe_archive_analyzer.cc 2022-03-09 08:25:16.218473339 +0100 +@@ -44,10 +44,14 @@ void SafeArchiveAnalyzer::AnalyzeDmgFile void SafeArchiveAnalyzer::AnalyzeRarFile(base::File rar_file, base::File temporary_file, AnalyzeRarFileCallback callback) { diff --git a/chromium-vaapi.patch b/chromium-vaapi.patch index 7199057..0533360 100644 --- a/chromium-vaapi.patch +++ b/chromium-vaapi.patch @@ -1,8 +1,8 @@ -Index: electron-16.0.6/chrome/browser/about_flags.cc +Index: electron-17.1.0/chrome/browser/about_flags.cc =================================================================== ---- electron-16.0.6.orig/chrome/browser/about_flags.cc 2022-01-10 16:06:46.589275127 +0100 -+++ electron-16.0.6/chrome/browser/about_flags.cc 2022-01-13 16:03:32.565689855 +0100 -@@ -3817,12 +3817,12 @@ const FeatureEntry kFeatureEntries[] = { +--- electron-17.1.0.orig/chrome/browser/about_flags.cc 2022-03-07 17:20:30.424811477 +0100 ++++ electron-17.1.0/chrome/browser/about_flags.cc 2022-03-09 08:25:19.662417046 +0100 +@@ -3822,12 +3822,12 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kWebXrForceRuntimeDescription, kOsDesktop, MULTI_VALUE_TYPE(kWebXrForceRuntimeChoices)}, #endif // ENABLE_VR @@ -18,13 +18,13 @@ Index: electron-16.0.6/chrome/browser/about_flags.cc {"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName, flag_descriptions::kSystemKeyboardLockDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kSystemKeyboardLock)}, -Index: electron-16.0.6/chrome/browser/flag_descriptions.cc +Index: electron-17.1.0/chrome/browser/flag_descriptions.cc =================================================================== ---- electron-16.0.6.orig/chrome/browser/flag_descriptions.cc 2022-01-10 16:06:47.041278140 +0100 -+++ electron-16.0.6/chrome/browser/flag_descriptions.cc 2022-01-13 16:03:32.569689877 +0100 -@@ -4002,12 +4002,24 @@ const char kAccountManagementFlowsV2Desc - "Settings. " - "See go/betterAM"; +--- electron-17.1.0.orig/chrome/browser/flag_descriptions.cc 2022-03-07 17:20:30.960813654 +0100 ++++ electron-17.1.0/chrome/browser/flag_descriptions.cc 2022-03-09 08:25:19.662417046 +0100 +@@ -3981,12 +3981,24 @@ const char kUseAngleGL[] = "OpenGL"; + + #if BUILDFLAG(IS_CHROMEOS_ASH) +#endif + @@ -47,13 +47,13 @@ Index: electron-16.0.6/chrome/browser/flag_descriptions.cc const char kAllowDisableMouseAccelerationName[] = "Allow disabling mouse acceleration"; const char kAllowDisableMouseAccelerationDescription[] = -Index: electron-16.0.6/chrome/browser/flag_descriptions.h +Index: electron-17.1.0/chrome/browser/flag_descriptions.h =================================================================== ---- electron-16.0.6.orig/chrome/browser/flag_descriptions.h 2022-01-10 16:06:47.041278140 +0100 -+++ electron-16.0.6/chrome/browser/flag_descriptions.h 2022-01-13 16:03:32.573689898 +0100 -@@ -2295,9 +2295,21 @@ extern const char kUseAngleGL[]; - extern const char kAccountManagementFlowsV2Name[]; - extern const char kAccountManagementFlowsV2Description[]; +--- electron-17.1.0.orig/chrome/browser/flag_descriptions.h 2022-03-07 17:20:30.960813654 +0100 ++++ electron-17.1.0/chrome/browser/flag_descriptions.h 2022-03-09 08:25:19.666416981 +0100 +@@ -2299,9 +2299,21 @@ extern const char kUseAngleGL[]; + + #if BUILDFLAG(IS_CHROMEOS_ASH) +#endif + diff --git a/electron-13-fix-base-check-nomerge.patch b/electron-13-fix-base-check-nomerge.patch index ad9aa39..32d5a69 100644 --- a/electron-13-fix-base-check-nomerge.patch +++ b/electron-13-fix-base-check-nomerge.patch @@ -1,8 +1,8 @@ -Index: electron-15.3.3/base/compiler_specific.h +Index: electron-17.1.0/base/compiler_specific.h =================================================================== ---- electron-15.3.3.orig/base/compiler_specific.h 2021-12-15 12:00:50.016321177 +0100 -+++ electron-15.3.3/base/compiler_specific.h 2021-12-15 13:09:17.144985381 +0100 -@@ -365,7 +365,8 @@ inline constexpr bool AnalyzerAssumeTrue +--- electron-17.1.0.orig/base/compiler_specific.h 2022-03-07 17:20:29.460807562 +0100 ++++ electron-17.1.0/base/compiler_specific.h 2022-03-09 08:28:51.902933750 +0100 +@@ -366,7 +366,8 @@ inline constexpr bool AnalyzerAssumeTrue #endif // defined(__clang_analyzer__) // Use nomerge attribute to disable optimization of merging multiple same calls. diff --git a/electron-13-fix-sql-virtualcursor-type.patch b/electron-13-fix-sql-virtualcursor-type.patch index b0a1640..86dc583 100644 --- a/electron-13-fix-sql-virtualcursor-type.patch +++ b/electron-13-fix-sql-virtualcursor-type.patch @@ -20,10 +20,10 @@ Change-Id: Ia6dc388cc5ef1c0f2afc75f8ca45b9f12687ca9c sql/recover_module/pager.h | 5 +++-- 6 files changed, 47 insertions(+), 29 deletions(-) -Index: electron-15.3.3/sql/recover_module/btree.cc +Index: electron-17.1.0/sql/recover_module/btree.cc =================================================================== ---- electron-15.3.3.orig/sql/recover_module/btree.cc 2021-12-15 12:00:57.864361036 +0100 -+++ electron-15.3.3/sql/recover_module/btree.cc 2021-12-15 13:09:05.476916962 +0100 +--- electron-17.1.0.orig/sql/recover_module/btree.cc 2022-03-07 17:20:37.440839965 +0100 ++++ electron-17.1.0/sql/recover_module/btree.cc 2022-03-09 08:27:33.744217386 +0100 @@ -136,16 +136,25 @@ static_assert(std::is_trivially_destruct "Move the destructor to the .cc file if it's non-trival"); #endif // !DCHECK_IS_ON() @@ -56,10 +56,10 @@ Index: electron-15.3.3/sql/recover_module/btree.cc bool LeafPageDecoder::TryAdvance() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(CanAdvance()); -Index: electron-15.3.3/sql/recover_module/btree.h +Index: electron-17.1.0/sql/recover_module/btree.h =================================================================== ---- electron-15.3.3.orig/sql/recover_module/btree.h 2021-12-15 12:00:57.864361036 +0100 -+++ electron-15.3.3/sql/recover_module/btree.h 2021-12-15 13:09:05.476916962 +0100 +--- electron-17.1.0.orig/sql/recover_module/btree.h 2022-03-07 17:20:37.440839965 +0100 ++++ electron-17.1.0/sql/recover_module/btree.h 2022-03-09 08:27:33.744217386 +0100 @@ -103,7 +103,7 @@ class LeafPageDecoder { // // |db_reader| must have been used to read an inner page of a table B-tree. @@ -103,10 +103,10 @@ Index: electron-15.3.3/sql/recover_module/btree.h // The reader's cursor state. // -Index: electron-15.3.3/sql/recover_module/cursor.cc +Index: electron-17.1.0/sql/recover_module/cursor.cc =================================================================== ---- electron-15.3.3.orig/sql/recover_module/cursor.cc 2021-12-15 12:00:57.864361036 +0100 -+++ electron-15.3.3/sql/recover_module/cursor.cc 2021-12-15 13:09:05.476916962 +0100 +--- electron-17.1.0.orig/sql/recover_module/cursor.cc 2022-03-07 17:20:37.440839965 +0100 ++++ electron-17.1.0/sql/recover_module/cursor.cc 2022-03-09 08:27:33.744217386 +0100 @@ -28,7 +28,7 @@ VirtualCursor::~VirtualCursor() { int VirtualCursor::First() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -168,11 +168,11 @@ Index: electron-15.3.3/sql/recover_module/cursor.cc return; } -Index: electron-15.3.3/sql/recover_module/cursor.h +Index: electron-17.1.0/sql/recover_module/cursor.h =================================================================== ---- electron-15.3.3.orig/sql/recover_module/cursor.h 2021-12-15 12:00:57.864361036 +0100 -+++ electron-15.3.3/sql/recover_module/cursor.h 2021-12-15 13:09:05.476916962 +0100 -@@ -129,7 +129,7 @@ class VirtualCursor { +--- electron-17.1.0.orig/sql/recover_module/cursor.h 2022-03-07 17:20:37.440839965 +0100 ++++ electron-17.1.0/sql/recover_module/cursor.h 2022-03-09 08:27:33.744217386 +0100 +@@ -130,7 +130,7 @@ class VirtualCursor { std::vector> inner_decoders_; // Decodes the leaf page containing records. @@ -181,10 +181,10 @@ Index: electron-15.3.3/sql/recover_module/cursor.h SEQUENCE_CHECKER(sequence_checker_); }; -Index: electron-15.3.3/sql/recover_module/pager.cc +Index: electron-17.1.0/sql/recover_module/pager.cc =================================================================== ---- electron-15.3.3.orig/sql/recover_module/pager.cc 2021-12-15 12:00:57.864361036 +0100 -+++ electron-15.3.3/sql/recover_module/pager.cc 2021-12-15 13:09:05.476916962 +0100 +--- electron-17.1.0.orig/sql/recover_module/pager.cc 2022-03-07 17:20:37.440839965 +0100 ++++ electron-17.1.0/sql/recover_module/pager.cc 2022-03-09 08:27:33.744217386 +0100 @@ -23,8 +23,7 @@ static_assert(DatabasePageReader::kMaxPa "ints are not appropriate for representing page IDs"); @@ -206,10 +206,10 @@ Index: electron-15.3.3/sql/recover_module/pager.cc // |page_id_| needs to be set to kInvalidPageId if the read failed. // Otherwise, future ReadPage() calls with the previous |page_id_| value -Index: electron-15.3.3/sql/recover_module/pager.h +Index: electron-17.1.0/sql/recover_module/pager.h =================================================================== ---- electron-15.3.3.orig/sql/recover_module/pager.h 2021-12-15 12:00:57.864361036 +0100 -+++ electron-15.3.3/sql/recover_module/pager.h 2021-12-15 13:09:05.476916962 +0100 +--- electron-17.1.0.orig/sql/recover_module/pager.h 2022-03-07 17:20:37.440839965 +0100 ++++ electron-17.1.0/sql/recover_module/pager.h 2022-03-09 08:27:33.744217386 +0100 @@ -5,6 +5,7 @@ #ifndef SQL_RECOVER_MODULE_PAGER_H_ #define SQL_RECOVER_MODULE_PAGER_H_ @@ -218,7 +218,7 @@ Index: electron-15.3.3/sql/recover_module/pager.h #include #include #include -@@ -71,7 +72,7 @@ class DatabasePageReader { +@@ -72,7 +73,7 @@ class DatabasePageReader { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_NE(page_id_, kInvalidPageId) << "Successful ReadPage() required before accessing pager state"; @@ -227,7 +227,7 @@ Index: electron-15.3.3/sql/recover_module/pager.h } // The number of bytes in the page read by the last ReadPage() call. -@@ -138,7 +139,7 @@ class DatabasePageReader { +@@ -139,7 +140,7 @@ class DatabasePageReader { int page_id_ = kInvalidPageId; // Stores the bytes of the last page successfully read by ReadPage(). // The content is undefined if the last call to ReadPage() did not succeed. @@ -235,4 +235,4 @@ Index: electron-15.3.3/sql/recover_module/pager.h + const std::array page_data_; // Raw pointer usage is acceptable because this instance's owner is expected // to ensure that the VirtualTable outlives this. - VirtualTable* const table_; + const raw_ptr table_; diff --git a/electron-13-fix-use-thin-lto.patch b/electron-13-fix-use-thin-lto.patch index ca8177e..acfbd06 100644 --- a/electron-13-fix-use-thin-lto.patch +++ b/electron-13-fix-use-thin-lto.patch @@ -1,21 +1,22 @@ -Index: electron-16.0.6/build/config/compiler/compiler.gni +Index: electron-17.1.0/build/config/compiler/compiler.gni =================================================================== ---- electron-16.0.6.orig/build/config/compiler/compiler.gni 2022-01-10 16:06:45.853270221 +0100 -+++ electron-16.0.6/build/config/compiler/compiler.gni 2022-01-13 16:04:39.322052806 +0100 -@@ -71,11 +71,11 @@ declare_args() { +--- electron-17.1.0.orig/build/config/compiler/compiler.gni 2022-03-09 08:27:56.719840060 +0100 ++++ electron-17.1.0/build/config/compiler/compiler.gni 2022-03-09 13:07:58.709063960 +0100 +@@ -71,11 +71,12 @@ declare_args() { # Use it by default on official-optimized android and Chrome OS builds, but # not ARC or linux-chromeos since it's been seen to not play nicely with # Chrome's clang. crbug.com/1033839 - use_thin_lto = - is_cfi || -- (is_official_build && chrome_pgo_phase != 1 && +- (is_clang && is_official_build && chrome_pgo_phase != 1 && - (is_linux || is_win || (is_android && target_os != "chromeos") || - ((is_chromeos_ash || is_chromeos_lacros) && is_chromeos_device))) ++ # use_thin_lto = ++ # is_cfi || ++ # (is_clang && is_official_build && chrome_pgo_phase != 1 && ++ # (is_linux || is_win || (is_android && target_os != "chromeos") || ++ # ((is_chromeos_ash || is_chromeos_lacros) && is_chromeos_device))) + use_thin_lto = false -+ # is_cfi || -+ # (is_official_build && chrome_pgo_phase != 1 && -+ # (is_linux || is_win || (is_android && target_os != "chromeos") || -+ # ((is_chromeos_ash || is_chromeos_lacros) && is_chromeos_device))) # If true, use Goma for ThinLTO code generation where applicable. use_goma_thin_lto = false diff --git a/electron-16-fix-swiftshader-template.patch b/electron-16-fix-swiftshader-template.patch new file mode 100644 index 0000000..d17216e --- /dev/null +++ b/electron-16-fix-swiftshader-template.patch @@ -0,0 +1,70 @@ +Index: electron-16.0.9/third_party/swiftshader/third_party/subzero/src/IceInstX8664.cpp +=================================================================== +--- electron-16.0.9.orig/third_party/swiftshader/third_party/subzero/src/IceInstX8664.cpp 2022-02-16 18:11:13.517899468 +0100 ++++ electron-16.0.9/third_party/swiftshader/third_party/subzero/src/IceInstX8664.cpp 2022-02-24 14:35:08.328190810 +0100 +@@ -659,6 +659,7 @@ void emitIASOpTyGPR(const Cfg *Func, Typ + } + } + ++#if 0 + template + void emitIASRegOpTyGPR(const Cfg *Func, Type Ty, const Variable *Var, + const Operand *Src, const GPREmitterRegOp &Emitter) { +@@ -697,6 +698,7 @@ void emitIASRegOpTyGPR(const Cfg *Func, + llvm_unreachable("Unexpected operand type"); + } + } ++#endif + + void emitIASAddrOpTyGPR(const Cfg *Func, Type Ty, const AsmAddress &Addr, + const Operand *Src, const GPREmitterAddrOp &Emitter) { +Index: electron-16.0.9/third_party/swiftshader/third_party/subzero/src/IceInstX8664.h +=================================================================== +--- electron-16.0.9.orig/third_party/swiftshader/third_party/subzero/src/IceInstX8664.h 2022-02-16 18:11:13.517899468 +0100 ++++ electron-16.0.9/third_party/swiftshader/third_party/subzero/src/IceInstX8664.h 2022-02-24 15:14:53.316809270 +0100 +@@ -576,8 +576,43 @@ void emitIASXmmShift(const Cfg *Func, Ty + /// Emit a two-operand (GPR) instruction, where the dest operand is a Variable + /// that's guaranteed to be a register. + template +-void emitIASRegOpTyGPR(const Cfg *Func, Type Ty, const Variable *Dst, +- const Operand *Src, const GPREmitterRegOp &Emitter); ++void emitIASRegOpTyGPR(const Cfg *Func, Type Ty, const Variable *Var, ++ const Operand *Src, const GPREmitterRegOp &Emitter) { ++ auto *Target = InstX86Base::getTarget(Func); ++ Assembler *Asm = Func->getAssembler(); ++ assert(Var->hasReg()); ++ // We cheat a little and use GPRRegister even for byte operations. ++ GPRRegister VarReg = VarCanBeByte ? RegX8664::getEncodedGPR(Var->getRegNum()) ++ : RegX8664::getEncodedGPR(Var->getRegNum()); ++ if (const auto *SrcVar = llvm::dyn_cast(Src)) { ++ if (SrcVar->hasReg()) { ++ GPRRegister SrcReg = SrcCanBeByte ++ ? RegX8664::getEncodedGPR(SrcVar->getRegNum()) ++ : RegX8664::getEncodedGPR(SrcVar->getRegNum()); ++ (Asm->*(Emitter.GPRGPR))(Ty, VarReg, SrcReg); ++ } else { ++ AsmAddress SrcStackAddr = AsmAddress(SrcVar, Target); ++ (Asm->*(Emitter.GPRAddr))(Ty, VarReg, SrcStackAddr); ++ } ++ } else if (const auto *Mem = llvm::dyn_cast(Src)) { ++ Mem->emitSegmentOverride(Asm); ++ (Asm->*(Emitter.GPRAddr))(Ty, VarReg, AsmAddress(Mem, Asm, Target)); ++ } else if (const auto *Imm = llvm::dyn_cast(Src)) { ++ (Asm->*(Emitter.GPRImm))(Ty, VarReg, AssemblerImmediate(Imm->getValue())); ++ } else if (const auto *Imm = llvm::dyn_cast(Src)) { ++ assert(Utils::IsInt(32, Imm->getValue())); ++ (Asm->*(Emitter.GPRImm))(Ty, VarReg, AssemblerImmediate(Imm->getValue())); ++ } else if (const auto *Reloc = llvm::dyn_cast(Src)) { ++ const auto FixupKind = (Reloc->getName().hasStdString() && ++ Reloc->getName().toString() == GlobalOffsetTable) ++ ? FK_GotPC ++ : FK_Abs; ++ AssemblerFixup *Fixup = Asm->createFixup(FixupKind, Reloc); ++ (Asm->*(Emitter.GPRImm))(Ty, VarReg, AssemblerImmediate(Fixup)); ++ } else { ++ llvm_unreachable("Unexpected operand type"); ++ } ++} + + /// Instructions of the form x := op(x). + template diff --git a/electron-16-freetype-visibility-list.patch b/electron-16-freetype-visibility-list.patch index de316d5..b1a86f3 100644 --- a/electron-16-freetype-visibility-list.patch +++ b/electron-16-freetype-visibility-list.patch @@ -1,9 +1,9 @@ -Index: electron-16.0.9/build/linux/BUILD.gn +Index: electron-17.1.0/build/linux/BUILD.gn =================================================================== ---- electron-16.0.9.orig/build/linux/BUILD.gn 2022-02-16 17:58:59.257168135 +0100 -+++ electron-16.0.9/build/linux/BUILD.gn 2022-02-16 20:08:06.841364040 +0100 -@@ -25,6 +25,7 @@ if (use_system_freetype) { - visibility = [ +--- electron-17.1.0.orig/build/linux/BUILD.gn 2022-03-07 17:20:29.604808148 +0100 ++++ electron-17.1.0/build/linux/BUILD.gn 2022-03-09 08:29:12.518595170 +0100 +@@ -26,6 +26,7 @@ if (use_system_freetype) { + "//build/config/freetype:freetype", "//third_party:freetype_harfbuzz", "//third_party/harfbuzz-ng:harfbuzz_source", + "//build/config/freetype:freetype", diff --git a/electron-16-node-fix-python3.10-import.patch b/electron-16-node-fix-python3.10-import.patch deleted file mode 100644 index 454b401..0000000 --- a/electron-16-node-fix-python3.10-import.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: electron-16.0.7/third_party/electron_node/tools/inspector_protocol/jinja2/tests.py -=================================================================== ---- electron-16.0.7.orig/third_party/electron_node/tools/inspector_protocol/jinja2/tests.py 2022-01-19 09:58:52.946185049 +0100 -+++ electron-16.0.7/third_party/electron_node/tools/inspector_protocol/jinja2/tests.py 2022-01-27 13:05:22.634208381 +0100 -@@ -10,7 +10,7 @@ - """ - import operator - import re --from collections import Mapping -+from collections.abc import Mapping - from jinja2.runtime import Undefined - from jinja2._compat import text_type, string_types, integer_types - import decimal diff --git a/electron-16-std-vector-non-const.patch b/electron-16-std-vector-non-const.patch index 81e4993..c4d9f5b 100644 --- a/electron-16-std-vector-non-const.patch +++ b/electron-16-std-vector-non-const.patch @@ -1,8 +1,8 @@ -Index: electron-16.0.7/chrome/browser/process_singleton.h +Index: electron-17.1.0/chrome/browser/process_singleton.h =================================================================== ---- electron-16.0.7.orig/chrome/browser/process_singleton.h 2022-01-17 09:05:43.956463209 +0100 -+++ electron-16.0.7/chrome/browser/process_singleton.h 2022-01-17 09:05:46.560477493 +0100 -@@ -103,7 +103,7 @@ class ProcessSingleton { +--- electron-17.1.0.orig/chrome/browser/process_singleton.h 2022-03-07 17:39:06.993345117 +0100 ++++ electron-17.1.0/chrome/browser/process_singleton.h 2022-03-09 08:29:01.682773127 +0100 +@@ -102,7 +102,7 @@ class ProcessSingleton { using NotificationCallback = base::RepeatingCallback& argv, @@ -24,7 +24,7 @@ Index: electron-16.0.7/chrome/browser/process_singleton_posix.cc SocketReader* reader); private: -@@ -683,7 +683,7 @@ void ProcessSingleton::LinuxWatcher::Sta +@@ -684,7 +684,7 @@ void ProcessSingleton::LinuxWatcher::Sta void ProcessSingleton::LinuxWatcher::HandleMessage( const std::string& current_dir, const std::vector& argv, @@ -33,7 +33,7 @@ Index: electron-16.0.7/chrome/browser/process_singleton_posix.cc SocketReader* reader) { DCHECK(ui_task_runner_->BelongsToCurrentThread()); DCHECK(reader); -@@ -773,7 +773,7 @@ void ProcessSingleton::LinuxWatcher::Soc +@@ -774,7 +774,7 @@ void ProcessSingleton::LinuxWatcher::Soc base::StringToSizeT(tokens[0], &num_args); std::vector command_line(tokens.begin() + 1, tokens.begin() + 1 + num_args); @@ -42,7 +42,7 @@ Index: electron-16.0.7/chrome/browser/process_singleton_posix.cc if (tokens.size() >= 3 + num_args) { size_t additional_data_size; base::StringToSizeT(tokens[1 + num_args], &additional_data_size); -@@ -782,7 +782,7 @@ void ProcessSingleton::LinuxWatcher::Soc +@@ -783,7 +783,7 @@ void ProcessSingleton::LinuxWatcher::Soc std::string(1, kTokenDelimiter)); const uint8_t* additional_data_bits = reinterpret_cast(remaining_args.c_str()); @@ -51,11 +51,11 @@ Index: electron-16.0.7/chrome/browser/process_singleton_posix.cc additional_data_bits, additional_data_bits + additional_data_size); } -Index: electron-16.0.7/chrome/browser/process_singleton_win.cc +Index: electron-17.1.0/chrome/browser/process_singleton_win.cc =================================================================== ---- electron-16.0.7.orig/chrome/browser/process_singleton_win.cc 2022-01-17 09:05:43.956463209 +0100 -+++ electron-16.0.7/chrome/browser/process_singleton_win.cc 2022-01-17 09:05:46.560477493 +0100 -@@ -100,7 +100,7 @@ BOOL CALLBACK BrowserWindowEnumeration(H +--- electron-17.1.0.orig/chrome/browser/process_singleton_win.cc 2022-03-07 17:39:06.993345117 +0100 ++++ electron-17.1.0/chrome/browser/process_singleton_win.cc 2022-03-09 08:29:01.682773127 +0100 +@@ -99,7 +99,7 @@ BOOL CALLBACK BrowserWindowEnumeration(H bool ParseCommandLine(const COPYDATASTRUCT* cds, base::CommandLine* parsed_command_line, base::FilePath* current_directory, @@ -64,7 +64,7 @@ Index: electron-16.0.7/chrome/browser/process_singleton_win.cc // We should have enough room for the shortest command (min_message_size) // and also be a multiple of wchar_t bytes. The shortest command // possible is L"START\0\0" (empty command line, current directory, -@@ -182,7 +182,7 @@ bool ParseCommandLine(const COPYDATASTRU +@@ -181,7 +181,7 @@ bool ParseCommandLine(const COPYDATASTRU msg.substr(fourth_null + 1, fifth_null - fourth_null); const uint8_t* additional_data_bytes = reinterpret_cast(additional_data.c_str()); @@ -73,7 +73,7 @@ Index: electron-16.0.7/chrome/browser/process_singleton_win.cc additional_data_bytes + additional_data_length); return true; -@@ -203,7 +203,7 @@ bool ProcessLaunchNotification( +@@ -202,7 +202,7 @@ bool ProcessLaunchNotification( const COPYDATASTRUCT* cds = reinterpret_cast(lparam); base::CommandLine parsed_command_line(base::CommandLine::NO_PROGRAM); base::FilePath current_directory; @@ -82,10 +82,10 @@ Index: electron-16.0.7/chrome/browser/process_singleton_win.cc if (!ParseCommandLine(cds, &parsed_command_line, ¤t_directory, &additional_data)) { *result = TRUE; return true; -Index: electron-16.0.7/electron/shell/browser/api/electron_api_app.cc +Index: electron-17.1.0/electron/shell/browser/api/electron_api_app.cc =================================================================== ---- electron-16.0.7.orig/electron/shell/browser/api/electron_api_app.cc 2022-01-17 09:05:46.560477493 +0100 -+++ electron-16.0.7/electron/shell/browser/api/electron_api_app.cc 2022-01-17 15:27:37.616459355 +0100 +--- electron-17.1.0.orig/electron/shell/browser/api/electron_api_app.cc 2022-03-07 16:07:24.343397858 +0100 ++++ electron-17.1.0/electron/shell/browser/api/electron_api_app.cc 2022-03-09 08:29:01.682773127 +0100 @@ -517,10 +517,10 @@ bool NotificationCallbackWrapper( const base::RepeatingCallback< void(const base::CommandLine& command_line, @@ -108,11 +108,11 @@ Index: electron-16.0.7/electron/shell/browser/api/electron_api_app.cc v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); v8::Locker locker(isolate); v8::HandleScope handle_scope(isolate); -Index: electron-16.0.7/electron/shell/browser/api/electron_api_app.h +Index: electron-17.1.0/electron/shell/browser/api/electron_api_app.h =================================================================== ---- electron-16.0.7.orig/electron/shell/browser/api/electron_api_app.h 2022-01-15 15:50:12.473649228 +0100 -+++ electron-16.0.7/electron/shell/browser/api/electron_api_app.h 2022-01-17 17:04:38.020359701 +0100 -@@ -190,7 +190,7 @@ class App : public ElectronBrowserClient +--- electron-17.1.0.orig/electron/shell/browser/api/electron_api_app.h 2022-03-07 16:07:24.343397858 +0100 ++++ electron-17.1.0/electron/shell/browser/api/electron_api_app.h 2022-03-09 08:29:01.682773127 +0100 +@@ -194,7 +194,7 @@ class App : public ElectronBrowserClient std::string GetLocaleCountryCode(); void OnSecondInstance(const base::CommandLine& cmd, const base::FilePath& cwd, diff --git a/electron-16-system-node-headers.patch b/electron-16-system-node-headers.patch index db2e03f..8f4e42e 100644 --- a/electron-16-system-node-headers.patch +++ b/electron-16-system-node-headers.patch @@ -1,8 +1,8 @@ -Index: electron-16.0.7/third_party/electron_node/common.gypi +Index: electron-17.1.0/third_party/electron_node/common.gypi =================================================================== ---- electron-16.0.7.orig/third_party/electron_node/common.gypi 2022-01-19 10:13:06.686093505 +0100 -+++ electron-16.0.7/third_party/electron_node/common.gypi 2022-01-27 09:34:39.846154230 +0100 -@@ -404,6 +404,9 @@ +--- electron-17.1.0.orig/third_party/electron_node/common.gypi 2022-03-07 17:39:13.557371769 +0100 ++++ electron-17.1.0/third_party/electron_node/common.gypi 2022-03-09 08:29:08.214665848 +0100 +@@ -405,6 +405,9 @@ 'BUILDING_UV_SHARED=1', ], }], diff --git a/electron-16-v8-missing-utility-include.patch b/electron-16-v8-missing-utility-include.patch new file mode 100644 index 0000000..7e7a240 --- /dev/null +++ b/electron-16-v8-missing-utility-include.patch @@ -0,0 +1,12 @@ +Index: electron-16.0.9/v8/src/heap/cppgc/prefinalizer-handler.h +=================================================================== +--- electron-16.0.9.orig/v8/src/heap/cppgc/prefinalizer-handler.h 2022-02-16 18:17:34.214288489 +0100 ++++ electron-16.0.9/v8/src/heap/cppgc/prefinalizer-handler.h 2022-02-24 15:58:24.620167736 +0100 +@@ -5,6 +5,7 @@ + #ifndef V8_HEAP_CPPGC_PREFINALIZER_HANDLER_H_ + #define V8_HEAP_CPPGC_PREFINALIZER_HANDLER_H_ + ++#include + #include + + #include "include/cppgc/prefinalizer.h" diff --git a/electron-16.0.9.tar.xz b/electron-16.0.9.tar.xz deleted file mode 100644 index eb0e101..0000000 --- a/electron-16.0.9.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b2fbc064a767a41a2dd10f7341ddae2064529222b1ed327d07ec5780a4566502 -size 1183633960 diff --git a/electron-17-breakpad-align-int-types.patch b/electron-17-breakpad-align-int-types.patch new file mode 100644 index 0000000..4e2c884 --- /dev/null +++ b/electron-17-breakpad-align-int-types.patch @@ -0,0 +1,13 @@ +Index: electron-17.1.2/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc +=================================================================== +--- electron-17.1.2.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2022-03-11 11:17:39.716354439 +0100 ++++ electron-17.1.2/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2022-03-15 07:51:37.994251537 +0100 +@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() { + // SIGSTKSZ may be too small to prevent the signal handlers from overrunning + // the alternative stack. Ensure that the size of the alternative stack is + // large enough. +- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); ++ static const unsigned kSigStackSize = std::max(16384L, (long)SIGSTKSZ); + + // Only set an alternative stack if there isn't already one, or if the current + // one is too small. diff --git a/electron-17.1.2.tar.xz b/electron-17.1.2.tar.xz new file mode 100644 index 0000000..15169bd --- /dev/null +++ b/electron-17.1.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ccd1169e12c4705e1ff10e0e331eba6c2d279cec0a92c364cb912bef44decd20 +size 1200731940 diff --git a/gcc-enable-lto.patch b/gcc-enable-lto.patch index de48797..4d10c18 100644 --- a/gcc-enable-lto.patch +++ b/gcc-enable-lto.patch @@ -1,9 +1,9 @@ -Index: electron-16.0.6/build/config/BUILDCONFIG.gn +Index: electron-17.1.0/build/config/BUILDCONFIG.gn =================================================================== ---- electron-16.0.6.orig/build/config/BUILDCONFIG.gn 2022-01-10 16:24:02.216280051 +0100 -+++ electron-16.0.6/build/config/BUILDCONFIG.gn 2022-01-13 16:02:40.677407750 +0100 -@@ -133,6 +133,8 @@ declare_args() { - # separate flags. +--- electron-17.1.0.orig/build/config/BUILDCONFIG.gn 2022-03-07 17:38:24.389172130 +0100 ++++ electron-17.1.0/build/config/BUILDCONFIG.gn 2022-03-09 08:25:02.246701706 +0100 +@@ -138,6 +138,8 @@ declare_args() { + # set "is_official_build" to true for any build intended to ship to end-users. is_official_build = false + gcc_lto = false @@ -11,7 +11,7 @@ Index: electron-16.0.6/build/config/BUILDCONFIG.gn # Set to true when compiling with the Clang compiler. is_clang = current_os != "linux" || (current_cpu != "s390x" && current_cpu != "s390" && -@@ -343,6 +345,12 @@ default_compiler_configs = [ +@@ -352,6 +354,12 @@ default_compiler_configs = [ "//electron/build/config:mas_build", ] @@ -24,11 +24,11 @@ Index: electron-16.0.6/build/config/BUILDCONFIG.gn if (is_win) { default_compiler_configs += [ "//build/config/win:default_cfg_compiler", -Index: electron-16.0.6/build/config/compiler/BUILD.gn +Index: electron-17.1.0/build/config/compiler/BUILD.gn =================================================================== ---- electron-16.0.6.orig/build/config/compiler/BUILD.gn 2022-01-13 16:02:32.341363898 +0100 -+++ electron-16.0.6/build/config/compiler/BUILD.gn 2022-01-13 16:02:40.677407750 +0100 -@@ -1860,6 +1860,10 @@ if (is_win) { +--- electron-17.1.0.orig/build/config/compiler/BUILD.gn 2022-03-09 08:24:53.098851231 +0100 ++++ electron-17.1.0/build/config/compiler/BUILD.gn 2022-03-09 08:25:02.250701641 +0100 +@@ -1880,6 +1880,10 @@ if (is_win) { } } @@ -39,11 +39,11 @@ Index: electron-16.0.6/build/config/compiler/BUILD.gn config("default_stack_frames") { if (is_posix || is_fuchsia) { if (enable_frame_pointers) { -Index: electron-16.0.6/sandbox/linux/BUILD.gn +Index: electron-17.1.0/sandbox/linux/BUILD.gn =================================================================== ---- electron-16.0.6.orig/sandbox/linux/BUILD.gn 2022-01-10 16:06:52.905317231 +0100 -+++ electron-16.0.6/sandbox/linux/BUILD.gn 2022-01-13 16:02:40.677407750 +0100 -@@ -258,6 +258,9 @@ component("seccomp_bpf") { +--- electron-17.1.0.orig/sandbox/linux/BUILD.gn 2022-03-07 17:20:37.288839348 +0100 ++++ electron-17.1.0/sandbox/linux/BUILD.gn 2022-03-09 08:25:02.250701641 +0100 +@@ -245,6 +245,9 @@ component("seccomp_bpf") { "//build:chromeos_buildflags", "//sandbox:sandbox_buildflags", ] @@ -53,3 +53,18 @@ Index: electron-16.0.6/sandbox/linux/BUILD.gn if (is_android) { sources += [ +Index: electron-17.1.0/base/BUILD.gn +=================================================================== +--- electron-17.1.0.orig/base/BUILD.gn 2022-03-07 17:20:29.432807450 +0100 ++++ electron-17.1.0/base/BUILD.gn 2022-03-09 08:25:02.250701641 +0100 +@@ -2026,6 +2026,10 @@ component("base") { + ] + } + ++ if (gcc_lto) { ++ configs -= [ "//build/config/compiler:gcc_lto" ] ++ } ++ + if (current_cpu == "x64") { + defines += [ "PA_PCSCAN_STACK_SUPPORTED" ] + sources += [ "allocator/partition_allocator/starscan/stack/asm/x64/push_registers_asm.cc" ] diff --git a/nodejs-electron.changes b/nodejs-electron.changes index 393bfb5..5ceadfd 100644 --- a/nodejs-electron.changes +++ b/nodejs-electron.changes @@ -1,3 +1,33 @@ +------------------------------------------------------------------- +Thu Mar 10 07:36:16 UTC 2022 - Andreas Schneider + +- Update to version 17.1.2 + * https://github.com/electron/electron/releases/tag/v17.1.2 + * https://github.com/electron/electron/releases/tag/v17.1.1 + * https://github.com/electron/electron/releases/tag/v17.1.0 + * Added electron-17-breakpad-align-int-types.patch + * Added chromium-98-compiler.patch + * Added chromium-98-MiraclePtr-gcc-ice.patch + * Added chromium-98-WaylandFrameManager-check.patch + * Added chromium-98-EnumTable-crash.patch + * Added chromium-ffmpeg-first-dts.patch + * Added system-libdrm.patch + * Removed chromium-94-ffmpeg-roll.patch + * Removed chromium-95-compiler.patch + * Removed chromium-96-CommandLine-include.patch + * Removed chromium-96-DrmRenderNodePathFinder-include.patch + * Removed chromium-96-RestrictedCookieManager-tuple.patch + * Removed electron-16-node-fix-python3.10-import.patch + +------------------------------------------------------------------- +Thu Feb 24 20:27:36 UTC 2022 - Andreas Schneider + +- Fix building with gcc-12 + * Added electron-16-fix-swiftshader-template.patch + * Added electron-16-v8-missing-utility-include.patch +- Fix building on Fedora 36 and newer +- Updated ffmpeg patches + ------------------------------------------------------------------- Thu Feb 17 08:45:42 UTC 2022 - Andreas Schneider diff --git a/nodejs-electron.spec b/nodejs-electron.spec index 60b516c..3a5ae30 100644 --- a/nodejs-electron.spec +++ b/nodejs-electron.spec @@ -18,6 +18,13 @@ %undefine _package_note_file +# https://fedoraproject.org/wiki/Changes/SetBuildFlagsBuildCheck +%undefine _auto_set_build_flags +%if 0%{?fedora} +# Debuginfo packages aren't very useful here. If you need to debug +# you should do a proper debug build (not implemented in this spec yet) +%global debug_package %{nil} +%endif %define mod_name electron ExcludeArch: %{ix86} %{arm} @@ -67,7 +74,7 @@ ExcludeArch: %{ix86} %{arm} %endif %bcond_without system_ffmpeg Name: nodejs-electron -Version: 16.0.9 +Version: 17.1.2 Release: 0 Summary: Build cross platform desktop apps with JavaScript, HTML, and CSS License: MIT @@ -78,7 +85,7 @@ Source1: create_tarball.sh Source10: electron-launcher.sh Source11: electron.desktop Source12: electron-logo-symbolic.svg -Patch0: chromium-95-compiler.patch +Patch0: chromium-98-compiler.patch %if 0%{?sle_version} < 150300 || 0%{?fedora} < 34 # Fixed with ld.gold >= 2.36 # https://sourceware.org/bugzilla/show_bug.cgi?id=26200 @@ -94,12 +101,13 @@ Patch8: chromium-glibc-2.34.patch Patch9: chromium-86-fix-vaapi-on-intel.patch %if %{with system_ffmpeg} Patch10: chromium-93-ffmpeg-4.4.patch -Patch11: chromium-94-ffmpeg-roll.patch +Patch11: chromium-ffmpeg-first-dts.patch %endif -Patch12: chromium-96-RestrictedCookieManager-tuple.patch Patch13: chromium-96-CouponDB-include.patch -Patch14: chromium-96-DrmRenderNodePathFinder-include.patch -Patch15: chromium-96-CommandLine-include.patch +Patch14: chromium-98-MiraclePtr-gcc-ice.patch +Patch15: chromium-98-WaylandFrameManager-check.patch +Patch16: chromium-98-EnumTable-crash.patch +Patch17: system-libdrm.patch # Fix building sql recover_module Patch20: electron-13-fix-sql-virtualcursor-type.patch # Always disable use_thin_lto which is an lld feature @@ -116,13 +124,13 @@ Patch23: electron-13-blink-gcc-ambiguous-nodestructor.patch Patch24: electron-16-std-vector-non-const.patch # Fix common.gypi to include /usr/include/electron Patch25: electron-16-system-node-headers.patch -%if 0%{?fedora} >= 35 -# Fix collections import with python 3.10 -Patch26: electron-16-node-fix-python3.10-import.patch -%endif Patch27: electron-16-freetype-visibility-list.patch Patch28: electron-16-third_party-symbolize-missing-include.patch Patch29: electron-16-webpack-fix-openssl-3.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=2052228 +Patch30: electron-16-fix-swiftshader-template.patch +Patch31: electron-16-v8-missing-utility-include.patch +Patch32: electron-17-breakpad-align-int-types.patch BuildRequires: SDL-devel BuildRequires: binutils-gold BuildRequires: bison @@ -312,10 +320,6 @@ Requires: nodejs-electron = %{version} %description devel Development headers for Electron projects. -%if 0%{?fedora} -%global debug_package %{nil} -%endif - %prep %autosetup -n %{mod_name}-%{version} -p1 @@ -360,11 +364,11 @@ export CXX=clang++ %else # REDUCE DEBUG as it gets TOO large -ARCH_FLAGS="`echo %{optflags} | sed -e 's/^-g / /g' -e 's/ -g / /g' -e 's/ -g$//g'`" +ARCH_FLAGS="$(echo %{optflags} | sed -e 's/^-g / /g' -e 's/ -g / /g' -e 's/ -g$//g')" %if 0%{?fedora} # Fix base/allocator/allocator_shim.cc:408:2: error: #error This code cannot be # used when exceptions are turned on. -ARCH_FLAGS="`echo $ARCH_FLAGS | sed -e 's/ -fexceptions / /g'`" +ARCH_FLAGS="$(echo $ARCH_FLAGS | sed -e 's/ -fexceptions / /g')" %endif export CXXFLAGS="${CXXFLAGS} ${ARCH_FLAGS} -Wno-return-type" @@ -461,6 +465,9 @@ myconf_gn+=" use_swiftshader_with_subzero=true" myconf_gn+=" is_component_ffmpeg=true" myconf_gn+=" use_cups=true" myconf_gn+=" use_aura=true" +# symbol_level=2 is full debug +# symbol_level=1 is enough info for stacktraces +# symbol_level=0 disable debug myconf_gn+=" symbol_level=1" myconf_gn+=" blink_symbol_level=0" myconf_gn+=" use_kerberos=true" @@ -558,7 +565,6 @@ rsync -av --exclude '*.pak.info' locales %{buildroot}%{_libdir}/electron/ %if %{with swiftshader} rsync -av --exclude '*.so.TOC' swiftshader %{buildroot}%{_libdir}/electron/ -install -m 0644 vk_swiftshader_icd.json %{buildroot}%{_libdir}/electron/vk_swiftshader_icd.json %else rm -f %{buildroot}/%{_libdir}/electron/libvk_swiftshader.so %endif @@ -606,7 +612,6 @@ rsync -av out/Release/gen/node_headers/include/node/* %{buildroot}%{_includedir} %if %{with swiftshader} %{_libdir}/electron/libvk_swiftshader.so -%{_libdir}/electron/vk_swiftshader_icd.json %dir %{_libdir}/electron/swiftshader/ %{_libdir}/electron/swiftshader/libEGL.so diff --git a/system-libdrm.patch b/system-libdrm.patch new file mode 100644 index 0000000..5df3391 --- /dev/null +++ b/system-libdrm.patch @@ -0,0 +1,68 @@ +Index: chromium-98.0.4758.80/build/linux/unbundle/libdrm.gn +=================================================================== +--- chromium-98.0.4758.80.orig/build/linux/unbundle/libdrm.gn ++++ chromium-98.0.4758.80/build/linux/unbundle/libdrm.gn +@@ -11,7 +11,10 @@ pkg_config("system_libdrm") { + + shim_headers("libdrm_shim") { + root_path = "src/include" +- headers = [ "drm.h" ] ++ headers = [ ++ "drm.h", ++ "drm_fourcc.h", ++ ] + } + + source_set("libdrm") { +Index: chromium-98.0.4758.80/media/gpu/chromeos/video_decoder_pipeline.cc +=================================================================== +--- chromium-98.0.4758.80.orig/media/gpu/chromeos/video_decoder_pipeline.cc ++++ chromium-98.0.4758.80/media/gpu/chromeos/video_decoder_pipeline.cc +@@ -28,7 +28,7 @@ + + #if BUILDFLAG(USE_VAAPI) + #include "media/gpu/vaapi/vaapi_video_decoder.h" +-#include "third_party/libdrm/src/include/drm/drm_fourcc.h" ++#include + #elif BUILDFLAG(USE_V4L2_CODEC) + #include "media/gpu/v4l2/v4l2_video_decoder.h" + #else +Index: chromium-98.0.4758.80/ui/ozone/platform/drm/gpu/crtc_controller.h +=================================================================== +--- chromium-98.0.4758.80.orig/ui/ozone/platform/drm/gpu/crtc_controller.h ++++ chromium-98.0.4758.80/ui/ozone/platform/drm/gpu/crtc_controller.h +@@ -11,7 +11,7 @@ + + #include "base/memory/weak_ptr.h" + #include "base/trace_event/traced_value.h" +-#include "third_party/libdrm/src/include/drm/drm_fourcc.h" ++#include + #include "ui/gfx/swap_result.h" + #include "ui/ozone/platform/drm/common/scoped_drm_types.h" + #include "ui/ozone/platform/drm/gpu/drm_overlay_plane.h" +Index: chromium-98.0.4758.80/ui/ozone/platform/drm/gpu/hardware_display_controller.cc +=================================================================== +--- chromium-98.0.4758.80.orig/ui/ozone/platform/drm/gpu/hardware_display_controller.cc ++++ chromium-98.0.4758.80/ui/ozone/platform/drm/gpu/hardware_display_controller.cc +@@ -20,7 +20,7 @@ + #include "base/trace_event/trace_conversion_helper.h" + #include "base/trace_event/trace_event.h" + #include "base/trace_event/traced_value.h" +-#include "third_party/libdrm/src/include/drm/drm_fourcc.h" ++#include + #include "third_party/skia/include/core/SkCanvas.h" + #include "third_party/skia/include/core/SkImage.h" + #include "ui/gfx/geometry/point.h" +Index: chromium-98.0.4758.80/media/gpu/chromeos/video_decoder_pipeline_unittest.cc +=================================================================== +--- chromium-98.0.4758.80.orig/media/gpu/chromeos/video_decoder_pipeline_unittest.cc ++++ chromium-98.0.4758.80/media/gpu/chromeos/video_decoder_pipeline_unittest.cc +@@ -23,7 +23,7 @@ + #include "media/gpu/chromeos/mailbox_video_frame_converter.h" + #include "testing/gmock/include/gmock/gmock.h" + #include "testing/gtest/include/gtest/gtest.h" +-#include "third_party/libdrm/src/include/drm/drm_fourcc.h" ++#include + + #if BUILDFLAG(IS_CHROMEOS_ASH) + // gn check does not account for BUILDFLAG(), so including this header will