Compiling GCC for different machine on same Architecture

Jaya Pavan Bhattiprolu pavanbhattiprolu@gmail.com
Tue Sep 2 15:08:00 GMT 2014


Hi,

We are trying to build our code base for CentOS 7 machine with x86_64
architecture on CentOS6 with x86_64.

For that we are trying to build a centos7 Toolchain. All the gcc/ld/ar
should be statically linked, so that we are ensuring that it will not
uses any native centos6 stuff.

In this process, we are able to generate statically linked GCC/AR/LD.
But problem was this GCC not generating a statically linked binaries
and fails while checking flags during configure at "checking static
flag -static ".
Due to this while running those binaries it refers to native libgcc and fails.

We are using the below command for configure.
../gcc../configure -prefix=/mnt/data0/toolchain-vm-temp2
--build=x86_64-CentOS7-linux-gnu
-with-sysroot=/mnt/data0/tools/gnutools/toolchain-vm --disable-nls
--disable-multilib --enable-languages=c,c++ --disable-sim
--enable-symvers=gnu --enable__cxa_atexit  --enable-lto --with-gnu-ld
--enable-static

Can Anyone provide solution or how to achieve this task.

--
Thanks,
Pavan Bhattiprolu



More information about the Gcc-help mailing list