Compiling your own GCC for weapons using a cross-compiler

I am looking to create my own GCC assembly for an ARM system and am having problems. Build machine i686-linux. Every tutorial that I see tells me how to set up the actual set for cross-compiling (which I already did with crosstools-ng). However, I do not see anything related to compiling my own ARM GCC. The configure line I used below, I installed sysroot with only headers. I also compiled and installed GMP and MPFR.

../../gcc-4.3.5/configure –host=arm-unknown-linux-gnueabi –build=i686-build_pc-linux-gnu –target=arm-unknown-linux-gnueabi –prefix=/home/vm/gcc-native/sysroot –with-sysroot=/home/vm/gcc-native/sysroot –enable-shared –enable-threads –disable-libmudflap –disable-libssp –disable-libgomp –disable-libstdcxx-pch –with-gnu-as –with-gnu-ld –enable-languages=c,c++ –enable-symvers=gnu –enable-__cxa_atexit –disable-nls –disable-multilib –with-gmp=/home/vm/gcc-native/sysroot/ –with-mpfr=/home/vm/gcc-native/sysroot/ 

GCC will build for a while, but then die with this:

checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile.

I'm not sure how this will work even on my system, since I am building on i686-linux, and the target / host is arm-linux. My thought right now is to find the ltib distribution and look at the spec file for GCC and try to follow all the steps. GCC, which the libre supplied for my board, cannot compile on my system due to conflicts with the std namespace.

Any information / links would be appreciated!

+4
source share
1 answer

Look in the config.log file (maybe not at the top level) and see what it tried to do when the test failed. Just grep for the message cannot compute suffix , and you should find the correct bit (it will not be at the end of the file).

Note that you will need a working arm-unknown-linux-gnueabi-gcc in your path somewhere if you want to create a cross-native toolchain. That is, you need a cross-compiler to create a cross-native compiler.

+2
source

All Articles