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

Nico Moser moser at cs.tu-berlin.de
Mon Nov 13 23:04:26 PST 2006


Hi,

On Nov 13, 2006, at 9:17 PM, Tanya M. Lattner wrote:

> 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.

> 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)
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



More information about the llvm-dev mailing list