As http://gcc.gnu.org/ml/gcc-testresults/2010-05/msg00120.html shows,
*-unknown-freebsd* exhibits tons of failures around LTO.

I dug a bit deeper, and even the most trivial test program
  int main() { }
fails with
  lto1: internal compiler error: compressed stream: data error
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See <http://gcc.gnu.org/bugs.html> for instructions.
  lto-wrapper: /files/pfeifer/gcc/bin/gcc returned 1 exit status
  collect2: lto-wrapper returned 1 exit status
when compiled with gcc -flto x.c.

The backtrace looks as follows, not too helpful:

  #0  diagnostic_action_after_output () at /usr/test/gcc/gcc/diagnostic.c:193
  #1  0x08136d6e in diagnostic_report_diagnostic (context=0x8926400, 
      diagnostic=0xbfbfe5f4) at /usr/test/gcc/gcc/diagnostic.c:472
  #2  0x0813754a in internal_error (gmsgid=0x87928df "compressed stream: %s")
      at /usr/test/gcc/gcc/diagnostic.c:757
  #3  0x0827117e in lto_end_uncompression (stream=0x28b03b80)
      at /usr/test/gcc/gcc/lto-compress.c:309
  Backtrace stopped: previous frame inner to this frame (corrupt stack?)
  (gdb) 

Now, gcc/doc/install.texi requests libelf version 0.8.12 which is not
present on this system.  Rather, from what I can see FreeBSD has its
own, independent implementation.  And something seems to be broken or
missing or incompatible here.

I can see three outcomes here, addressing this issue (which happens on
a default installation).

 1. Tighten the GCC configure checks so that they detect that (if)
    the FreeBSD provided libelf is not sufficient and bail out.
 2. Fix GCC to work with the FreeBSD provided libelf.
 3. Fix FreeBSD to sufficiently support GCC (Joseph and Kai on Cc: are
    the respective maintainers there).

How can we best get this resolved?

Gerald

Reply via email to