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
read.constfold.NNNN and its caller. This function contains only a jump to itself, creating an infinite loop.
We need to investigate which versions of gcc this bug appears on, and possibly report to gcc.
However, LTO introduces another annoying problem: a PyPy compiled with
-flto is entirely undebuggable. Indeed,
-g -flto works, but
gdb takes at least 30 minutes to load (possibly much longer, I interrupted it). As the one who spends at least a couple of days fighting really obscure PyPy issues in gdb every now and again, I will veto
-flto as long as this problem exists: otherwise, the next time we have an issue that cannot be reproduced in debug builds, I will have to spend weeks trying to debug without debugging symbols, and I'm really really not looking forward to that.