Re: gcc-7.2.0 on solaris 10 x86

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2017-09-13 09:26 -0400, Neal Elliott wrote:
> Hello everyone,
>                  I attempted to build gcc 7.2.0 on my solaris machine with the following configure options:
> 
> CFLAGS="-I/usr/local/include -m64" LDFLAGS="-L/usr/local/lib" CXXFLAGS="-I/usr/local/include" ../configure --disable-
> multilib --with-system-zlib --enable-languages=c,c++
> 
> make fails with the error:

.....


> ld: warning: file ../build-i386-pc-solaris2.10/libiberty/libiberty.a(concat.o): wrong ELF class: ELFCLASS64

You have CFLAGS with -m64 so libiberty is compiled to 64-bit object code.  But CXXFLAGS is without -m64 so
GCC might be compiled to 32-bit object code (I don't know your default).

And, it's better to use CC="gcc -m64" CXX="g++ -m64" instead of CFLAGS=-m64 CXXFLAGS=-m64 since some package
in GCC may change CFLAGS and CXXFLAGS.
-- 
Xi Ruoyao <ryxi@xxxxxxxxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux