building LLVM (question about ELF class)

Hi,

Thanks for the replies in the mailing list. I made some progress in
building LLVM, but I still have a problem about ELF class. I am working
with LLVM on a sparcv9 machine, while the gcc is configured to emit 32-bit
binary by default. After executing "configure --with-llvmgccdir=...
--enable-jit", I modified Makefile.config so it contains

CXX = g++ -mcpu=v9 -m64

When I do gmaking, there is an error about ELF class:

It seems like that tblgen needs ELFCLASS64, but profile_rt does not like
it. Am I missing something? How should I deal with this?

I'm sorry but I don't know the answer to your question. :frowning:

I checked tools/Debug, and many tools' binary has been generated,
including gccas, gccld, llc, lli, opt, etc. I wonder what is the
functionality of profile_rt. Plus, if my "gmake" stops at profile_rt, what
are the components in LLVM I cannot use? Thanks.

profile_rt is not very important unless you are doing things with profile
guided feedback. Feel free to turn it off in your local tree by removing
'libprofile' from the llvm/runtime/Makefile file. Actually, looking at
mainline CVS, it appears that libprofile has been disabled for sparcs, so
I think that this situation is known (at least by someone)...

-Chris

When I do gmaking, there is an error about ELF class:
ld: fatal: file
/a/athena/uf24/zhou/research/llvm/src/runtime/libprofile/Debug/.
libs/BasicBlockTracing.o: wrong ELF class: ELFCLASS64

I'm not sure what the ultimate cause of your problem is, but you get this
error when you try to link 64-bit and 32-bit object files together.