Hi all!

I hope that I've selected the correct subforum, if it isn't please move it to the correct subforum.

I'm trying to build a arm cross-compiler, but I don't get it to work, I follow the next steps:

1. Install binutils:
./configure --target=$TARGET --prefix=$PREFIX --enable-multilib --disable-werror && make all install
2.Install "little gcc":
./configure --target=$TARGET --prefix=$PREFIX --with-newlib --without-headers --disable-shared --enable-languages=c,c++ --disable-werror --with-gmp-include=/home/javi/CROSS/GMPTILEINTEL/include --with-gmp-lib=/home/javi/CROSS/GMPTILEINTEL/lib --with-mpfr-include=/home/javi/CROSS/MPFRTILEINTEL/include --with-mpfr-lib=/home/javi/CROSS/MPFRTILEINTEL/lib && make all-gcc && make install-gcc
3. Install newlib:
./configure --target=$TARGET --prefix=$PREFIX --enable-multilib --disable-werror && make all && make install
4. Build again gcc("big gcc"):

./configure --target=$TARGET --prefix=$PREFIX --enable-languages=c,c++ --enable-multilib --with-newlib --disable-werror --with-headers=/home/javi/CROSS/CROSSTOOLTILE/include && make all-gcc && make install-gcc


In the fourth step, if I use "--prefix=$PREFIX" the configure command doesn't work, the prompt gives me an error that I read on the web that I can resolve it changing the --prefix, ok, so I use the same command with another rute in --prefix, i.e:

./configure --target=$TARGET --prefix=/home/javi/workkk --enable-languages=c,c++ --enable-multilib --with-newlib --disable-werror --with-headers=/home/javi/CROSS/CROSSTOOLTILE/include && make all-gcc && make install-gcc

Well, everything have been installed, but if I try to compile a simple HelloWorld.c file with /home/javi/workkk/arm-elf-gcc and it dosn't work because arm-elf-gcc use i686-as and i686-ld (i686 is the architecture where I'm building the cross-compiler).

I know that arm-elf-gcc is using i686-as and i686-ld because when arm-elf-gcc reach to the assembler step the prompt says me that it doesn't understand any arm instruction.

I would like know how can I resolve it, I've read several manuals about the issue but I don't get to build a correct cross compiler for one reason or another.

Best regards,

Javi

p.d: sorry for my English