[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 
/space/home/skou/llvm-trunk/lib/Transforms/InstCombine/InstructionCombining.cpp, 
line 387
../../../../libstdc++-v3/libsupc++/unwind-cxx.h: In function 
'__cxxabiv1::__cxa_exception* 
__cxxabiv1::__get_exception_header_from_ue(_Unwind_Exception*)':
../../../../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 
[0..TySize).
     if (Offset < 0) {
       --FirstIdx;
       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,
stephen
-------------- 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