[pypy-issue] Issue #2572: Link-time optimization (LTO) disabled (pypy/pypy)

Armin Rigo issues-reply at bitbucket.org
Tue Jun 6 01:36:02 EDT 2017

New issue 2572: Link-time optimization (LTO) disabled

Armin Rigo:

Link-time optimization (the gcc option ``-flto``) has been disabled again.  With gcc 6.2.0 on Ubuntu 14.04, it produces code that really looks invalid after inspection in ``objdump``.  To reproduce, take a recent version of trunk (e.g. 0649d557369f), and translate it on Linux64 with ``gcc (Ubuntu 6.2.0-3ubuntu11~14.04) 6.2.0 20160901``.  Then look in ``objdump`` at ``read.constfold.NNNN`` and its caller.  This function contains only a just to itself, creating an infinite loop.

We need to investigate which versions of gcc this bug appears on, and possibly report to gcc.

Alternatively, if we're confident that the problem is really fixed in gcc 6.3, then we could add some checks and put the option ``-flto`` only on gcc >= 6.3...

More information about the pypy-issue mailing list