Skip to content

Mozcoreconf v7#15

Open
stefson wants to merge 8 commits intomasterfrom
mozcoreconf-v7
Open

Mozcoreconf v7#15
stefson wants to merge 8 commits intomasterfrom
mozcoreconf-v7

Conversation

@stefson
Copy link
Owner

@stefson stefson commented Sep 9, 2019

No description provided.

rebase of gentoo@9cc1ad5

Closes: https://bugs.gentoo.org/692500
Acked-by: Jory Pratt <anarchy@gentoo.org>
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
backport of gentoo@307f357

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>
backport of gentoo@d1950f8

Closes: https://bugs.gentoo.org/693666
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
stefson pushed a commit that referenced this pull request Feb 8, 2020
Test project /var/tmp/portage/dev-cpp/ms-gsl-2.0.0/work/ms-gsl-2.0.0_build
      Start  1: span_tests
      Start  2: multi_span_tests
      Start  3: strided_span_tests
      Start  4: string_span_tests
      Start  5: at_tests
      Start  6: bounds_tests
      Start  7: notnull_tests
      Start  8: assertion_tests
      Start  9: utils_tests
      Start 10: owner_tests
      Start 11: byte_tests
      Start 12: algorithm_tests
      Start 13: sloppy_notnull_tests
      Start 14: no_exception_throw_tests
      Start 15: no_exception_ensure_tests
 1/15 Test  #1: span_tests .......................   Passed    0.10 sec
 2/15 Test  #2: multi_span_tests .................   Passed    0.09 sec
 3/15 Test  #3: strided_span_tests ...............   Passed    0.09 sec
 4/15 Test  #4: string_span_tests ................   Passed    0.08 sec
 5/15 Test  #5: at_tests .........................   Passed    0.07 sec
 6/15 Test  #6: bounds_tests .....................   Passed    0.07 sec
 7/15 Test  #7: notnull_tests ....................   Passed    0.06 sec
 8/15 Test  #8: assertion_tests ..................   Passed    0.05 sec
 9/15 Test  #9: utils_tests ......................   Passed    0.05 sec
10/15 Test #10: owner_tests ......................   Passed    0.04 sec
11/15 Test #11: byte_tests .......................   Passed    0.04 sec
12/15 Test #12: algorithm_tests ..................   Passed    0.03 sec
13/15 Test #13: sloppy_notnull_tests .............   Passed    0.02 sec
14/15 Test #14: no_exception_throw_tests .........   Passed    0.02 sec
15/15 Test #15: no_exception_ensure_tests ........   Passed    0.01 sec

100% tests passed, 0 tests failed out of 15

Package-Manager: Portage-2.3.87, Repoman-2.3.20
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant