1111
|
1 |
From 91bb79836ee274855393bdf6ab10e24899b1b349 Mon Sep 17 00:00:00 2001
|
|
2 |
From: Martin Liska <mliska@suse.cz>
|
|
3 |
Date: Fri, 17 May 2019 14:41:35 +0200
|
|
4 |
Subject: [PATCH] Fix top-level asm issue.
|
|
5 |
|
|
6 |
---
|
|
7 |
security/sandbox/linux/moz.build | 5 ++++-
|
|
8 |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
9 |
|
|
10 |
diff --git a/security/sandbox/linux/moz.build b/security/sandbox/linux/moz.build
|
|
11 |
--- a/security/sandbox/linux/moz.build
|
|
12 |
+++ b/security/sandbox/linux/moz.build
|
1152
|
13 |
@@ -66,32 +66,32 @@ UNIFIED_SOURCES += [
|
|
14 |
"../chromium/base/time/time_now_posix.cc",
|
|
15 |
"../chromium/sandbox/linux/bpf_dsl/bpf_dsl.cc",
|
|
16 |
"../chromium/sandbox/linux/bpf_dsl/codegen.cc",
|
|
17 |
"../chromium/sandbox/linux/bpf_dsl/dump_bpf.cc",
|
|
18 |
"../chromium/sandbox/linux/bpf_dsl/policy.cc",
|
|
19 |
"../chromium/sandbox/linux/bpf_dsl/policy_compiler.cc",
|
|
20 |
"../chromium/sandbox/linux/bpf_dsl/syscall_set.cc",
|
|
21 |
"../chromium/sandbox/linux/seccomp-bpf/die.cc",
|
|
22 |
- "../chromium/sandbox/linux/seccomp-bpf/syscall.cc",
|
|
23 |
"broker/SandboxBrokerCommon.cpp",
|
|
24 |
"Sandbox.cpp",
|
|
25 |
"SandboxBrokerClient.cpp",
|
|
26 |
"SandboxFilter.cpp",
|
|
27 |
"SandboxFilterUtil.cpp",
|
|
28 |
"SandboxHooks.cpp",
|
|
29 |
"SandboxInfo.cpp",
|
|
30 |
"SandboxLogging.cpp",
|
|
31 |
"SandboxOpenedFiles.cpp",
|
|
32 |
"SandboxReporterClient.cpp",
|
1123
|
33 |
]
|
|
34 |
|
1111
|
35 |
SOURCES += [
|
1152
|
36 |
"../chromium/base/strings/safe_sprintf.cc",
|
|
37 |
"../chromium/base/third_party/icu/icu_utf.cc",
|
|
38 |
+ "../chromium/sandbox/linux/seccomp-bpf/syscall.cc",
|
|
39 |
"../chromium/sandbox/linux/seccomp-bpf/trap.cc",
|
|
40 |
"../chromium/sandbox/linux/services/syscall_wrappers.cc",
|
1111
|
41 |
]
|
1123
|
42 |
|
|
43 |
# This copy of SafeSPrintf doesn't need to avoid the Chromium logging
|
|
44 |
# dependency like the one in libxul does, but this way the behavior is
|
|
45 |
# consistent. See also the comment in SandboxLogging.h.
|
1152
|
46 |
SOURCES["../chromium/base/strings/safe_sprintf.cc"].flags += ["-DNDEBUG"]
|
|
47 |
@@ -105,16 +105,19 @@ if CONFIG["CC_TYPE"] in ("clang", "gcc")
|
|
48 |
"-Wno-unreachable-code-return"
|
|
49 |
]
|
1123
|
50 |
|
1152
|
51 |
if CONFIG["CC_TYPE"] in ("clang", "gcc"):
|
1170
|
52 |
CXXFLAGS += ["-Wno-error=stack-protector"]
|
1152
|
53 |
SOURCES["../chromium/sandbox/linux/services/syscall_wrappers.cc"].flags += [
|
|
54 |
"-Wno-empty-body",
|
1111
|
55 |
]
|
|
56 |
+ SOURCES['../chromium/sandbox/linux/seccomp-bpf/syscall.cc'].flags += [
|
|
57 |
+ '-fno-lto'
|
|
58 |
+ ]
|
|
59 |
|
|
60 |
# gcc lto likes to put the top level asm in syscall.cc in a different partition
|
|
61 |
# from the function using it which breaks the build. Work around that by
|
1123
|
62 |
# forcing there to be only one partition.
|
1152
|
63 |
for f in CONFIG["OS_CXXFLAGS"]:
|
|
64 |
if f.startswith("-flto") and CONFIG["CC_TYPE"] != "clang":
|
|
65 |
LDFLAGS += ["--param lto-partitions=1"]
|
1123
|
66 |
|