Page 1 of 1
Building a cross compiler
Posted: Tue Apr 15, 2008 3:24 pm
by suthers
I have recently encountered problems building my kernel.
I could not call asm functions from my kernel.
I was told to build a cross compiler to solve this problem.
I followed the steps as described here:
http://www.osdev.org/wiki/GCC_Cross-Compiler
But when i reach the make all-gcc, I get an error:
"make: *** No rule to make target all-gcc'. Stop."
Any ideas what is going wrong?
Thanks in advance,
Jules
Posted: Tue Apr 15, 2008 4:40 pm
by Zenith
Simple check - is there a Makefile in the directory? If no, configure failed. If yes, does it have a target for all-gcc? If not, something else went wrong. Also if you're using Cygwin, do not use the special Cygwin GCC sources, download the ones from gcc.gnu.org.
Posted: Wed Apr 16, 2008 1:32 am
by JamesM
Configure almost certainly failed. Look at the error messages - don't just ignore them.
Posted: Thu Apr 17, 2008 12:52 pm
by suthers
Thanks JamesM, I didn't read the error messages
Repaired I didn't have GMP or MPFR installed.
But now when I run My cross compiler I get the error message:
The procedure entry point __getreent could not be located in the dynamic link library cygwin1.dll
Any ideas what i did wrong?
Thanks in advance,
Jules
Posted: Thu Apr 17, 2008 4:30 pm
by Zenith
It shouldn't be using that DLL. Are you using -nostdlib as a compiler option?
Posted: Fri Apr 18, 2008 2:46 am
by Solar
More importantly, are you really
using the crosscompiler?
From the tutorial:
Usage
Once you are finished, your toolset resides in /usr/cross. For example, you have a gcc executable in /usr/cross/bin/$TARGET-gcc (and /usr/cross/$TARGET/gcc as well), which spits out binaries for your TARGET. Add /usr/cross/bin to your PATH environment variable, so that gcc invokes your system compiler, and $TARGET-gcc invokes your cross-compiler.