forked from pool/nodejs-electron
Accepting request 1029736 from devel:languages:nodejs
revert accidental submission — curse OBS for not making the “revert to revision” actually revert in cause of links OBS-URL: https://build.opensuse.org/request/show/1029736 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=41
This commit is contained in:
@@ -1,15 +1,3 @@
|
||||
SUSE: Disable the following:
|
||||
* Optimizer flags. Anything other than straight -O2 isn't well tested (either more or less optimization)
|
||||
* -flto still needs to be handled by gn as it needs to be disabled for some targets,
|
||||
and global CFLAGS go at the end of the commandline
|
||||
* Submodel options (-march and friends). Upstream notoriously forces SSE3 despite the code not requiring it.
|
||||
* note that cpu options for ARM are currently left in, as they do not seem to do harm and V8 needs to know the exact target anyway
|
||||
* Debuginfo format. Upstream seems to force something that is not recognized by rpmbuild.
|
||||
* per-target debuginfo level is left in as it is still useful (-g2 everywhere does not work)
|
||||
* Emitting code for the PIC model. It is needed in case of shared libraries, but results in a larger executable (and Electron is already enormous)
|
||||
It should be enabled individually on code that gets into separate libraries (and we know when to do it — otherwise we're getting linker error)
|
||||
|
||||
|
||||
From 307a0f63dd9b118f4b8470ed3d7567e81fdb7a6d Mon Sep 17 00:00:00 2001
|
||||
From: Mike Gilbert <floppym@gentoo.org>
|
||||
Date: Fri, 22 Apr 2022 09:05:24 +0000
|
||||
@@ -23,7 +11,7 @@ diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
||||
index d40843b..b92f03b 100644
|
||||
--- a/build/config/compiler/BUILD.gn
|
||||
+++ b/build/config/compiler/BUILD.gn
|
||||
@@ -274,9 +274,7 @@
|
||||
@@ -286,9 +286,7 @@
|
||||
|
||||
configs += [
|
||||
# See the definitions below.
|
||||
@@ -33,31 +21,7 @@ index d40843b..b92f03b 100644
|
||||
":compiler_codegen",
|
||||
":compiler_deterministic",
|
||||
]
|
||||
@@ -305,7 +303,12 @@
|
||||
if (!is_win) {
|
||||
# Common POSIX compiler flags setup.
|
||||
# --------------------------------
|
||||
- cflags += [ "-fno-strict-aliasing" ] # See http://crbug.com/32204
|
||||
+ # To future SUSE maintainers: Do not re-enable this, you will save yourself hours of debugging!
|
||||
+ # This is an optimizer flag, not a C dialect flag to make GCC behave like clang.
|
||||
+ # Despite what the -Wlto-type-mismatch warning text tells you, enabling this will NOT fix miscompiles,
|
||||
+ # and seems to cause other problems in GCC12. See https://bugs.chromium.org/p/chromium/issues/detail?id=1373615#c6
|
||||
+ # ANY BUGS DUE TO ALIASING SHOULD BE FIXED IN CODE, AND THE PATCHES SENT UPSTREAM!
|
||||
+ # cflags += [ "-fno-strict-aliasing" ] # See http://crbug.com/32204
|
||||
|
||||
# Stack protection.
|
||||
if (is_apple) {
|
||||
@@ -432,9 +432,6 @@
|
||||
# Linux/Android/Fuchsia common flags setup.
|
||||
# ---------------------------------
|
||||
if (is_linux || is_chromeos || is_android || is_fuchsia) {
|
||||
- asmflags += [ "-fPIC" ]
|
||||
- cflags += [ "-fPIC" ]
|
||||
- ldflags += [ "-fPIC" ]
|
||||
|
||||
if (!is_clang) {
|
||||
# Use pipes for communicating between sub-processes. Faster.
|
||||
@@ -527,31 +530,6 @@
|
||||
@@ -522,31 +520,6 @@
|
||||
ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
|
||||
}
|
||||
|
||||
@@ -89,7 +53,7 @@ index d40843b..b92f03b 100644
|
||||
# Rust compiler setup (for either clang or rustc).
|
||||
if (enable_rust) {
|
||||
defines += [ "RUST_ENABLED" ]
|
||||
@@ -862,7 +840,8 @@
|
||||
@@ -880,7 +853,8 @@
|
||||
# without using everything that "compiler" brings in. Options that
|
||||
# tweak code generation for a particular CPU do not belong here!
|
||||
# See "compiler_codegen", below.
|
||||
@@ -99,7 +63,7 @@ index d40843b..b92f03b 100644
|
||||
cflags = []
|
||||
ldflags = []
|
||||
defines = []
|
||||
@@ -1227,45 +1206,6 @@
|
||||
@@ -1232,45 +1206,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +109,7 @@ index d40843b..b92f03b 100644
|
||||
# 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.
|
||||
@@ -1597,7 +1537,7 @@
|
||||
@@ -1615,7 +1541,7 @@
|
||||
defines = [ "_HAS_NODISCARD" ]
|
||||
}
|
||||
} else {
|
||||
@@ -154,7 +118,7 @@ index d40843b..b92f03b 100644
|
||||
if (treat_warnings_as_errors) {
|
||||
cflags += [ "-Werror" ]
|
||||
|
||||
@@ -1606,10 +1546,6 @@
|
||||
@@ -1624,10 +1550,6 @@
|
||||
# well.
|
||||
ldflags = [ "-Werror" ]
|
||||
}
|
||||
@@ -165,7 +129,7 @@ index d40843b..b92f03b 100644
|
||||
|
||||
# In Chromium code, we define __STDC_foo_MACROS in order to get the
|
||||
# C99 macros on Mac and Linux.
|
||||
@@ -1618,16 +1554,6 @@
|
||||
@@ -1636,16 +1558,6 @@
|
||||
"__STDC_FORMAT_MACROS",
|
||||
]
|
||||
|
||||
@@ -182,7 +146,7 @@ index d40843b..b92f03b 100644
|
||||
if (is_mac) {
|
||||
cflags_objc = [ "-Wobjc-missing-property-synthesis" ]
|
||||
cflags_objcc = [ "-Wobjc-missing-property-synthesis" ]
|
||||
@@ -2017,7 +1943,8 @@
|
||||
@@ -2035,7 +1948,8 @@
|
||||
}
|
||||
|
||||
# Default "optimization on" config.
|
||||
@@ -192,7 +156,7 @@ index d40843b..b92f03b 100644
|
||||
if (is_win) {
|
||||
if (chrome_pgo_phase != 2) {
|
||||
# Favor size over speed, /O1 must be before the common flags.
|
||||
@@ -2055,7 +1982,8 @@
|
||||
@@ -2073,7 +1987,8 @@
|
||||
}
|
||||
|
||||
# Turn off optimizations.
|
||||
@@ -202,7 +166,7 @@ index d40843b..b92f03b 100644
|
||||
if (is_win) {
|
||||
cflags = [
|
||||
"/Od", # Disable optimization.
|
||||
@@ -2095,7 +2023,8 @@
|
||||
@@ -2113,7 +2028,8 @@
|
||||
# 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.
|
||||
@@ -212,7 +176,7 @@ index d40843b..b92f03b 100644
|
||||
if (is_nacl && is_nacl_irt) {
|
||||
# The NaCl IRT is a special case and always wants its own config.
|
||||
# Various components do:
|
||||
@@ -2128,7 +2057,8 @@
|
||||
@@ -2146,7 +2062,8 @@
|
||||
#
|
||||
# TODO(crbug.com/621335) - rework how all of these configs are related
|
||||
# so that we don't need this disclaimer.
|
||||
@@ -222,7 +186,7 @@ index d40843b..b92f03b 100644
|
||||
if (is_nacl && is_nacl_irt) {
|
||||
# The NaCl IRT is a special case and always wants its own config.
|
||||
# Various components do:
|
||||
@@ -2154,7 +2084,8 @@
|
||||
@@ -2172,7 +2089,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,7 +196,7 @@ index d40843b..b92f03b 100644
|
||||
cflags = [ "-O1" ] + common_optimize_on_cflags
|
||||
rustflags = [ "-Copt-level=1" ]
|
||||
ldflags = common_optimize_on_ldflags
|
||||
@@ -2273,7 +2204,8 @@
|
||||
@@ -2291,7 +2209,8 @@
|
||||
}
|
||||
|
||||
# Full symbols.
|
||||
@@ -242,7 +206,7 @@ index d40843b..b92f03b 100644
|
||||
if (is_win) {
|
||||
if (is_clang) {
|
||||
cflags = [ "/Z7" ] # Debug information in the .obj files.
|
||||
@@ -2398,7 +2330,8 @@
|
||||
@@ -2419,7 +2338,8 @@
|
||||
# Minimal symbols.
|
||||
# This config guarantees to hold symbol for stack trace which are shown to user
|
||||
# when crash happens in unittests running on buildbot.
|
||||
@@ -252,7 +216,7 @@ index d40843b..b92f03b 100644
|
||||
if (is_win) {
|
||||
# Functions, files, and line tables only.
|
||||
cflags = []
|
||||
@@ -2470,7 +2403,8 @@
|
||||
@@ -2492,7 +2412,8 @@
|
||||
# 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.
|
||||
|
||||
16
fpic.patch
16
fpic.patch
@@ -1,16 +0,0 @@
|
||||
Build targets which go in shared libraries with -fPIC to avoid linker error
|
||||
|
||||
--- a/third_party/swiftshader/BUILD.gn
|
||||
+++ b/third_party/swiftshader/BUILD.gn
|
||||
@@ -15,9 +15,9 @@
|
||||
import("src/Reactor/reactor.gni")
|
||||
|
||||
config("swiftshader_config") {
|
||||
- cflags = []
|
||||
+ cflags = ["-fpic"]
|
||||
defines = []
|
||||
- asmflags = []
|
||||
+ asmflags = ["-fpic"]
|
||||
|
||||
if (is_clang) {
|
||||
cflags += [ "-Wno-shadow" ]
|
||||
@@ -78,9 +78,11 @@ BuildArch: i686
|
||||
|
||||
# Linker selection. GCC only. Default is BFD.
|
||||
# arm64 reports relocation errors with BFD.
|
||||
|
||||
%ifarch x86_64 aarch64
|
||||
%bcond_without gold
|
||||
%else
|
||||
%bcond_with gold
|
||||
|
||||
%endif
|
||||
|
||||
# Both BFD and Gold run out of memory on 32-bit.
|
||||
%ifarch %ix86 %arm
|
||||
@@ -95,8 +97,9 @@ BuildArch: i686
|
||||
%bcond_with mold
|
||||
|
||||
|
||||
%if 0%{with lld}
|
||||
# no LTO on 32bit
|
||||
%if 0%{without clang}
|
||||
#LTO on GCC is broken.
|
||||
#Electron crashes on selecting any text. see https://gist.github.com/brjsp/80620a5a0be9efbee6b9154cb127879d for the stack trace.
|
||||
%bcond_with lto
|
||||
%else
|
||||
%bcond_without lto
|
||||
@@ -229,7 +232,6 @@ Source420: avif_image_decoder-AVIF_PIXEL_FORMAT_COUNT.patch
|
||||
|
||||
# PATCHES for openSUSE-specific things
|
||||
Patch0: chromium-102-compiler.patch
|
||||
Patch1: fpic.patch
|
||||
Patch3: gcc-enable-lto.patch
|
||||
Patch5: chromium-norar.patch
|
||||
Patch6: chromium-vaapi.patch
|
||||
@@ -320,8 +322,6 @@ Patch3074: pending_beacon_dispatcher-virtual-functions-cannot-be-constexpr.
|
||||
Patch3075: std_lib_extras-missing-intptr_t.patch
|
||||
Patch3076: gtk_ui_platform_stub-incomplete-type-LinuxInputMethodContext.patch
|
||||
Patch3077: argument_spec-missing-isnan-isinf.patch
|
||||
Patch3078: select_file_dialog_linux_kde-Wodr.patch
|
||||
Patch3079: web_contents_impl-Wsubobject-linkage.patch
|
||||
|
||||
%if %{with clang}
|
||||
BuildRequires: clang
|
||||
@@ -558,11 +558,11 @@ BuildRequires: pkgconfig(vpx) >= 1.8.2
|
||||
%endif
|
||||
%if %{without clang}
|
||||
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora}
|
||||
BuildRequires: gcc >= 11
|
||||
BuildRequires: gcc-c++ >= 11
|
||||
BuildRequires: gcc >= 10
|
||||
BuildRequires: gcc-c++ >= 10
|
||||
%else
|
||||
BuildRequires: gcc11-PIE
|
||||
BuildRequires: gcc11-c++
|
||||
BuildRequires: gcc10
|
||||
BuildRequires: gcc10-c++
|
||||
%endif
|
||||
%endif
|
||||
%if %{with pipewire}
|
||||
@@ -686,9 +686,7 @@ export PATH="$(pwd)/python3-path:${PATH}"
|
||||
#some Fedora ports still try to build with LTO
|
||||
ARCH_FLAGS=$(echo "%optflags"|sed 's/-f[^ ]*lto[^ ]*//g' )
|
||||
|
||||
#Work around an upstream ODR issue.
|
||||
#Remove this once https://bugs.chromium.org/p/chromium/issues/detail?id=1375049 gets fixed.
|
||||
ARCH_FLAGS="$ARCH_FLAGS -DIS_SERIAL_ENABLED_PLATFORM"
|
||||
|
||||
|
||||
|
||||
%if 0%{?fedora}
|
||||
@@ -761,11 +759,11 @@ export AR=gcc-ar
|
||||
export NM=gcc-nm
|
||||
export RANLIB=gcc-ranlib
|
||||
%else
|
||||
export CC=gcc-11
|
||||
export CXX=g++-11
|
||||
export AR=gcc-ar-11
|
||||
export NM=gcc-nm-11
|
||||
export RANLIB=gcc-ranlib-11
|
||||
export CC=gcc-10
|
||||
export CXX=g++-10
|
||||
export AR=gcc-ar-10
|
||||
export NM=gcc-nm-10
|
||||
export RANLIB=gcc-ranlib-10
|
||||
%endif
|
||||
|
||||
# endif with clang
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--- src/ui/shell_dialogs/select_file_dialog_linux_kde.cc.orig 2022-10-12 18:06:39.715381291 +0200
|
||||
+++ src/ui/shell_dialogs/select_file_dialog_linux_kde.cc 2022-10-15 10:35:05.417119106 +0200
|
||||
@@ -198,7 +198,7 @@
|
||||
return base::GetAppOutput(command_line, &kdialog_version);
|
||||
}
|
||||
|
||||
-SelectFileDialogLinuxKde* NewSelectFileDialogLinuxKde(
|
||||
+SelectFileDialog* NewSelectFileDialogLinuxKde(
|
||||
SelectFileDialog::Listener* listener,
|
||||
std::unique_ptr<ui::SelectFilePolicy> policy,
|
||||
base::nix::DesktopEnvironment desktop,
|
||||
@@ -1,80 +0,0 @@
|
||||
--- src/content/browser/web_contents/web_contents_impl.h.orig 2022-10-12 18:11:24.194407371 +0200
|
||||
+++ src/content/browser/web_contents/web_contents_impl.h 2022-10-15 11:00:48.215200372 +0200
|
||||
@@ -103,9 +103,7 @@
|
||||
} // namespace service_manager
|
||||
|
||||
namespace content {
|
||||
-namespace {
|
||||
class JavaScriptDialogDismissNotifier;
|
||||
-}
|
||||
enum class PictureInPictureResult;
|
||||
class BeforeUnloadBlockingDelegate; // content_browser_test_utils_internal.h
|
||||
class BrowserPluginEmbedder;
|
||||
--- src/content/browser/web_contents/web_contents_impl.cc.orig 2022-10-12 18:11:52.102315425 +0200
|
||||
+++ src/content/browser/web_contents/web_contents_impl.cc 2022-10-15 14:52:19.403874437 +0200
|
||||
@@ -284,32 +284,6 @@
|
||||
CloseCallback callback_;
|
||||
};
|
||||
|
||||
-// This is a small helper class created while a JavaScript dialog is showing
|
||||
-// and destroyed when it's dismissed. Clients can register callbacks to receive
|
||||
-// a notification when the dialog is dismissed.
|
||||
-class JavaScriptDialogDismissNotifier {
|
||||
- public:
|
||||
- JavaScriptDialogDismissNotifier() = default;
|
||||
-
|
||||
- JavaScriptDialogDismissNotifier(const JavaScriptDialogDismissNotifier&) =
|
||||
- delete;
|
||||
- JavaScriptDialogDismissNotifier& operator=(
|
||||
- const JavaScriptDialogDismissNotifier&) = delete;
|
||||
-
|
||||
- ~JavaScriptDialogDismissNotifier() {
|
||||
- for (auto& callback : callbacks_) {
|
||||
- std::move(callback).Run();
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- void NotifyOnDismiss(base::OnceClosure callback) {
|
||||
- callbacks_.push_back(std::move(callback));
|
||||
- }
|
||||
-
|
||||
- private:
|
||||
- std::vector<base::OnceClosure> callbacks_;
|
||||
-};
|
||||
-
|
||||
bool FrameCompareDepth(RenderFrameHostImpl* a, RenderFrameHostImpl* b) {
|
||||
return a->GetFrameDepth() < b->GetFrameDepth();
|
||||
}
|
||||
@@ -551,6 +525,32 @@
|
||||
|
||||
} // namespace
|
||||
|
||||
+// This is a small helper class created while a JavaScript dialog is showing
|
||||
+// and destroyed when it's dismissed. Clients can register callbacks to receive
|
||||
+// a notification when the dialog is dismissed.
|
||||
+class JavaScriptDialogDismissNotifier {
|
||||
+ public:
|
||||
+ JavaScriptDialogDismissNotifier() = default;
|
||||
+
|
||||
+ JavaScriptDialogDismissNotifier(const JavaScriptDialogDismissNotifier&) =
|
||||
+ delete;
|
||||
+ JavaScriptDialogDismissNotifier& operator=(
|
||||
+ const JavaScriptDialogDismissNotifier&) = delete;
|
||||
+
|
||||
+ ~JavaScriptDialogDismissNotifier() {
|
||||
+ for (auto& callback : callbacks_) {
|
||||
+ std::move(callback).Run();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ void NotifyOnDismiss(base::OnceClosure callback) {
|
||||
+ callbacks_.push_back(std::move(callback));
|
||||
+ }
|
||||
+
|
||||
+ private:
|
||||
+ std::vector<base::OnceClosure> callbacks_;
|
||||
+};
|
||||
+
|
||||
CreatedWindow::CreatedWindow() = default;
|
||||
CreatedWindow::CreatedWindow(std::unique_ptr<WebContentsImpl> contents,
|
||||
GURL target_url)
|
||||
Reference in New Issue
Block a user