Can I use x-86 front end to generate .bc file for another architecture

Hi.

I successfully build llvm backend2.3 for sparc/solaris, but failed to build LLVM front end of Sparc/Solaris.

I’m wondering if there is any option I can use with X-86 version of llvm-gcc front end to generate .bc file for sparc backend. Suppose I have the include files.

Thanks.

Sure you can, but the code won’t work in general. See the other thread about arch portability and also:
http://llvm.org/docs/tutorial/LangImpl8.html#targetindep

-Chris

What’s the option of llvm-gcc to use then?

Is it just to specify –I or –B like gcc does?