GCC cross-compiler experts help needed please ?
Posted: Sun Aug 01, 2010 3:38 pm
Hi,
I'm trying to configure gcc to be able to cross-compile both 32 and 64 bit code. Currently I do thisThis works okay for both 32 and 64 bit building, except that it only installs a single 64 bit version of libgcc.a. I could build and install 2 versions of gcc but I feel sure it should be possible to build a toolchain that does both. I've tried various targets including x86_64-pc-linux and x86_64-pc-elf. And I've even tried to make my own target.
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.
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.