public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/67069] New: ld: fatal: file .libs/lto-plugin.o: wrong ELF class: ELFCLASS32 during gcc compilation on Solaris 10 x86-64
@ 2015-07-30 16:59 zclai at yahoo dot com
  2015-07-30 17:02 ` [Bug lto/67069] " pinskia at gcc dot gnu.org
  2015-07-31 14:53 ` zclai at yahoo dot com
  0 siblings, 2 replies; 3+ messages in thread
From: zclai at yahoo dot com @ 2015-07-30 16:59 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug lto/67069] ld: fatal: file .libs/lto-plugin.o: wrong ELF class: ELFCLASS32 during gcc compilation on Solaris 10 x86-64
  2015-07-30 16:59 [Bug lto/67069] New: ld: fatal: file .libs/lto-plugin.o: wrong ELF class: ELFCLASS32 during gcc compilation on Solaris 10 x86-64 zclai at yahoo dot com
@ 2015-07-30 17:02 ` pinskia at gcc dot gnu.org
  2015-07-31 14:53 ` zclai at yahoo dot com
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-07-30 17:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67069

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Don't use:
"CFLAGS=-m64" "CXXFLAGS=-m64" "LDFLAGS=-m64"

Instead set CC/CXX to include -m64 instead.
Also you might need to default GCC to 64bit too.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug lto/67069] ld: fatal: file .libs/lto-plugin.o: wrong ELF class: ELFCLASS32 during gcc compilation on Solaris 10 x86-64
  2015-07-30 16:59 [Bug lto/67069] New: ld: fatal: file .libs/lto-plugin.o: wrong ELF class: ELFCLASS32 during gcc compilation on Solaris 10 x86-64 zclai at yahoo dot com
  2015-07-30 17:02 ` [Bug lto/67069] " pinskia at gcc dot gnu.org
@ 2015-07-31 14:53 ` zclai at yahoo dot com
  1 sibling, 0 replies; 3+ messages in thread
From: zclai at yahoo dot com @ 2015-07-31 14:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67069

--- Comment #2 from Alex Lai <zclai at yahoo dot com> ---
(In reply to Andrew Pinski from comment #1)
> Don't use:
> "CFLAGS=-m64" "CXXFLAGS=-m64" "LDFLAGS=-m64"
> 
> Instead set CC/CXX to include -m64 instead.
> Also you might need to default GCC to 64bit too.

Setting CC/CXX to include -m64 worked. Thanks a lot.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-31 14:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-30 16:59 [Bug lto/67069] New: ld: fatal: file .libs/lto-plugin.o: wrong ELF class: ELFCLASS32 during gcc compilation on Solaris 10 x86-64 zclai at yahoo dot com
2015-07-30 17:02 ` [Bug lto/67069] " pinskia at gcc dot gnu.org
2015-07-31 14:53 ` zclai at yahoo dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).