This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-7.2.0 on solaris 10 x86
- From: Xi Ruoyao <ryxi at stu dot xidian dot edu dot cn>
- To: Neal Elliott <nealelliott at netscape dot net>, gcc-help at gcc dot gnu dot org
- Cc: ryxi at stu dot xidian dot edu dot cn
- Date: Wed, 13 Sep 2017 23:39:05 +0800
- Subject: Re: gcc-7.2.0 on solaris 10 x86
- Authentication-results: sourceware.org; auth=none
- References: <15e7b6b0e2c-c01-cc8@webjas-vaa106.srv.aolmail.net>
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