Porting GDC?

Chad J gamerChad at _spamIsBad_gmail.com
Sun Apr 22 02:21:37 PDT 2007


Stephen Waits wrote:
> What's involved in getting gdc on a new platform?
> 
> Is there a "C" backend for GCC - such that we could have a GDC which 
> compiles D into C?
> 
> Thanks,
> Steve

Sorry for the late response, I don't have much time to chill on the 
newsgroup these days.

I'd say first get GCC running and producing valid executables on your 
PS3.  Then once you've done that and you are comfortable with the 
config/build process of GCC, then build GCC again with the GDC module 
installed.  It will probably throw errors and complain a lot.  Then the 
fixing/tweaking/pain happens.  Hopefully the PS3 has an OS that is 
similar to Windows, Linux, or MacOS.  Hopefully the PS3 has an OS ;) 
When your compiler compiles and starts working on the library (probably 
gphobos in this case), make sure it is passing version statements for 
the platform most similar to what you are working with (ex: Windows if 
the target OS is similar to Windows).  You will probably need to alter 
the make and configure files in the D add-on.  I can't help you much 
further than that because the porting I did with arm-wince-pe and the 
PS3 porting are probably quite different in the details.

A couple points I'd like to mention:
- If you can run GCC on the PS3, it makes things nicer.  I had to build 
a cross-compiler (as opposed to a normal compiler) for arm-wince-pe, 
which was time consuming.
- If GCC already targets the PS3, or some variant(s) does, and the build 
process is simple, life is easier.  I had some reference work to help me 
with arm-wince-pe, but no shrink wrapped build process; I had to figure 
that out, which was time consuming.

Good luck with your PS3 porting endeavor!
I would really like to see this happen.  Maybe I will write a game for 
PS3 in D someday :)


More information about the D.gnu mailing list