I am trying to build llvm on freebsd-8.0 on sparc64 CPU. I patched sources because 'sparc' enum value in include/llvm/ADT/Triple.h conflicts with gcc typedef 'sparc'. This allowed llvm itself to build successfully. But there is an error during gcc frontend compile: Did not get a target machine! Triplet is sparc64-unknown-freebsd8.0 I think this is because in many places, like in Triple.cpp, architecture is named sparc, and not sparc64. So should all "sparc" strings related to cpu be renamed to "sparc64", or "sparc" refers to the very early 32-bit sparcs? Or 64-bit sparc is refered as "sparc" in llvm? Yuri
We typically handle this by adding a "#undef sparc" in various places. For example see include/llvm/ADT/Triple.h which already has it. You'll probably need to add it to another header somewhere. -Chris On Apr 26, 2010, at 10:59 AM, Yuri wrote:> I am trying to build llvm on freebsd-8.0 on sparc64 CPU. > I patched sources because 'sparc' enum value in > include/llvm/ADT/Triple.h conflicts with gcc typedef 'sparc'. > This allowed llvm itself to build successfully. > > But there is an error during gcc frontend compile: > Did not get a target machine! Triplet is sparc64-unknown-freebsd8.0 > I think this is because in many places, like in Triple.cpp, architecture > is named sparc, and not sparc64. > > So should all "sparc" strings related to cpu be renamed to "sparc64", or > "sparc" refers to the very early 32-bit sparcs? > Or 64-bit sparc is refered as "sparc" in llvm? > > Yuri > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Chris Lattner wrote:> We typically handle this by adding a "#undef sparc" in various places. For example see include/llvm/ADT/Triple.h which already has it. You'll probably need to add it to another header somewhere. > > -Chris >I can't find any 'undef' lines in include/llvm/ADT/Triple.h though. So I guess I should add it. But my question about "sparc" strings is the major one. Yuri
Apparently Analagous Threads
- [LLVMdev] llvm for freebsd on sparc64
- [LLVMdev] llvm for freebsd on sparc64
- [LLVMdev] Failure to compile llvm-gcc-4.2-2.7 on FreeBSD on sparc machine
- [LLVMdev] Compiler warnings with gcc-4.7.1
- [LLVMdev] Failure to compile llvm-gcc-4.2-2.7 on FreeBSD on sparc machine