[LLVMdev] gcc 4 frontend binary for mac os x x86

Tanya M. Lattner tonic at nondot.org
Mon Nov 13 23:30:06 PST 2006


>> I assume you have an Mac with an Intel processor.
>
> Yes. Sorry, I forgot to mentioned it in the mailbody.
>
>> Download this:
>> http://llvm.org/releases/1.8/llvm-gcc4-1.8-x86-darwin.tar.gz
>
> I think that is the same tarball I used before.

Ok. I'm confused. Do you want llvm-gcc3 or llvm-gcc4? The tarball above is 
a binary for llvm-gcc4 for Mac x86. You don't need to compile anything or 
fix any headers.

>> Let me know if that doesn't work.
>
> Again: there is no fixheader-script like you describe here http://
> llvm.org/docs/GettingStarted.html#quickstart. (in the gcc3 frontends
> there are fixheader-scripts, but there is no gcc3-frontend for darwin
> intel/x86)

There is no fixheader script for llvm-gcc4. That is for llvm-gcc3.

Lastly, I think maybe I missed the real question here. If you want to emit 
llvm bytecode be sure to pass -emit-llvm to llvm-gcc.

-Tanya



> And I think it is necessary. Some gcc output:
> ------------------------------------------------------------------------
> ------
> localhost:~/llvm/test moser$ llvm-gcc -v main.c
> Using built-in specs.
> Target: i686-apple-darwin8.7.1
> Configured with: /Volumes/Muggles/LLVM/1.8/gcc.llvm/configure --with-
> arch=pentium-m --with-tune=prescott --prefix=/build-llvm/llvm-
> gcc4-1.8-x86-darwin/install --enable-llvm=/build-llvm/llvm --enable-
> languages=c,c++,objc
> Thread model: posix
> gcc version 4.0.1 LLVM (Apple Computer, Inc. build 1.8)
> /Users/moser/llvm/llvm-gcc4-1.8-x86-darwin/bin/../libexec/gcc/i686-
> apple-darwin8.7.1/4.0.1/cc1 -quiet -v -iprefix /Users/moser/llvm/llvm-
> gcc4-1.8-x86-darwin/bin/../lib/gcc/i686-apple-darwin8.7.1/4.0.1/ -
> D__DYNAMIC__ main.c -fPIC -quiet -dumpbase main.c -march=pentium-m -
> mtune=prescott -auxbase main -version -o /var/tmp//ccrAXWSZ.s
> ignoring nonexistent directory "/Users/moser/llvm/llvm-gcc4-1.8-x86-
> darwin/bin/../lib/gcc/i686-apple-darwin8.7.1/4.0.1/../../../../i686-
> apple-darwin8.7.1/include"
> ignoring nonexistent directory "/build-llvm/llvm-gcc4-1.8-x86-darwin/
> install/include"
> ignoring nonexistent directory "/build-llvm/llvm-gcc4-1.8-x86-darwin/
> install/lib/gcc/i686-apple-darwin8.7.1/4.0.1/include"
> ignoring nonexistent directory "/build-llvm/llvm-gcc4-1.8-x86-darwin/
> install/i686-apple-darwin8.7.1/include"
> #include "..." search starts here:
> #include <...> search starts here:
> /Users/moser/llvm/llvm-gcc4-1.8-x86-darwin/bin/../lib/gcc/i686-apple-
> darwin8.7.1/4.0.1/include
> /usr/local/include
> /usr/include
> /System/Library/Frameworks
> /Library/Frameworks
> End of search list.
> GNU C version 4.0.1 LLVM (Apple Computer, Inc. build 1.8) (i686-apple-
> darwin8.7.1)
>         compiled by GNU C version 4.0.1 LLVM (Apple Computer, Inc.
> build 5400).
> GGC heuristics: --param ggc-min-expand=100 --param ggc-min-
> heapsize=131072
> Compiler executable checksum: 72aee3cd986006434465acf3acc2e900
> as -arch i386 -force_cpusubtype_ALL -o /var/tmp//ccLglcz9.o /var/tmp//
> ccrAXWSZ.s
> /Users/moser/llvm/llvm-gcc4-1.8-x86-darwin/bin/../libexec/gcc/i686-
> apple-darwin8.7.1/4.0.1/collect2 -dynamic -arch i386 -
> weak_reference_mismatches non-weak -o a.out -lcrt1.o -L/Users/moser/
> llvm/llvm-gcc4-1.8-x86-darwin/bin/../lib/gcc/i686-apple-
> darwin8.7.1/4.0.1 -L/Users/moser/llvm/llvm-gcc4-1.8-x86-darwin/bin/../
> lib/gcc -L/Users/moser/llvm/llvm-gcc4-1.8-x86-darwin/bin/../lib/gcc/
> i686-apple-darwin8.7.1/4.0.1/../../.. /var/tmp//ccLglcz9.o -lgcc -
> lSystem
> ------------------------------------------------------------------------
> ------------------------------
>
> I think the compiler works fine, but it doesn't include the right
> headers. So the llvm-gcc generates code for the intel and not for the
> llvm-bytecode. But again: perhaps I missed something to read and
> don't see the important information?
>
> Best wishes
> Nico
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



More information about the llvm-dev mailing list