[LLVMdev] llvm-gcc 4.0 for Linux at x86

Chris Lattner sabre at nondot.org
Tue Jun 6 23:58:49 PDT 2006


On Tue, 6 Jun 2006, Reid Spencer wrote:
> llvm-gcc4 by default emits object files, just as gcc does. This is by
> design. If you want to get bytecode output you need to use the --emit-
> llvm-bc option. A complete list of the options that llvm-gcc4 supports
> can be obtained with "llvm-gcc -v --help" (lots of output). Here are the
> descriptions of the --emit-llvm options:
>
>  -emit-llvm                  Emit LLVM code to the .s file instead of
> native
>  -emit-llvm-bc               Emit LLVM IR to the output file instead of
> native

Close.  These are the arguments the cc1 tool.  If you're running gcc 
directly, I'd suggest using:

llvm-gcc t.c -emit-llvm -S -O3 -o t.ll
llvm-gcc t.c -emit-llvm -c -O3 -o t.bc

Basically, with -emit-llvm, -S emits a .ll file, and -c emits a .bc file.

-Chris

> Please note that I was successful today in building llvm-gcc4 on Linux
> (FC3) and there is now a binary version available for Linux at:
>
> http://llvm.org/2006-06-01-llvm-gcc4-linux-x86-binary.tar.gz
>
> Reid.
>
> On Tue, 2006-06-06 at 19:17 -0700, John Trimble wrote:
>> Hmm, today I just tried compiling the llvm-gcc 4.0 frontend again on
>> linux (Fedora Core 3 I believe) and I seem to be suddenly having the
>> problem that Yossi Kreinin mentioned. The frontend seems to be using
>> normal gcc to compile as I no longer get a bytecode file after
>> compilation. When I pass the --version argument it claims to be the
>> LLVM 4.0.1 frontend. Any ideas what might cause this? It was working
>> just fine before, I don't know what I did differently last time I
>> compiled it.
>>
>> - John
>>
>> On 6/5/06, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
>>         On 6/3/06, Reid Spencer <reid at x10sys.com> wrote:
>>        > I don't think anyone has successfully built llvm-gcc4 on
>>         Linux yet. I've
>>        > tried and failed.
>>         I have :-)
>>         There was some patches, but I believe that they were all
>>         merged in the
>>         latest snapshot.
>>
>>         Rafael
>>         _______________________________________________
>>         LLVM Developers mailing list
>>         LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>>         http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>>
>>
>> --
>> John Trimble
>> Research Assistant
>> University of Arizona
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/


More information about the llvm-dev mailing list