[cfe-dev] Inconsistency between PowerPC and PPC?
Chris Lattner
clattner at apple.com
Tue Mar 24 09:20:04 PDT 2009
On Mar 23, 2009, at 10:15 AM, Ed Schouten wrote:
> I've noticed the naming of the PowerPC/PPC backend has a lot of
> inconsistency when it comes to naming. To start off with, the
> directory
> of the backend is called PowerPC and the files are prefixed with PPC.
> This is not a major issue in my opinion, but makes my Clang Makefiles
> for the FreeBSD build system a bit more complex than they have to be.
Yes, there is no consistency here. :(
> Anyway, with the C++ frontend, there seems to be some inconsistency
> between clang-driver and which architecture name is supported by
> clang:
>
> $ PATH=/usr/obj/powerpc/usr/src/tmp/usr/bin:$PATH CFLAGS='-###' make
> testcc -### test.c -o test
> clang version 1.0 (http://llvm.org/svn/llvm-project/cfe/trunk )
> "/usr/obj/powerpc/usr/src/tmp/usr/bin/clang" <snip> "-arch" "ppc"
> <snip>
The issue here is that the triple should be "powerpc-foo-bar", but you
can pick the ppc backend with the "-arch ppc" option. I implemented a
simple mapping here:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090323/014465.html
It would be nice for the driver to suck in some of this logic from
clang.cpp at some point.
-Chris
More information about the cfe-dev
mailing list