Created attachment 302699 [details, diff] PPC conflict compile fix While trying to compile clang-3.0 on ppc (not keyworded as far as I know), I am bumping into some problems. The first is a series of definition/naming conflicts that look like: In file included from ELFObjectWriter.cpp:33:0: ../Target/PowerPC/MCTargetDesc/PPCFixupKinds.h:16:11: error: expected identifier before numeric constant ../Target/PowerPC/MCTargetDesc/PPCFixupKinds.h:16:11: error: expected unqualified-id before numeric constant ELFObjectWriter.cpp:1832:1: error: expected '}' at end of input I solved them using a similar approach done elsewhere in the source by just undef-ing PPC. Unfortunately, linking the libLLVM.so fails, so this is part one.
Seems this is a known issue: http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-October/044827.html "Note: You still need to add -UPPC on configure or make." Probably, because the code I patched is generated. :(
I thought this code would not be compiled with the "clang-only" target, but apparently it is still needed! For llvm this was bug #394183 I'll copy the patch to clang-3.0 tonight
Please, no, it's not. I'm sorry. I did a full rebuild now with # 405147 [[ ${CHOST} == powerpc*-linux* ]] && append-flags -UPPC added to src_prepare (and inherit flag-o-matic) And with that it just compiled and installed here! macbeth clang # clang --version clang version 3.0 (tags/RELEASE_30/final) Target: powerpc-unknown-linux-gnu Thread model: posix
(In reply to comment #2) > I thought this code would not be compiled with the "clang-only" target, but > apparently it is still needed! For llvm this was bug #394183 > > I'll copy the patch to clang-3.0 tonight You are right, that's necessary to fix the compilation. The resulting compiler is quite useless though. It panics on not that complex code immediately. I guess it's just not worth looking into fixing it. Sorry to waste your time!