I'm trying to configure gcc to be able to cross-compile both 32 and 64 bit code. Currently I do this
Code: Select all
export SYSROOT=/Users/gerryg/artix/
export PREFIX=$SYSROOT/usr/
export TARGET=x86_64-artix
rm -rf $PREFIX
mkdir -p $PREFIX
rm -rf binutils-build
mkdir binutils-build
cd binutils-build
../binutils-2.20.1/configure --disable-werror --target=$TARGET --prefix=$PREFIX --with-sysroot=$PREFIX
make all
make install
cd ..
rm -rf gcc-build
mkdir gcc-build
cd gcc-build
../gcc-4.5.0/configure --target=$TARGET --prefix=$PREFIX --disable-nls --enable-languages=c,c++ --with-newlib --enable-multilib
make all-gcc
make install-gcc
make all-target-libgcc
make install-target-libgcc
cd ..
I've been trying the --enable-multilib option but I feel I still need to do something else.
Can anyone tell me how to get both the 32 bit and 64 bit versions of libgcc.a built and installed ? Perhaps someone with a 64bit Linux machine ?
Thanks in advance.