If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
I just downloaded and setup everything to compile KOS (with help from getYourOwnCheese). everything seemed to be going ok, there were a few things that I had to fix but overall it looked good. I typed in "make" and waited. Suddently my screen was filled with things like this
/usr/libexec/gcc/darwin/ppc/as: I don't understand 'e' flag!
assert.c:2:Unknown pseudo-op: .little
assert.c:3:Missing string
assert.c:3:Rest of line ignored. 1st junk character valued 49 (1).
assert.c:4:Expected comma after segment-name
assert.c:4:Rest of line ignored. 1st junk character valued 46 (.).
assert.c:5:Expected comma after segment-name
assert.c:5:Rest of line ignored. 1st junk character valued 46 (.).
assert.c:6:Expected comma after segment-name
assert.c:6:Rest of line ignored. 1st junk character valued 46 (.).
assert.c:7:Expected comma after segment-name
that's not even a fraction of what showed up.
I was wondering if anyone could help; or even just tell me what's going on?
What's happening, clearly is that the wrong assembler is being called. You'll notice that the program generating the errors is /usr/libexec/gcc/darwin/ppc/as. So, the Darwin/PowerPC assembler is being called. This shouldn't happen because you shouldn't be assembling code for your computer (which has a PowerPC processor), you should be assembling code for the Dreamcast (which has an SH-4 processor). Assuming that you have the Dreamcast (SH-4) version of binutils built and installed already, you need to tweak your settings to make sure that that is the one which is getting used. I'm not sure what needs to be changed in particular off the top of my head, but perhaps you can find it or maybe someone else knows.
You need to edit the environ.sh script to reflect yr setup, then run it before running make. It's pretty straightforward, but these two lines in particular seem to be causing yr problem:
This -
export KOS_AS="${KOS_CC_BASE}/bin/${KOS_CC_PREFIX}-as"
i.e. "/usr/local/dcdev/bin/sh-elf-as" is what should be being called, not "/usr/libexec/gcc/darwin/ppc/as"... Hmmm...
Oh!! <slaps forehead> of course! I think I know what must be happening. When you run the environ.sh script, are you just running it? i.e.,
./environ.sh
or an equiv? You need to type "source environ.sh" instead, otherwise the variables don't stick. Hopefully that's what's going on.
Hrm... I'm not having many ideas. Try echoing the vars, just to make sure they're set right?
i.e., echo $KOS and then hit tab, which should auto-complete & show you a list of all KOS's environment vars... Still pretty sure KOS_CC_BASE and KOS_CC_PREFIX aren't getting set, according to the error msg shown. Make sure they show up as "/usr/local/dcdev" and "sh-elf".
Hrm.. If those are set correctly, I'm not sure what could be happening. Anything else you did, any other information displayed by make you think might be useful? Like where in the process you first get the errors? Try running it with --print-directory & re-posting the errors.
Wish I knew more. I had lots of throuble getting this set up, but this is exactly where my problem wasn't. KOS (the Subversion one) actually compiled w/absolutely no problems.