This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc-7.2.0 on solaris 10 x86


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@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]