[LLVMdev] LLVM builds on x86-64 Solaris

Kelly Wilson wilsonkk at shaw.ca
Tue Nov 20 02:04:16 PST 2007


Hello all,

Well, I managed to get llvm-gcc to build on OpenSolaris/GNU as a
cross-compiler. It was somewhat of a pain since the config files were
mixed up for i386-pc-solaris. I had to manually change some things after
configuration again (this manual changing of stuff is happening because
I don't understand the autoconf/automake toolchain well enough, I
guess).

llvm-gcc produces acceptable binaries that can be linked with the gcc ld
or the native ld. There is an old bug with gcc cross-compilers on
solaris so llvm-gcc doesn't find the native ld automatically, and
it's .o files in /usr/ccs. I had to manually link things with gcc or
native ld. I will see if I can patch things to get a full build of this.

Thanks,
K.Wilson


On Mon, 2007-11-19 at 13:31 -0700, Kelly Wilson wrote:
> Hey everyone,
> 
> Not sure if anyone had tried this but I managed to get LLVM and clang to
> build on Nexenta Alpha 7. This is an OpenSolaris/GNU OS.
> 
> There wasn't much to change for LLVM, except "#undef"ing a lot of x86
> register name equivalents and the like (ie. EAX,ESP,CS,FS...). 
> 
> There were a couple of similar undef's needed for clang, as well. The
> clang testsuite ran fine except for mandel.c again?!? Same file that
> wouldn't build on Sparc/Linux, but a different error. I will look at it.
> 
> I will try to get llvm-gcc to build but there will probably be some
> major issues there ;) We'll see.
> 
> Thanks,
> K.Wilson
> 
> P.S. Is there an easier way to do this. Like undef'ing everything once
> in some higher level #include?? I had to manually change about 50 files
> and I couldn't find where OpenSolaris was #defining these things! Or are
> they #defined in gcc somewhere on Solaris?
> 
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list