On 02/02/2011 19:53, Lally Singh wrote:> 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. >I think llvm isn't ported to Solaris i386/x86_64 yet. Particularly, clang there prints the same data layout string as on linux assuming ABI is the same when it isn't. So using your approach certain calls to the externally compiled libraries will cause failures. Some simpler examples may work fine. Yuri
Well, then I'm royally screwed. What would I have to add to make it work, if only for a very limited subset of cases? On Wed, Feb 2, 2011 at 11:44 PM, Yuri <yuri at rawbw.com> wrote:> On 02/02/2011 19:53, Lally Singh wrote: >> >> 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. >> > > I think llvm isn't ported to Solaris i386/x86_64 yet. Particularly, clang > there prints the same data layout string as on linux assuming ABI is the > same when it isn't. So using your approach certain calls to the externally > compiled libraries will cause failures. Some simpler examples may work fine. > > Yuri >
Lally Singh <lally.singh at gmail.com> writes:>> I think llvm isn't ported to Solaris i386/x86_64 yet. Particularly, clang >> there prints the same data layout string as on linux assuming ABI is the >> same when it isn't. So using your approach certain calls to the externally >> compiled libraries will cause failures. Some simpler examples may work fine. >> > Well, then I'm royally screwed. > > What would I have to add to make it work, if only for a very limited > subset of cases?Fixing the data layout is simple: 1. Read the LLVM Laguage Reference to learn how to format the data layout string. 2. Look up what's the actual data layout for your platform. 3. Implement the string in lib/Target/X86/X86TargetMachine.cpp The last step may require implementing some handling for the triplet of your platform, but if you are on a hurry and don't plan to contribute your changes to LLVM nor to generate code for other platforms an #ifdef will do.