[LLVMdev] Compiling LLVM on SPARC

Stephen Kou stephen at hyarros.com
Sat Apr 17 04:45:39 PDT 2010

Hello all,

I've been trying to compile LLVM and LLVM-GCC on the SPARC architecture, 
but I've been running into lots of issues:

LLVM 2.5 works, but 2.6 does not -- gcc can't even parse the triple.h 
file needed in commandline.cpp.  For 2.5, there's a compile error for 
llvm-gcc for that version.  I've been compiling with gcc 4.5.0, and have 
also tried 4.4.3.

I've turned to trying to build the trunk version to see if I get better 
results.  I do get further (since LLVM itself won't even compile on 2.5 
-- it compiles fine on trunk).  LLVM-GCC also compiles farther than any 
previous version for trunk.  However, eventually, I encounter the 
following assertion failure in llvm:

Assertion failed: Offset >= 0, file 
line 387
../../../../libstdc++-v3/libsupc++/unwind-cxx.h: In function 
../../../../libstdc++-v3/libsupc++/unwind-cxx.h:171: internal compiler 
error: Abort

I checked, and the "Offset" variable at this point in the source file 
(InstructionCombining.cpp:387), is -23.  The offending assert looks like 
the following:

     // Handle hosts where % returns negative instead of values 
     if (Offset < 0) {
       Offset += TySize;
       fprintf(stderr, "ERROR: %d", Offset); // << endl;
       assert(Offset >= 0);

Is anyone able to help me, or have been able to successfully compile 
LLVM + LLVM-GCC on the SPARC platform?  If so, what version of the 
toolchain did you use?

Thank you for the help,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100417/b5e52b61/attachment.html>

More information about the llvm-dev mailing list