llvm + mingw

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

llvm + mingw

Vincent R.
Hi,

I would like to know if it would be possible to developp on Mac an
objective-C 2.0
program and targeting mingw.
IS it possible to tell clang to compile objective-C code and then do the
final link
with mingw ?

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: llvm + mingw

Anton Korobeynikov
Hello

> IS it possible to tell clang to compile objective-C code and then do the
> final link with mingw ?
In theory - yes. Some problems / challenges:

1. You need to have an objc runtime on mingw compatible with the one
clang generates the code for.
2. clang on mingw might not be pretty stable - it wasn't thoroughly used there.

--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: llvm + mingw

David Chisnall
In reply to this post by Vincent R.
On 5 Jan 2010, at 15:56, Vincent R. wrote:

> Hi,
>
> I would like to know if it would be possible to developp on Mac an
> objective-C 2.0
> program and targeting mingw.
> IS it possible to tell clang to compile objective-C code and then do  
> the
> final link
> with mingw ?

There are several issues here.  Clang can generate LLVM IR for the GNU  
runtime (if you are using Objective-C 2 then you will want libobjc2  
from GNUstep svn), assuming that you have the headers available and  
LLVM can emit assembly for mingw.  I don't think the Darwin assembler  
can emit object code that is compatible with mingw, so you'll need to  
install a different assembler.

Given that you're linking on mingw anyway, is there a reason why you  
want to compile on OS X?  If the issue is XCode, then you should look  
at GNUstep's pbxbuild tool, which runs on mingw and can build XCode  
projects.

David

-- Sent from my PDP-11

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: llvm + mingw

Anton Korobeynikov
Hello

> There are several issues here.  Clang can generate LLVM IR for the GNU
> runtime (if you are using Objective-C 2 then you will want libobjc2
> from GNUstep svn), assuming that you have the headers available and
> LLVM can emit assembly for mingw.  I don't think the Darwin assembler
> can emit object code that is compatible with mingw, so you'll need to
> install a different assembler.
This is not a problem - just build & install cross assembler.

--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: llvm + mingw

Vincent R.
In reply to this post by David Chisnall
On Tue, 5 Jan 2010 16:39:30 +0000, David Chisnall <[hidden email]>
wrote:

> On 5 Jan 2010, at 15:56, Vincent R. wrote:
>
>> Hi,
>>
>> I would like to know if it would be possible to developp on Mac an
>> objective-C 2.0
>> program and targeting mingw.
>> IS it possible to tell clang to compile objective-C code and then do  
>> the
>> final link
>> with mingw ?
>
> There are several issues here.  Clang can generate LLVM IR for the GNU  
> runtime (if you are using Objective-C 2 then you will want libobjc2  
> from GNUstep svn), assuming that you have the headers available and  
> LLVM can emit assembly for mingw.  I don't think the Darwin assembler  
> can emit object code that is compatible with mingw, so you'll need to  
> install a different assembler.
>

You are talking about libobjc2 but I can see that apple is releasing an
objc4
folder(http://www.opensource.apple.com/source/objc4/objc4-371/runtime/).
Would it be possible to use it and would it be compatible ?

> Given that you're linking on mingw anyway, is there a reason why you  
> want to compile on OS X?  If the issue is XCode, then you should look  
> at GNUstep's pbxbuild tool, which runs on mingw and can build XCode  
> projects.

Actually I don't care where I am compiling, it could be on windows as long
as it works.


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: llvm + mingw

Jean-Daniel Dupas-2
In reply to this post by Anton Korobeynikov

Le 5 janv. 2010 à 17:47, Anton Korobeynikov a écrit :

> Hello
>
>> There are several issues here.  Clang can generate LLVM IR for the GNU
>> runtime (if you are using Objective-C 2 then you will want libobjc2
>> from GNUstep svn), assuming that you have the headers available and
>> LLVM can emit assembly for mingw.  I don't think the Darwin assembler
>> can emit object code that is compatible with mingw, so you'll need to
>> install a different assembler.
> This is not a problem - just build & install cross assembler.


And if you don't want to bother to build it, you can get it in the Cocotron project's tools (which provide a full gcc tool suite to build Windows/mingw exec using Xcode).

http://www.cocotron.org/Tools/InstallCDT


-- Jean-Daniel





_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev