https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67069
Bug ID: 67069 Summary: ld: fatal: file .libs/lto-plugin.o: wrong ELF class: ELFCLASS32 during gcc compilation on Solaris 10 x86-64 Product: gcc Version: 5.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: zclai at yahoo dot com Target Milestone: --- During gcc 5.2.0 compilation, libtool attempted to make 32bit lto-plugin.o and failed: libtool: link: gcc -shared -Wl,-z -Wl,text -Wl,-h -Wl,liblto_plugin.so.0 -o .libs/liblto_plugin.so.0.0.0 .libs/lto-plugin.o -lc -static-libgcc -m64 ../libiberty/pic/libiberty.a ld: fatal: file .libs/lto-plugin.o: wrong ELF class: ELFCLASS32 ld: fatal: file processing errors. No output written to .libs/liblto_plugin.so.0.0.0 collect2: ld returned 1 exit status gmake[4]: *** [liblto_plugin.la] Error 1 gmake[4]: Leaving directory `/home/alelai/gcc-5.2.0.obj/lto-plugin' gmake[3]: *** [all] Error 2 gmake[3]: Leaving directory `/home/alelai/gcc-5.2.0.obj/lto-plugin' gmake[2]: *** [all-stage1-lto-plugin] Error 2 gmake[2]: Leaving directory `/home/alelai/gcc-5.2.0.obj' gmake[1]: *** [stage1-bubble] Error 2 gmake[1]: Leaving directory `/home/alelai/gcc-5.2.0.obj' gmake: *** [all] Error 2 GCC was onfigured as follows: ../gcc-5.2.0.src/configure --prefix=$HOME/gcc-5.2.0 --with-gmp=$HOME/gmp-6.0.0 --with-mpfr=$HOME/mpfr-3.1.3 --with-mpc=$HOME/mpc-1.0.3 --enable-languages=c,c++ "CFLAGS=-m64" "CXXFLAGS=-m64" "LDFLAGS=-m64" --enable-shared gmp, mpfr and mpc had been compiled as 64 bit libs: $ file libgmp.so.10.2.0 libgmp.so.10.2.0: ELF 64-bit LSB shared object, x86-64, version 1, dynamically linked, not stripped $ file libmpfr.so.4.1.3 libmpfr.so.4.1.3: ELF 64-bit LSB shared object, x86-64, version 1, dynamically linked, not stripped $ file libmpc.so.3.0.0 libmpc.so.3.0.0: ELF 64-bit LSB shared object, x86-64, version 1, dynamically linked, not stripped