i have installed gcc-4.6.2
source, can't build 32bit program, seemed doesn't have 32bit lib. error report gcc
:
/usr/local/gcc-4.6.2/lib/gcc/x86_64-redhat-linux/4.6.2/crtbegin.o: not read symbols: file in wrong format
my gcc-4.6.2
config is:
target: x86_64-redhat-linux configured with: ../gcc-4.6.2/configure --prefix=/usr/local/gcc-4.6.2 --mandir=/usr/share/man --infodir=/usr/share/info --enable-bootstrap --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --enable-languages=c,c++ --with-gmp=/usr/local/gmp-5.0.1 --with-mpfr=/usr/local/mpfr-2.4.2 --with-mpc=/usr/local/mpc-1.0.1 --without-ppl --without-cloog --with-arch-32=i686 --build=x86_64-redhat-linux --disable-multilib thread model: posix
configure , build gcc with:
--enable-multilib --with-multilib-list=m32,m64
once install it, can compile 32-bit passing "-m32" option gcc. note need 32-bit versions of needed libraries (like glibc.)
Comments
Post a Comment