As the title suggests I have managed to build llvmdc on Sparc/Linux...but not phobos, as yet. Of course I don't have gdc/rebuild access on Sparc so I will have to build phobos by hand. I will let you know how it goes (there are bound to be some serious issues...but who knows).

I can see output from the 'llvmdc -vv' argument that seems mostly ok. There may be some alignment issues due to the fact that I just used the PPC32 data-layout Sparc for llvm only supports 32-bit at this point, I believe, so I will shoot for that. I will change the data-layout to something more sane soon.

Just thought I would let you know. It only took about 4-5 changes to get this done.

Of course not having gdc on Sparc (or dmd) is a show stopper, unless I want to convert phobos to c++ or something. I heard that gdc had a sparc version available at version 0.17...maybe I can find that.

Oh well, it was interesting to see that there aren't that many changes needed later for Sparc-llvmdc....if one can get phobos built!

Seems like it worked OK since I managed to build test/a.d into an assembly file and a bitcode file. There is still a small error with llvm's output for saving registers in the assembly file on sparc that I had to change by hand (this is an old bug that I patched in llvm but it checks for gcc vs. native cc, if I remember correctly...I will modify it again for llvmdc).

The .bc file runs!!!! Haha, cool. (There is still some kind of error with the size of unsigned ints that stops other examples from running. I still have to change the data-layout I think).

The assembled 'a.out' file doesn't run though?!? Darnit. Bash says it 'cannot execute binary file' so there must be something wrong with the output. The a.s file LOOKS reasonable, though.

Ah well, I will look into it some more.

Thanks,
K.Wilson

P.S. I will probably need to write a script to automate the building of phobos...I will get it to you if/when I have one.

It looks like the problem with the 'a.out' file comes from the assembler, because converting to C first and then using 'gcc file.c' actually works on Sparc!!!

So there is basically a small incomplete D compiler for Sparc sitting here (as complete as llvmdc is once I get the data-layout correct, anyways). I haven't tried any other files in the test suite since I have to fix the data-layout first but this is still news, I think.