[CMake] CMake on Linux + Playstation 3 (IBM Cell BE processor)

Alexander Neundorf a.neundorf-work at gmx.net
Wed Jan 2 10:23:17 EST 2008


On Wednesday 02 January 2008, Christian Convey wrote:
> On Jan 2, 2008 9:15 AM, Alexander Neundorf <a.neundorf-work at gmx.net> wrote:
> > On Monday 31 December 2007, Brandon Van Every wrote:
> > > On Dec 30, 2007 3:19 PM, Christian Convey <christian.convey at gmail.com>
> >
> > wrote:
> > > > A Cell processor has one PowerPC core, plus 8 "SPE" cores (only 6 are
> > > > available on a Playstation 3).  You need a different compiler for
> > > > each core type.
> > > >
> > > > Also, there are several different ways that all of that can be linked
> > > > together into a single program.
> > > >
> > > > I probably can coax Cmake into handling this, so I may have misspoken
> > > > when I asked about making CMake *capable* of building these programs.
> > > > I probably should have asked about making it support, out of the box,
> > > > the building of such programs using trivially simple CMakeLists.txt
> > > > files.
> > >
> > > I would assume that Linux tool ports just use the PowerPC core.
> > > Getting the 8 SPE cores to be utilized is quite an extension of scope
> > > and rather application specific.  I would say you should handle those
> > > with ADD_CUSTOM_COMMAND,
> >
> > Yes.
> > The SPE cores are also programmed in C, aren't they ?
>
> GCC supports SPE code generation, presumably as just another back-end.
>  So I imagine that any language in the GCC suite works for SPEs.  That
> being said, all of the nice Cell SDK programming libraries are written
> with C interfaces, and I don't think you'll get very far without these
> libraries.
>
> > Do you have an example (simple) Makefile which demonstrates how to build
> > software for these cores ?
>
> Yeah, but the slightly goofy thing is that the Cell SDK provides some
> additional content that they have you include into your Makefiles.
> It's meant to be convenient, but really it just provides the kind of
> thing that CMake does better:  Letting you have a short Makefile,
> where some other Make-related code figures out the right compiler and
> linkers to use (and the associated command-line options) in order to
> achieve certain common, high-level tasks.

Ok. So you have one build tree, and everything's built in this tree, both for 
the PPC and for the SPEs, and you run make once and get everything ?
Is this the typical setup or do you typically have a "project" for the PPC 
stuff and a separate project/separate developers for the SPE stuff ?

This is indeed cross compiling, or at least building software with one 
language for different CPUs.
Is it actually possible to create executables for the SPEs (if yes, can you 
just run them from the shell ?) or do you create some kind of modules/libs 
which are then uploaded to the SPEs by the PPC ?

Alex


More information about the CMake mailing list