1
0

Accepting request 732134 from home:marxin:branches:mozilla:Factory

- Add fix-top-level-asm-issue.patch in order to fix LTO build.
- Enable LTO on TW on x86_64.
- Use GCC.

OBS-URL: https://build.opensuse.org/request/show/732134
OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaThunderbird?expand=0&rev=487
This commit is contained in:
Wolfgang Rosenauer 2019-09-20 11:19:56 +00:00 committed by Git OBS Bridge
parent 558b06a6a9
commit 28408893c0
3 changed files with 58 additions and 2 deletions

View File

@ -1,3 +1,9 @@
Fri Sep 20 09:49:41 UTC 2019 - Martin Liška <mliska@suse.cz>
- Add fix-top-level-asm-issue.patch in order to fix LTO build.
- Enable LTO on TW on x86_64.
- Use GCC.
-------------------------------------------------------------------
Fri Sep 20 08:24:23 UTC 2019 - Bernhard Wiedemann <bwiedemann@suse.com>

View File

@ -26,8 +26,7 @@
%define source_prefix thunderbird-%{mainver}
# always build with GCC as SUSE Security Team requires that
# TODO: Deactivate this as the next step
%define clang_build 1
%define clang_build 0
# PIE, full relro
%define build_hardened 1
@ -151,6 +150,7 @@ Patch3: mozilla-aarch64-startup-crash.patch
Patch4: fix-missing-return-warning.patch
Patch5: thunderbird-locale-build.patch
Patch6: mozilla-bmo1568145.patch
Patch7: fix-top-level-asm-issue.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: coreutils fileutils textutils /bin/sh
Recommends: libcanberra0
@ -235,6 +235,7 @@ fi
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%build
#
@ -348,6 +349,13 @@ ac_add_options --disable-crashreporter
ac_add_options --disable-jemalloc
ac_add_options --enable-valgrind
%endif
%ifarch x86_64
# LTO needs newer toolchain stack only (at least GCC 8.2.1 (r268506)
%if 0%{?suse_version} > 1500
ac_add_options --enable-lto
%endif
%endif
EOF
./mach build

View File

@ -0,0 +1,42 @@
From 91bb79836ee274855393bdf6ab10e24899b1b349 Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Fri, 17 May 2019 14:41:35 +0200
Subject: [PATCH] Fix top-level asm issue.
---
security/sandbox/linux/moz.build | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/security/sandbox/linux/moz.build b/security/sandbox/linux/moz.build
index aae85843e9f6..208368dfd189 100644
--- a/security/sandbox/linux/moz.build
+++ b/security/sandbox/linux/moz.build
@@ -61,7 +61,6 @@ UNIFIED_SOURCES += [
'../chromium/sandbox/linux/bpf_dsl/policy_compiler.cc',
'../chromium/sandbox/linux/bpf_dsl/syscall_set.cc',
'../chromium/sandbox/linux/seccomp-bpf/die.cc',
- '../chromium/sandbox/linux/seccomp-bpf/syscall.cc',
'broker/SandboxBrokerCommon.cpp',
'Sandbox.cpp',
'SandboxBrokerClient.cpp',
@@ -77,6 +76,7 @@ UNIFIED_SOURCES += [
SOURCES += [
'../chromium/base/strings/safe_sprintf.cc',
'../chromium/base/third_party/icu/icu_utf.cc',
+ '../chromium/sandbox/linux/seccomp-bpf/syscall.cc',
'../chromium/sandbox/linux/seccomp-bpf/trap.cc',
'../chromium/sandbox/linux/services/syscall_wrappers.cc',
]
@@ -96,6 +96,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
SOURCES['../chromium/sandbox/linux/services/syscall_wrappers.cc'].flags += [
'-Wno-empty-body',
]
+ SOURCES['../chromium/sandbox/linux/seccomp-bpf/syscall.cc'].flags += [
+ '-fno-lto'
+ ]
# gcc lto likes to put the top level asm in syscall.cc in a different partition
# from the function using it which breaks the build. Work around that by
--
2.23.0