| View previous topic :: View next topic |
| Author |
Message |
cdifan CD-i Emulator Author

Joined: 24 Jun 2005 Posts: 843 Location: The Netherlands
|
Posted: Thu Oct 28, 2010 12:01 am Post subject: GCC cross-compiler to OS-9 |
|
|
Today I came accross the following link:
ftp://os9archive.rtsi.com/OS9/OSK/GCC/SRC/gcc-sun4-os9-2.6.2.src.tar.gz
This seems to be exactly what the name suggests: a sun4-hosted gcc that compiles to OS-9. It is a full gnu toolchain using gas and ld and even includes support for the Microware ROFF object file format.
Now the big question, of course: how hard is it to compile this as a PC-hosted cross compiler?
I have Cygwin on my PC so it should have been a matter of doing
| Quote: | | ./configure --host=i486-cygwin --target=m68k-os9 |
Unfortunately this configure does not support cygwin, substituting msdos fails with file permission errors on a number of files having weird 8.3 names so is probably not recommended (this may be due to Win7, though).
Anybody have some clues? I cannot find any of the os9 support files in never gcc versions, so this port was probably never folded back into the main gcc trunk.
I could trying the "host" configuration of a stock gcc 2.x (which should build under cygwin) over into this gcc? |
|
| Back to top |
|
 |
cdifan CD-i Emulator Author

Joined: 24 Jun 2005 Posts: 843 Location: The Netherlands
|
Posted: Sat Aug 06, 2011 11:38 pm Post subject: |
|
|
Took another look at this and I found some useful information.
The original port is from Walter Hunt (walter@mailhost.aimla.com).
| Walter Hunt wrote: | As a hack project, I ported GCC/GAS/binutils/etc. as a cross-compiler
from Sun/Linux/DOS to OS-9. Unfortunately, efforts to complete the necessary
paperwork to get this work donated to the FSF drowned somewhere in beaurocracy.
|
The original announcement with more details can be found here: http://www.dr-bischoff.de/os9cross/hunt.html with some more info to be found at http://www.dr-bischoff.de/os9cross_e.html (I don't know how accurate this is). |
|
| Back to top |
|
 |
cdifan CD-i Emulator Author

Joined: 24 Jun 2005 Posts: 843 Location: The Netherlands
|
Posted: Tue Aug 09, 2011 12:52 am Post subject: |
|
|
Some more progress to report...
I have this now building cleanly on a Cygwin 1.5 installation, and it seems to generate valid OS9 modules for a few simple testcases. Mostly build config stuff, but I have also fixed a few small bugs. I had to mix/match the Cygwin host config from 2.95 to get configure to recognize cygwin instead of the obsolete go32, and then some compile error fixes.
The end result is a set of working xgcc / xas / xld / x... binaries in /usr/local/bin, with support files in /usr/local/lib/gcc-lib. It needs the OS9 header and library files in /usr/local/os9/include and lib, slightly tweaked (include files converted to unix format to avoid cpp warnings and lib files xranlib'd so that xld can find symbols).
E.g. xgcc -o cdi_test test.c -lcdi -g produces working cdi_test and cdi_test.stb and cdi_test.dbg modules (I think, haven't tested extensively yet).
This is the original gcc 2.6.2 release from Walter Hunt; I am currently working on upgrading to gcc 2.7.2-3 (it patches cleanly but has new gcc compile errors which undoubtedly need more build config tweaking). |
|
| Back to top |
|
 |
cdifan CD-i Emulator Author

Joined: 24 Jun 2005 Posts: 843 Location: The Netherlands
|
Posted: Tue Aug 09, 2011 1:18 am Post subject: |
|
|
Question for homebrew developers: should I keep the xgcc name or should it be os9gcc? Not that it really matters much, it's just the driver (typically handled with a single CC = xgcc line in your Makefile).
Note that the Microware cross-compiler is called xcc (it's assembler is r68, the linker is l68). |
|
| Back to top |
|
 |
cdoty Frog Feast Dev

Joined: 03 Jul 2005 Posts: 125 Location: Houston, TX
|
Posted: Fri Oct 28, 2011 8:41 am Post subject: |
|
|
| cdifan wrote: | Question for homebrew developers: should I keep the xgcc name or should it be os9gcc? Not that it really matters much, it's just the driver (typically handled with a single CC = xgcc line in your Makefile).
Note that the Microware cross-compiler is called xcc (it's assembler is r68, the linker is l68). |
Either would work. I usually put them in a separate directory, and include them in the path, every cross compiler I have is named gcc, ld, and as.
Do you intend to upload this somewhere? Gcc 2.7.2 worked pretty well, that's what I've used for Frog Feast on most 68000 based systems. _________________ Visit RasterSoft on facebook or visit the website. |
|
| Back to top |
|
 |
cdifan CD-i Emulator Author

Joined: 24 Jun 2005 Posts: 843 Location: The Netherlands
|
Posted: Fri Oct 28, 2011 6:58 pm Post subject: |
|
|
| cdoty wrote: | | Do you intend to upload this somewhere? Gcc 2.7.2 worked pretty well, that's what I've used for Frog Feast on most 68000 based systems. |
Once I've done some testing and possibly some more modifications I will upload it somewhere. I have been busy with other things recently... |
|
| Back to top |
|
 |
cdoty Frog Feast Dev

Joined: 03 Jul 2005 Posts: 125 Location: Houston, TX
|
Posted: Sat Oct 29, 2011 4:42 am Post subject: |
|
|
| cdoty wrote: | | Do you intend to upload this somewhere? Gcc 2.7.2 worked pretty well, that's what I've used for Frog Feast on most 68000 based systems. |
Actually I was using 2.95.2. The Jaguar tools were 2.6.3, which did present some problems, if I remember correctly. _________________ Visit RasterSoft on facebook or visit the website. |
|
| Back to top |
|
 |
cdifan CD-i Emulator Author

Joined: 24 Jun 2005 Posts: 843 Location: The Netherlands
|
Posted: Sat Oct 29, 2011 12:19 pm Post subject: |
|
|
| I've written tons of C++ code for CD-i using gcc 2.5.8 (different port). No big problems that I'm aware of. |
|
| Back to top |
|
 |
|