[Cbe-oss-dev] ps3 cflags/cxxflags
Arnd Bergmann
arnd at arndb.de
Tue Jul 14 03:36:05 EST 2009
On Sunday 05 July 2009, John Frankish wrote:
> I'm not sure if I asked this question before, but is there any consensus on what would be the "correct" cflags/cxxflags to use when compiling for ps3, eg:
>
> CFLAGS= "-O2 -pipe -mcpu=cell -mtune=cell -maltivec -mabi=altivec"
> CXXFLAGS= $CFLAGS
Not sure, but IIRC -mcpu=cell implies all of '-mtune=cell -maltivec
-mabi=altivec'. At least it implies -mtune=cell.
> In addition, does it make sense to use the following when exporting kernel headers:
>
> make ARCH=cell headers_check
>
> I'm still a little confused as to why "uname -a" can bring up several
> variations on powerpc64, ppc64, cell, etc - guess it depends on the
> distro (eg ydl) or how clfs was compiled, but it's still not totally
> obvious for me.
uname -r should return either ppc or ppc64, depending on the currently
active personality (man setarch).
For the kernel headers, the architecture is 'powerpc', so you should
use (when building a cross-glibc):
make ARCH=powerpc headers_install
On a native machine, you don't need to pass ARCH= to the kernel,
and you never need to export the kernel headers unless you are
compiling your own glibc.
Arnd <><
More information about the cbe-oss-dev
mailing list