Cross compiler building
Hi all!
I'm a student from Spain and I'm trying to build a arm cross-compiler, I've searched on the web but I haven't found anything and I don't get it to work. I hope that I've selected the correct subforum, if it isn't please move it to the correct subforum. I've followed 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! |
You should use a too like Crosstool-NG to build cross toolchains. There are way too many variables and problems to solve, and the authors of crosstool-ng have solved most of them.
--- rod. |
Quote:
I didn't know this project, but in any case I would like to build a cross toolchain manually. |
Quote:
--- rod. |
Quote:
( export LD=arm-ld etc. may also work.) But then again : We have Crosstool-NG : So why use an extra week (month ?) with tries to build a tool-chain ? More reasons to use Crosstool-NG : It's constantly being updated. No other tools have all the Crosstool-NG benefits. If you want to know, how to build a tool chain, the usually suggested method is: Build LFS, 'Linux From Scratch' a couple of times. And then move on to CLFS : 'Cross Linux From Scratch' http://www.linuxfromscratch.org/lfs/ .. |
Hi again!
I want to know how build a cross toolchain manually because in the future if I need build a cross toolchain for an architecture that isn't supported by crosstool-NG I would like to know how could I do. knudfl I will test exporting the path to LD_LIBRARY_PATH. Also I've followed the steps from LFS book but I haven't had success. Thanks! p.d: sorry for my English |
Quote:
example : 'LD=/opt/arm/bin/arm-ld' simply defines which ld to use. |
Quote:
--- rod |
Quote:
Quote:
Thanks!!:) |
All times are GMT -5. The time now is 09:36 PM. |