Despite they seem to have the same interface, the libelf bundled with Solaris (at least as far back as Solaris 8) cause trouble:
* The Solaris libelf.h isn't largefile aware: #if defined(_ILP32) && (_FILE_OFFSET_BITS != 32) #error "large files are not supported by libelf" #endif This is explained in detail in http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/sgs/libelf/common/README.LFS * IRIX 6.5 has libelf.h, too, but lacks gelf.h. * When I use libelf 0.8.10 instead (installed into /vol/gcc/{include, lib}), I have to be very careful: using CPPFLAGS=-I/vol/gcc/include doesn't work since libelf.h is preferred and thus the copy in /usr/include is used. Using -I/vol/gcc/include/libelf doesn't work either since gelf.h includes libelf/libelf.h which isn't found than. One needs to use -I/vol/gcc/include/libelf -I/vol/gcc/include, which is intricate to get right. I think the use of libelf should be handled similarly to gmp/mpfr via --with-libelf or some such. -- Summary: Solaris and IRIX libelf cause trouble for build Product: gcc Version: lto Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap AssignedTo: dnovillo at gcc dot gnu dot org ReportedBy: ro at gcc dot gnu dot org GCC build triplet: sparc-sun-solaris2.11 GCC host triplet: sparc-sun-solaris2.11 GCC target triplet: sparc-sun-solaris2.11 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39019