[LLVMdev] Bitcode not portable from linux to solaris?

Lally Singh lally.singh at gmail.com
Wed Feb 2 19:53:41 PST 2011


To answer my own question.  The problem is that Solaris ships with
very old tools, and llvmc was generating assembler that worked with a
fresh (gcc-4.5) compile & install.  I had them handy, just further
down the path.  Hopefully anyone with the same problem can find this
in the archive.



Thanks everyone.

On Mon, Jan 31, 2011 at 10:56 AM, Lally Singh <lally.singh at gmail.com> wrote:
> Hi all.
>
>  I made some early experiments --- namely a llvm program that
> printf'd "hello world" -- that seemed to indicate that a bitcode file
> I generate on linux would work on my solaris box.  Well, they're
> actually the same machine, an amd opteron sun box with a linux vm
> running.   My generating program doesn't run on solaris, but I was
> hoping to generate bitcode for it from linux.  lli crashes pretty
> quick (although the same use on linux has been debugged pretty well,
> and it's a pretty simple program!).  llvmc -clang complains quite a
> bit about invalid directives (sorry, couldn't get on the machine
> before my commute to work, so this is from memory only).
>
> I read something quite some time ago that perhaps the bitcode wasn't
> portable if the machines had different pointer sizes.  Solaris is
> 64bit (almost exclusively).  I tried generating from both 32 and 64
> bit linux VMs, but perhaps I just didn't configure it properly to
> generate 64-bit code?
>
> I thought it was supposed to be portable?  Am I wrong?  llvm-dis works
> on it fine.  Perhaps a llvm-dis -> llvm-as cycle would do the trick?
>
> I can post the (small) bitcode file and the errors tonight, if that helps.
>
> Any help is really appreciated.  Thanks in advance!
>




More information about the llvm-dev mailing list