There's something weird happening here. I open the console, go to /usr/local/dc/sh-elf/bin, and when I enter "sh-elf-gcc --version" or just "sh-elf-gcc" I get a message saying that it doesn't exist.
That's an easy one - Linux is not DOS.
In DOS, when you type the name of a command, the command interpreter checks if you've given it a full path (like C:\Stuff\OtherStuff\File.exe), and if you have it tries to run that. If it's not a full path, it will first search in the current directory, and then search all the directories in the PATH environment variable until it finds a match. It does this mostly because DOS was originally intended to run off floppy disks, so the path was mostly meaningless...
In Linux (and other Unix-like systems), when you type the name of a command, the shell checks if you've given it a full path (like /usr/local/dc/sh-elf/bin/sh-elf-gcc) and if you have it tries to run that. If it's not a full path, it searches all the directories in the PATH environment variable until it finds a match.
Notice the difference - Linux shells do not
run programs from the current directory. That's mostly a security measure, to prevent a user from accidentally running a program that's in the current directory. For example, you could put a fake version of the "ls" command in your home directory, and as soon as someone tries to list the contents of your home drive (most likely the root user, since nobody else can even get into your home directory), your program could do massive damage. Like wipe out the entire system.
So, if you want to run a program from inside the current directory, do this:
The ./ tells the shell that the program is in the current directory. Alternatively, just give the whole path to the program.
My problem is, I got stuck in a line containing a reference to "/usr/local/dc/bin", because I don't have this directory; I only have /usr/local/dc/arm-elf and /usr/local/dc/sh-elf. Will this dir be created when I compile KOS, or should I do something else before?
What kind of line is it? If it's something like:
then you should change it to something like this:
Code: Select all
For almost anything else (like KOS_CC_BASE, or something), they you need to change it to either sh-elf/bin or arm-elf/bin, depending on which compiler it's referencing.