Open
Bug 1516803
Opened Last year
Updated 7 months ago
sandbox needs to be built with --param lto-partitions=1 when GCC LTO is enabled
Categories
(Firefox Build System :: General, defect)
Not set
Tracking
(Not tracked)
UNCONFIRMED
People
(Reporter: jh, Unassigned)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0
Steps to reproduce:
Built Firefox with GCC and --enable-lto
Actual results:
I got undefined symbol because LTO partitioning separated toplevel ASM statement from its use.
security/sandbox/linux/moz.build already has code to pass --param lto-partitions=1 but it seems broken. Martin Liska provided me the following patch:
diff --git a/security/sandbox/linux/moz.build b/security/sandbox/linux/moz.build
--- a/security/sandbox/linux/moz.build
+++ b/security/sandbox/linux/moz.build
@@ -99,9 +99,8 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
# 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
# forcing there to be only one partition.
-for f in CONFIG['OS_CXXFLAGS']:
- if f.startswith('-flto') and CONFIG['CC_TYPE'] != 'clang':
- LDFLAGS += ['--param lto-partitions=1']
+if CONFIG['CC_TYPE'] != 'clang':
+ LDFLAGS += ['--param', 'lto-partitions=1']
DEFINES['NS_NO_XPCOM'] = True
DisableStlWrapping()
this solves the problem
Comment 1•Last year
|
||
Thanks a lot for the report, Jan. Were you planning to submit the patch through Phabricator?
Updated•Last year
|
Component: Untriaged → General
Product: Firefox → Firefox Build System
| Reporter | ||
Comment 2•Last year
|
||
Updated•Last year
|
OS: Unspecified → Linux
Summary: santbox needs to be build with --param lto-partitions=1 when GCC LTO is enabled → sandbox needs to be built with --param lto-partitions=1 when GCC LTO is enabled
You need to log in
before you can comment on or make changes to this bug.
Description
•