nullplan wrote:
My guess is that one of the subprocesses, e.g. cpp, or cc1, has failed with SIGILL. I'd recommend running the entire thing with strace -f, to find that out. Common reason for this failure is wrong compiler settings, so the compiler was compiled for the wrong machine.
Right in the bull's-eye. Sorry if I was not clear, but the above output is straight from my OS, rather than my Linux machine.
Anyway, the problem was exactly that. GCC registers some signals to the program, including SIGILL. This SIGILL was coming from gcc_src/libcpp/lex.c. The GCC lexer uses SIMD instructions to speed up the analysis, and at run-time (via CPUID) decides which version of the search_line_ * routines should be executed, either 'normal', MMX, SSE2 or SSE4.2 .
Since the OS was not even enabling SSE (well, I didn't expect any program to use it) It was producing 'Invalid Opcode Exception'.
----
Fixed this, GCC was able to run 'fine'... now I need to investigate why the final binary is corrupted: the object file is generated correctly, but the final binary isn't... well, one thing at a time.
Thank you @nullplan.