[LLVMdev] llvm-gcc (pre-release and svn sources) fails to compile on Solaris10/SPARC

Kshitij Sudan kshitij at cs.utah.edu
Tue Feb 24 14:16:26 PST 2009


On Tue, Feb 24, 2009 at 1:09 AM, Anton Korobeynikov
<anton at korobeynikov.info> wrote:
>> Since then I am trying to build llvm-gcc and it fails all the time. I
>> tried building llvm-gcc from svn and 2.5 pre-release. I also tried
>> building llvm-2.5 pre-release and that succeeds but llvm-gcc-4.2-2.5
>> pre-release fails again. I have listed below my machine config and the
>> errors reported by make in each case.
> afair solaris always had a special gcc build procedure. I can confirm,
> however, that sometime between 2.4 and 2.5 I built cross llvm-gcc for
> sparc-elf (with newlib) and at least it was bult successfully. In any
> case, result of codegen is not fully ABI-compliant.
>
hmm ... that's disheartening to hear. I intend to use the code
generated by LLVM to run on a full system simulator, so now I don't
know how that will pan-out. I don't want to loose out on LLVM's
strengths in static analysis just because I'm tied to a particular
ISA! Let's see how it goes ....

>> ../../llvm-gcc-4.2/gcc/llvm-convert.cpp:4387: error:
>> 'getIntrinsicForGCCBuiltin' is not a member of 'llvm::Intrinsic'
> That's something strange. Are you sure you didn't mixed sources from
> release and some older / newer version? What is gcc version on your box?
>
I compiled gcc from sources and here's the config>>

Using built-in specs. Target: sparc-sun-solaris2.10 Configured with:
../gcc-4.3.2/configure --prefix=/usr/local/gcc-4.3.2
--with-gmp=/usr/local --with-mpfr=/usr/local Thread model: posix gcc
version 4.3.2 (GCC)

and I'm pretty sure I did not mix any sources.

also, are there any instructions you have about cross compiling
llvm-gcc? I plan to use an x86_64-linux box as host and a
sparc-solaris10 box as target (I can get all the platform specific
headers and libs fro my host target easily). also, since I want to
compile llvm-gcc front-end, would I need to compile binutils etc. for
my target? where there any specific issues that you faced? how did you
test your front-end?

My other option is to compile llvm and llvm-gcc on a sparc-linux box
(I currently have a sparc64-linux box, but LLVM doesn't support that
target). Have you heard of any success story for llvm-gcc on
sparc-linux? I am a bit hesitant on that coz the llvm docs page does
not mention if this config has been tested.

-Kshitij



More information about the llvm-dev mailing list