Compiling with llvm-gcc


I just installed llvm on a 64 bit system and tried running it on a hello
world program but I got the following errors:

/tmp/ccXb6nzp.s: Assembler messages:
/tmp/ccXb6nzp.s:9: Error: suffix or operands invalid for `push'
/tmp/ccXb6nzp.s:21: Error: suffix or operands invalid for `pop'

I have installed llvm 2.5 and it was configured with llvm-gcc4.2-2.5

Please help me resolve this issue.


Did you compile it with -m64?


Using the command:
llvm-gcc -m64 hello.c

resulted in the following error:
sorry, unimplemented: 64-bit mode not compiled in

Bill Wendling wrote:

Using a 32-bit compiler probably isn't going to work quite right on a
64-bit system; make sure you're configuring llvm-gcc for a 64-bit



This error message means that you haven't compiled LLVM-GCC from the source for your architecture. The distribution you have is probably for 32-bit machines only. Tell us more about your system configuration and maybe we can figure out where the problem arises in the compilation of LLVM-GCC.


Thank you for your help. I compiled llvm-gcc from source and tried again
with the new binaries and it worked this time. I used the option
"--disable-multilib" while running configure for llvm-gcc and I think thats
what made the difference. Hoping to build some tools using llvm now :slight_smile:


Samuel Crow wrote: