[clean-list] Fwd: Building Clean 2.2 on PS3

Michael Hogan mikehogan62 at gmail.com
Sat Apr 19 22:01:11 MEST 2008


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 *
initialize_toc* function, but that seemed to be the only real hack.

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.


If anyone is interested, I made the following changes to code in the
Sources\CodeGenerator folder:

*in makefile:*
CFLAGS = -DPS3_YDL -DINT_64 -DLONG_64 -DG_POWER -DGNU_C -DLINUX -DLINUX_ELF
-O

*In cgiconst.h:*
#ifdef PS3_YDL
   #define PRId64    "lld"
   #define PRIi64    "lli"
   #define PRIu64    "llu"
#endif

#if !defined (G_POWER) || defined (PS3_YDL)
    ,IFSQRT
#endi

f#if defined (I486) || defined (PS3_YDL)
    ,IASR_S,ILSL_S,ILSR_S
#endif

#if defined (I486) || defined (PS3_YDL)
    ,IADC ,IRTSI, IDIVI, IREMI, IREMU, IMULUD, IDIVDU, ISBB
#endif

#if defined (G_AI64) || defined (PS3_YDL)
    ,IMOVESW
#endif

#if defined (M68000) || defined (I486) || defined (PS3_YDL)
    ,P_POST_INCREMENT,    P_PRE_DECREMENT
#endif

*in cgtypes.h:*
#ifdef PS3_YDL
   #define int_64 long long int
   #define uint_64 unsigned long long int
#endif

*in cg.c:*
#ifdef G_POWER
#include "cgptoc.h"
#endif
*#if defined (PS3_YDL)
   void initialize_toc (void){/* TODO: eliminate initialize_toc stub for PS3
*/}
#endif*

---------- Forwarded message ----------
From: Michael Hogan <mikehogan62 at gmail.com>
Date: Thu, Apr 17, 2008 at 7:23 AM
Subject: Building Clean 2.2 on PS3
To: clean-list at science.ru.nl


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.

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.

Thanks,
mh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.science.ru.nl/pipermail/clean-list/attachments/20080419/3b61ead5/attachment.html


More information about the clean-list mailing list