Cross compiler not recognizing freestanding library
Posted: Mon Jul 23, 2012 7:38 pm
Hey all,
This is my first shot at OS dev, so hopefully this questing hasn't been answered a thousand times before (I searched and was unable to find anything, both in the forums and on Google) even though I'm sure it's a relatively quick fix.
I'm trying to follow the first bare bones tutorial just to get a simple kernel up an running to use as a starting point as I try to learn more about OS development and what I'll need to do to build my own OS. I'm having a problem compiling the actual kernal.c file using the "naked" cross compiler that I built follow the instructions from the GCC Cross-Compiler wiki page. The command I'm attempting to run is right off of the bare bones wiki page:
And the error message I'm receiving is as follows:
From the research I was able to do, I think that the problem is in my cross compiler, but I can't figure out where. I built it using GCC 4.7.1 and binutils 2.22 which should work together according to the chart on the wiki, and I really don't have the experience necessary to solve this (probably trivial) problem at this point. Does anyone have any insight into this (and perhaps good methods as to how I should go about solving issues like this in the future - it's not really like debugging code )
Thanks.
This is my first shot at OS dev, so hopefully this questing hasn't been answered a thousand times before (I searched and was unable to find anything, both in the forums and on Google) even though I'm sure it's a relatively quick fix.
I'm trying to follow the first bare bones tutorial just to get a simple kernel up an running to use as a starting point as I try to learn more about OS development and what I'll need to do to build my own OS. I'm having a problem compiling the actual kernal.c file using the "naked" cross compiler that I built follow the instructions from the GCC Cross-Compiler wiki page. The command I'm attempting to run is right off of the bare bones wiki page:
Code: Select all
i586-elf-gcc -o kernel.o -c kernel.c -Wall -Wextra -Werror
-nostdlib -fno-builtin -nostartfiles -nodefaultlibs
Code: Select all
Jordan@Jordan-PC ~/Kernel
$ $TARGET-gcc -o kernel.o -c kernel.c -Wall -Wextra -Werror -nostdlib -fno-builtin -nostartfiles -nodefaultlibs
In file included from kernel.c:1:0:
/usr/local/cross/lib/gcc/i586-elf/4.7.1/include/stdint.h:3:26: fatal error: stdint.h: No such file or directory
compilation terminated.
Thanks.