gcc 4 frontend binary for mac os x x86

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

gcc 4 frontend binary for mac os x x86

Nico Moser
Hi,

I wanted to install llvm 1.8 and the frontend at my MacBook Pro but I  
think the gcc4 frontend doesn't work (gcc3 and llvm 1.8 works fine on  
my old ppc-based mac). There are no fixheaders-script and no include  
directories ...
Are there working gcc 4 binaries? Did I miss some informations on the  
llvm-webpage?
Or do I have to build my own gcc frontend?

Thank you
Nico
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: gcc 4 frontend binary for mac os x x86

Tanya Lattner-2

> I wanted to install llvm 1.8 and the frontend at my MacBook Pro but I
> think the gcc4 frontend doesn't work (gcc3 and llvm 1.8 works fine on
> my old ppc-based mac). There are no fixheaders-script and no include
> directories ...
> Are there working gcc 4 binaries? Did I miss some informations on the
> llvm-webpage?
> Or do I have to build my own gcc frontend?

I assume you have an Mac with an Intel processor.

Download this:
http://llvm.org/releases/1.8/llvm-gcc4-1.8-x86-darwin.tar.gz

Let me know if that doesn't work.

-Tanya

>
> Thank you
> Nico
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: gcc 4 frontend binary for mac os x x86

Nico Moser
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
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: gcc 4 frontend binary for mac os x x86

Tanya Lattner-2

>> 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
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: gcc 4 frontend binary for mac os x x86

Nico Moser

On Nov 14, 2006, at 8:30 AM, 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.
>
> Ok. I'm confused.

Perhaps its my flavor of english :-/

> Do you want llvm-gcc3 or llvm-gcc4?

I want llvm-gcc4! Before I sent my first mail to this list, I used  
the gcc3-binary on a ppc mac (that works) and the gcc4-binary on my  
intel-mac - that creates x86-binaries but no llvm-bytecode.

> The tarball above is
> a binary for llvm-gcc4 for Mac x86.

This is one of the rare facts I understand ;-)

> You don't need to compile anything or
> fix any headers.

Ok. But then it doesn't work. Or I forgot to set pathes or make to  
less links ... I don't know.

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

Ok.

> Lastly, I think maybe I missed the real question here.

Perhaps this is a real question:
The messages I posted last time
-----------------
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"
-----------------
have no meaning?


> If you want to emit
> llvm bytecode be sure to pass -emit-llvm to llvm-gcc.

Thats the next point:
$ llvm-gcc4-1.8-x86-darwin/bin/gcc -v -emit-llvm main.c
....
/usr/bin/ld: unknown flag: -emit-llvm
collect2: ld returned 1 exit status

I'm afraid  I made a very simple but serious mistake.

Thanks again
Nico
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: gcc 4 frontend binary for mac os x x86

Devang Patel

On Nov 14, 2006, at 1:07 AM, Nico Moser wrote:

If you want to emit

llvm bytecode be sure to pass -emit-llvm to llvm-gcc.


Thats the next point:

$ llvm-gcc4-1.8-x86-darwin/bin/gcc -v -emit-llvm main.c

....

/usr/bin/ld: unknown flag: -emit-llvm

collect2: ld returned 1 exit status


The linker does not know how to link llvm-byte code.
If you add  -c on the command line

$ llvm-gcc4-1.8-x86-darwin/bin/gcc -v -emit-llvm main.c

then you will get llvm-byte code in main.o file. You can
select the name of byte code file using standard gcc -o switch.

-
Devang


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: gcc 4 frontend binary for mac os x x86

Nico Moser

On Nov 14, 2006, at 10:21 AM, Devang Patel wrote:

The linker does not know how to link llvm-byte code.
If you add  -c on the command line

$ llvm-gcc4-1.8-x86-darwin/bin/gcc -v -emit-llvm main.c

then you will get llvm-byte code in main.o file. You can
select the name of byte code file using standard gcc -o switch.


Shame on me - sorry for wasting the list :-[
I think I was confused by the little differences between gcc3 and gcc4 - sorry again.

Thanks 
Nico

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev