I managed to get a "clean" build of the source in the "CodeGenerator" folder. I'm sure that there are plenty of additional hurdles to getting even basic PPC output from the code generator, but I suppose that a clean compile is the first step. I did find it necessary to stub out the <b>initialize_toc</b> function, but that seemed to be the only real hack.<br>
<br>One observation on the source code -- the conditional compile logic interprets -DPOWER as being synonomous with "compiling on a Mac with a PPC", which causes some confusion, and possibly causes some yet-to-be-identified errors in the pre-processing.<br>
<br><br>If anyone is interested, I made the following changes to code in the Sources\CodeGenerator folder:<br><br><u>in makefile:</u><br>CFLAGS = -DPS3_YDL -DINT_64 -DLONG_64 -DG_POWER -DGNU_C -DLINUX -DLINUX_ELF -O<br><br>
<u>In cgiconst.h:</u><br>#ifdef PS3_YDL<br> #define PRId64 "lld"<br> #define PRIi64 "lli"<br> #define PRIu64 "llu"<br>#endif<br><br>#if !defined (G_POWER) || defined (PS3_YDL)<br>
,IFSQRT<br>#endi<br><br>f#if defined (I486) || defined (PS3_YDL) <br> ,IASR_S,ILSL_S,ILSR_S<br>#endif<br><br>#if defined (I486) || defined (PS3_YDL)<br> ,IADC ,IRTSI, IDIVI, IREMI, IREMU, IMULUD, IDIVDU, ISBB<br>
#endif<br><br>#if defined (G_AI64) || defined (PS3_YDL)<br> ,IMOVESW<br>#endif<br><br>#if defined (M68000) || defined (I486) || defined (PS3_YDL)<br> ,P_POST_INCREMENT, P_PRE_DECREMENT<br>#endif<br><br><u>in cgtypes.h:</u><br>
#ifdef PS3_YDL<br> #define int_64 long long int<br> #define uint_64 unsigned long long int<br>#endif <br><br><u>in cg.c:</u><br>#ifdef G_POWER <br>#include "cgptoc.h"<br>#endif<br><b>#if defined (PS3_YDL)<br>
void initialize_toc (void){<i><span style="color: rgb(0, 102, 0);">/* TODO: eliminate initialize_toc stub for PS3 */</span></i>}<br>#endif</b><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>
From: <b class="gmail_sendername">Michael Hogan</b> <<a href="mailto:mikehogan62@gmail.com">mikehogan62@gmail.com</a>><br>Date: Thu, Apr 17, 2008 at 7:23 AM<br>Subject: Building Clean 2.2 on PS3<br>To: <a href="mailto:clean-list@science.ru.nl">clean-list@science.ru.nl</a><br>
<br><br>Are there any general guides to building Clean from source? I am interested in building for Yellow Dog Linux running on a PS3 with the ultimate goal of experimenting with optimizations for the Cell BE.<br><br>At any rate, I have seen the various make files that are included with the source, but it isn't all that apparent (to me) how to adapt them to build on the PS3. Since the Cell is basically an augmented PPC64, I imagine that the build options would be an eclectic mix of the Mac PPC build options and the Linux build options.<br>
<br>Thanks,<br><font color="#888888">mh<br>
</font></div><br>