PPC Support

I have been following clangs development for a few months now specifically tracking powerpc progress and running the clang test suite every so often. Right now as I see the clang tests are x86 specific in a few areas so I’m not really sure what the policy of testing will be as clang adds more support for other platforms. But right now a powerpc complied clang fails 4 tests.

For CodeGen powerpc fails on

darwin-string-literals.c
I have already filed a bug for this ( PR4171 )

2009-05-22-callingconv.c
This test contain x86 specific code. This test passes on powerpc if I set the target triple to i386-unknown-unknown

libcalls.c
This test fails because long double is not supported on powerpc however I believe clang is still doing the correct thing. The test is looking for 6 function declarations. On powerpc all the long double calls get reduced to just double so it only needs to produce 4 function declarations. This test again passes if the target triple is set to i386-unknown-unknown

For Driver powerpc fails on

analyze.c
The test expects “-mmacosx-version-min=10.5” however the test produces “-mmacosx-version-min=10.5.0” but this is just a minor typo.

So in summary the only test that I see that powerpc genuinely fails at is darwin-string-literals.c

Right now I know the clang driver is setup to use gcc instead of clang-cc by default on powerpc. At the time this was added there was a bug with the -arch option that was causing clang to crash on powerpc. That has since been resolved. On my local copy I modified to use clang-cc by default. In my limited testing I haven’t run across any problems yet. Clang was able to successfully compile the cfitsio library ( http://heasarc.gsfc.nasa.gov/fitsio/ ) and the resulting library will correctly read fits files. I can also compile and run simple Cocoa applications. These codes aren’t using any exotic features however but so far so good.

Mark

I have been following clangs development for a few months now specifically
tracking powerpc progress and running the clang test suite every so often.
Right now as I see the clang tests are x86 specific in a few areas so I'm
not really sure what the policy of testing will be as clang adds more
support for other platforms. But right now a powerpc complied clang fails 4
tests.

Try updating to tip? I just fixed the CodeGen tests, and I think the
issue with the Driver test wasn't a PPC-specific issue.

Right now I know the clang driver is setup to use gcc instead of clang-cc by
default on powerpc. At the time this was added there was a bug with the
-arch option that was causing clang to crash on powerpc. That has since been
resolved. On my local copy I modified to use clang-cc by default. In my
limited testing I haven't run across any problems yet. Clang was able to
successfully compile the cfitsio library (
FITSIO Home Page ) and the resulting library will
correctly read fits files. I can also compile and run simple Cocoa
applications. These codes aren't using any exotic features however but so
far so good.

Good to hear. There's still one significant part of the PowerPC
support that's missing in clang (specifically, the ABI
implementation), but I guess the actual PPC Darwin ABI is close enough
to the default implementation that it mostly works without any tweaks.

-Eli