Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Hi again
I followed the tutorial on building the GCC cross compiler and the OS specific toolchain. But when I try to build binutils, make gives me an error:
which I added exactly, with the hange of myos to the name of my os, right?
The configure scipt ran with no errors. I am trying to build from binutils 2.25 and gcc 4.9.2, on a 64bit Fedora Linux host.
Any idea about how to solve this? I pulled my hair out trying to figure what the problem is.
many thanx
I haven't updated that tutorial since the release of binutils 2.24. I had trouble with binutils 2.25 when I tried rebasing my local changes on it, but I go further than the OS Specific Toolchain does. Can you see if binutils 2.24 works for you?
Any help updating it to also handle binutils 2.25 or confirmation that the current instructions do work for 2.25 - that would be much appreciated. It's hard to say if the OP made a mistake or if the tutorial is faulty.
(Btw - congratulations on coming so far that you want a OS specific toolchain!)
Hi sortie
I got myself a working kernel with a shell including basic commands, command history, ... But I know I can't go forever adding more functionality by gluing modules to the kernel!! at some point I have to be able to load executables and execute them. I have a working module that reads FAT systems and a *virtually* working ELF loader (not tested yet), so I need to compile my C programs to my OS in order to use them.
I downloaded binutils 2.24 and it compiled well. But gcc is not compiling. Make tells it can't find stdio.h although it is there in the /usr/include in my sysroot!
See http://wiki.osdev.org/Hosted_GCC_Cross-Compiler if you haven't on instructions on how to build a cross-compiler for a hobby system with a minial user-space libc. This is how you're supposed to build your OS specific toolchain. I think your problem is that you haven't installed the standard library headers before building gcc.
Edit: Oh wait, you say it's there. Can you post the exact commands you used (with environment variables expanded) to build the cross-compiler? I suspect it isn't locating your system root properly or is searching the wrong directory, or you somehow configured it wrong.
Yes sir, I finally got it working!
For some odd reason, gcc was not detecting my sysroot although I checked that I supplied it correctly to gcc. Anyhow I removed all the building & source dirs, re-unpacked the sources, configured and built it nicely.
Thanx for ur help & support man, appreciate it.