Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:MaxxedSUSE:Compiler-Tools
nodejs-signal-ringrtc
signal-webrtc-disable-compiler-configs.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File signal-webrtc-disable-compiler-configs.patch of Package nodejs-signal-ringrtc
From f4d0b0eb899005b4b8b6388e1d8bb82cc0018fc8 Mon Sep 17 00:00:00 2001 From: Mike Gilbert <floppym@gentoo.org> Date: Thu, 20 Aug 2020 19:12:21 +0000 Subject: [PATCH] Disable various compiler configs --- build/config/compiler/BUILD.gn | 52 +++++++++++----------------------- 1 file changed, 17 insertions(+), 35 deletions(-) Index: webrtc-4896/build/config/compiler/BUILD.gn =================================================================== --- webrtc-6478b/build/config/compiler/BUILD.gn.orig 2024-07-03 22:33:31.547198788 +0200 +++ webrtc-6478b/build/config/compiler/BUILD.gn 2024-07-04 17:53:34.848418598 +0200 @@ -337,7 +337,6 @@ config("compiler") { if (!is_win) { # Common POSIX compiler flags setup. # -------------------------------- - cflags += [ "-fno-strict-aliasing" ] # See http://crbug.com/32204 # Stack protection. ShadowCallStack and Stack protector address the same # problems. Therefore, we only enable one or the other. Clang advertises SCS as @@ -478,10 +477,6 @@ config("compiler") { # Linux/Android/Fuchsia common flags setup. # --------------------------------- if (is_linux || is_chromeos || is_android || is_fuchsia) { - asmflags += [ "-fPIC" ] - cflags += [ "-fPIC" ] - ldflags += [ "-fPIC" ] - rustflags += [ "-Crelocation-model=pic" ] if (!is_clang) { # Use pipes for communicating between sub-processes. Faster. @@ -1070,11 +1020,6 @@ config("compiler") { defines += [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE" ] } - # Enable libstdc++ hardening lightweight assertions. Those have a low - # performance penalty but are considered a bare minimum for security. - if (use_safe_libstdcxx) { - defines += [ "_GLIBCXX_ASSERTIONS=1" ] - } } # The BUILDCONFIG file sets this config on targets by default, which means when @@ -1133,7 +1128,8 @@ config("thinlto_optimize_max") { # without using everything that "compiler" brings in. Options that # tweak code generation for a particular CPU do not belong here! # See "compiler_codegen", below. -config("compiler_cpu_abi") { +config("compiler_cpu_abi") { } +config("xcompiler_cpu_abi") { cflags = [] ldflags = [] defines = [] @@ -1732,7 +1728,8 @@ config("treat_warnings_as_errors") { # Collects all warning flags that are used by default. This is used as a # subconfig of both chromium_code and no_chromium_code. This way these # flags are guaranteed to appear on the compile command line after -Wall. -config("default_warnings") { +config("default_warnings") { } +config("xdefault_warnings") { cflags = [] cflags_c = [] cflags_cc = [] @@ -1982,11 +1979,7 @@ config("chromium_code") { defines = [ "_HAS_NODISCARD" ] } } else { - cflags = [ "-Wall" ] - if (is_clang) { - # Enable extra warnings for chromium_code when we control the compiler. - cflags += [ "-Wextra" ] - } + cflags = [] # In Chromium code, we define __STDC_foo_MACROS in order to get the # C99 macros on Mac and Linux. @@ -1995,24 +1988,6 @@ config("chromium_code") { "__STDC_FORMAT_MACROS", ] - if (!is_debug && !using_sanitizer && current_cpu != "s390x" && - current_cpu != "s390" && current_cpu != "ppc64" && - current_cpu != "mips" && current_cpu != "mips64" && - current_cpu != "riscv64" && current_cpu != "loong64") { - # Non-chromium code is not guaranteed to compile cleanly with - # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are - # disabled, so only do that for Release build. - fortify_level = "2" - - # ChromeOS's toolchain supports a high-quality _FORTIFY_SOURCE=3 - # implementation with a few custom glibc patches. Use that if it's - # available. - if (is_chromeos_device && !lacros_use_chromium_toolchain) { - fortify_level = "3" - } - defines += [ "_FORTIFY_SOURCE=" + fortify_level ] - } - if (is_apple) { cflags_objc = [ "-Wimplicit-retain-self" ] cflags_objcc = [ "-Wimplicit-retain-self" ] @@ -2158,7 +2043,6 @@ config("no_rtti") { config("export_dynamic") { # TODO(crbug.com/40118868): Revisit after target_os flip is completed. if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) { - ldflags = [ "-rdynamic" ] } } @@ -2246,7 +2221,8 @@ config("wexit_time_destructors") { # gcc 4.9 and earlier had no way of suppressing this warning without # suppressing the rest of them. Here we centralize the identification of # the gcc 4.9 toolchains. -config("no_incompatible_pointer_warnings") { +config("no_incompatible_pointer_warnings") { } +config("xno_incompatible_pointer_warnings") { cflags = [] if (is_clang) { cflags += [ "-Wno-incompatible-pointer-types" ] @@ -2364,7 +2340,8 @@ if (is_win) { common_optimize_on_cflags += [ "-fno-math-errno" ] } -config("default_stack_frames") { +config("default_stack_frames") { } +config("xdefault_stack_frames") { if (!is_win) { if (enable_frame_pointers) { cflags = [ "-fno-omit-frame-pointer" ] @@ -2405,7 +2382,8 @@ config("default_stack_frames") { # [0]: https://pinpoint-dot-chromeperf.appspot.com/job/147634a8be0000 # [1]: https://pinpoint-dot-chromeperf.appspot.com/job/132bc772be0000 # [2]: https://crrev.com/c/5447532 -config("optimize") { +config("optimize") { } +config("xoptimize") { if (is_win) { cflags = [ "/O2" ] + common_optimize_on_cflags @@ -2446,7 +2424,8 @@ config("optimize") { } # Turn off optimizations. -config("no_optimize") { +config("no_optimize") { } +config("xno_optimize") { if (is_win) { cflags = [ "/Od", # Disable optimization. @@ -2486,7 +2465,8 @@ config("no_optimize") { # Turns up the optimization level. Used to explicitly enable -O2 instead of # -Os for select targets on platforms that use optimize_for_size. No-op # elsewhere. -config("optimize_max") { +config("optimize_max") { } +config("xoptimize_max") { if (is_nacl && is_nacl_irt) { # The NaCl IRT is a special case and always wants its own config. # Various components do: @@ -2519,7 +2499,8 @@ config("optimize_max") { # # TODO(crbug.com/41259697) - rework how all of these configs are related # so that we don't need this disclaimer. -config("optimize_speed") { +config("optimize_speed") { } +config("xoptimize_speed") { if (is_nacl && is_nacl_irt) { # The NaCl IRT is a special case and always wants its own config. # Various components do: @@ -2548,7 +2529,8 @@ config("optimize_speed") { } } -config("optimize_fuzzing") { +config("optimize_fuzzing") { } +config("xoptimize_fuzzing") { cflags = [ "-O1" ] + common_optimize_on_cflags rustflags = [ "-Copt-level=1" ] ldflags = common_optimize_on_ldflags @@ -2681,7 +2663,8 @@ config("win_pdbaltpath") { } # Full symbols. -config("symbols") { +config("symbols") { } +config("xsymbols") { rustflags = [] if (is_win) { if (is_clang) { @@ -2831,7 +2814,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. -config("minimal_symbols") { +config("minimal_symbols") { } +config("xminimal_symbols") { rustflags = [] if (is_win) { # Functions, files, and line tables only. @@ -2916,7 +2900,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. -config("no_symbols") { +config("no_symbols") { } +config("xno_symbols") { if (is_win) { ldflags = [ "/DEBUG" ] --- webrtc-6478b/build_overrides/build.gni.orig 2024-07-03 22:33:28.898523839 +0200 +++ webrtc-6478b/build_overrides/build.gni 2024-07-04 17:52:24.806746119 +0200 @@ -37,19 +37,6 @@ ignore_elf32_limitations = true perfetto_build_with_embedder = true enable_perfetto_trace_processor = true -# Use bundled hermetic Xcode installation maintainted by Chromium, -# except for local iOS builds where it's unsupported. -# Allow for mac cross compile on linux machines. -if (host_os == "mac" || host_os == "linux") { - _result = exec_script("//build/mac/should_use_hermetic_xcode.py", - [ target_os ], - "value") - assert(_result != 2, - "Do not allow building targets with the default " + - "hermetic toolchain if the minimum OS version is not met.") - use_system_xcode = _result == 0 -} - declare_args() { # WebRTC doesn't depend on //base from production code but only for testing # purposes. In any case, it doesn't depend on //third_party/perfetto which
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor