gcc cross-compiler
Posted: Sat Jun 06, 2009 5:31 pm
I don't know where this should be posted, so if it's in the inappropriate in this forum, please move it.
Anyway. I've followed the GCC cross-compiler tutorial to the letter. I was trying to compile binutils-2.18, gcc-4.4.0, and gmp-4.3.1 with mpfr-2.4.1 on Cygwin. Host compiler is
Following the tutorial, I've successfully built binutils, gmp and (following the MPFR tutorial) the static part of mpfr. Bulding the shared library fails with
During the configure process, there were multiple outputs of "checking whether we are crosscompiling... no" - is this correct? I mean the tutorial should build a cross-compiler, not? However, the resulting GCC cross-compiler works correctly, so this combination of gcc/binutils should be marked as "ok" in the Wiki.
Another thing is that regardless whether I specify --without-headers or not, the cross-compiler can't seem to find the system include files. Passing the -I/usr/include option helps, but the stock Cygwin compiler doesn't require this option. Is there an easy way to remedy this? I know the tutorial was written in mind with that the cross-compiler will be used to compile the user's kernel sources, but I'm not using it for that (at least not for now).
Anyway. I've followed the GCC cross-compiler tutorial to the letter. I was trying to compile binutils-2.18, gcc-4.4.0, and gmp-4.3.1 with mpfr-2.4.1 on Cygwin. Host compiler is
Code: Select all
$ gcc --version
gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
Code: Select all
$ ../mpfr-2.4.1/configure --prefix=/usr/local --disable-static --enable-shared
checking for a BSD-compatible install... /usr/bin/install -c
... snip ...
checking for DLL/static GMP... static
configure: error: gmp.h isn't a DLL: use --enable-static --disable-shared
Another thing is that regardless whether I specify --without-headers or not, the cross-compiler can't seem to find the system include files. Passing the -I/usr/include option helps, but the stock Cygwin compiler doesn't require this option. Is there an easy way to remedy this? I know the tutorial was written in mind with that the cross-compiler will be used to compile the user's kernel sources, but I'm not using it for that (at least not for now).