diff options
author | Georgy Yakovlev <gyakovlev@gentoo.org> | 2019-08-31 23:52:37 -0700 |
---|---|---|
committer | Georgy Yakovlev <gyakovlev@gentoo.org> | 2019-09-01 12:54:53 -0700 |
commit | 307f357e8b9ad53abb505b29536788d4a507ccb5 (patch) | |
tree | e77334d0918aa02595005ad76c08830946e192ed /eclass/mozcoreconf-v6.eclass | |
parent | profiles: Mask some more guile:12 dependent packages and flags (diff) | |
download | gentoo-307f357e8b9ad53abb505b29536788d4a507ccb5.tar.gz gentoo-307f357e8b9ad53abb505b29536788d4a507ccb5.tar.bz2 gentoo-307f357e8b9ad53abb505b29536788d4a507ccb5.zip |
mozcoreconf-v6.eclass: don't force -mminimal-toc on ppc64
This is a really old flag which was needed to compile with
GCC <4.6
I've traced down the existence of this flag here up to
commit 5980a31194da3376ea9dcf804139a2999199508c
Author: Raúl Porcel <armin76@gentoo.org>
Date: Sat Mar 15 18:09:25 2008 +0000
Add eclasses for mozilla-firefox-3 and xulrunner-1.9
probably it also was in earlier eclasses.
it was there to fix this kind of bugs: https://bugs.gentoo.org/241900
Problem WAS that on ppc64 .toc1 section could be at most 64KB in size
It's true on GCC versions prior to 4.6 or if mminimal-toc passed on modern gcc
However, since GCC4.6[1] they implemented 3 new TOC models
-mcmodel=small
uses 16-bit toc offsets, ie. what we had before.
-mcmodel=medium [ the new default ]
uses 32-bit toc offsets and addresses static data, string constants
etc. relative to the toc pointer. Limits data to around 2G.
-mcmodel=large
uses 32-bit toc offsets, no limit on static data.
By passing -mminimal-toc on modern GCC we force -mcmodel=small
it means The TOC is limited to 64k.
The default for gcc currently is -mcmodel=medium, with it TOC static
data may grow up to 4G
But here's the problem:
current mozilla builds (thunderbird and firefox) force -O3 optimization
by default, making it very easy to overflow TOC section
{standard input}:1344252: Error: operand out of range \
(0x00000000000178b8 is not between 0xffffffffffff8000 and 0x0000000000007ffc)
Passing -O3 is THE DEFAULT configuration, unless
USE=custom-optimization is set, which voids the warranty =)
So I propose removing this flag from eclass and building with default
model on modern toolchain. Quite unlikely someone tries to build FF/TB
using gcc-4.5, and if they do - they have other problems to solve.
[1] https://gcc.gnu.org/ml/gcc-patches/2010-06/msg00747.html
Acked-by: Jory Pratt <anarchy@gentoo.org>
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'eclass/mozcoreconf-v6.eclass')
-rw-r--r-- | eclass/mozcoreconf-v6.eclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/eclass/mozcoreconf-v6.eclass b/eclass/mozcoreconf-v6.eclass index df08dd19af69..2789e6046b9f 100644 --- a/eclass/mozcoreconf-v6.eclass +++ b/eclass/mozcoreconf-v6.eclass @@ -229,7 +229,7 @@ mozconfig_init() { append-flags -fPIC ;; ppc64) - append-flags -fPIC -mminimal-toc + append-flags -fPIC # Reduce the memory requirements for linking if use clang ; then # Nothing to do |