Cross Compiling from Linux to a Mac OS X 10.5 or 10.6 target. How?

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

Cross Compiling from Linux to a Mac OS X 10.5 or 10.6 target. How?

bruce
Is anyone on the list doing this? If so, how did you set it up?

The information on the FPC wiki and elsewhere in the lists is woefully
out of date.

Many thanks, Bruce.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Cross Compiling from Linux to a Mac OS X 10.5 or 10.6 target. How?

Jonas Maebe-2

On 01 Aug 2011, at 09:49, Bruce Tulloch wrote:

> The information on the FPC wiki and elsewhere in the lists is woefully
> out of date.

In general, this is not supported (and personally I've never done it). You have to build an Apple tool chain (assembler, linker) on a Linux host, which is not supported by Apple, and then copy a Mac OS X SDK to your Linux machine. Additionally, for -Xg functionality (in combination with DWARF debug information) the dsymutil program is required, but since it's not open source it is definitely not possible to build it for Linux.

I think your best bet is to google general information about cross-compiling from Linux to Mac OS X. I think there is nothing FPC-specific about it, except for maybe pointing the compiler to the SDK (use the -XR command line parameter for that).


Jonas_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Cross Compiling from Linux to a Mac OS X 10.5 or 10.6 target. How?

Felipe Monteiro de Carvalho
In reply to this post by bruce
On Mon, Aug 1, 2011 at 9:49 AM, Bruce Tulloch <[hidden email]> wrote:
> Is anyone on the list doing this? If so, how did you set it up?

If your objective is writing software for Mac OS X without actually
having a Mac computer, then I seriously doubt it would work, unless
your app is a simple command line program. Mac OS X has a number of
particularities.

--
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Cross Compiling from Linux to a Mac OS X 10.5 or 10.6 target. How?

Marco van de Voort
In reply to this post by Jonas Maebe-2
In our previous episode, Jonas Maebe said:
> > The information on the FPC wiki and elsewhere in the lists is woefully
> > out of date.
>
> In general, this is not supported (and personally I've never done it). You have to build an Apple tool chain (assembler, linker) on a Linux host, which is not supported by Apple, and then copy a Mac OS X SDK to your Linux machine. Additionally, for -Xg functionality (in combination with DWARF debug information) the dsymutil program is required, but since it's not open source it is definitely not possible to build it for Linux.
>
> I think your best bet is to google general information about cross-compiling from Linux to Mac OS X. I think there is nothing FPC-specific about it, except for maybe pointing the compiler to the SDK (use the -XR command line parameter for that).

I did it with 10.4. The trouble is getting the toolchain to run. IIRC
Adriaan assisted me with that back then.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Cross Compiling from Linux to a Mac OS X 10.5 or 10.6 target. How?

bruce
In reply to this post by bruce
Thanks for the feedback everyone.

I have a Mac on which I can run a native FPC/Lazarus environment for
debugging purposes. My goal here is to add a cross compiling build for
OS X along side existing Linux and Win32/64 targets so all our OS and
CPU targets can be rebuilt at once.

So, from what I gather, I can copy the SDK across from my (Leopard) Mac
to the Linux build machine and I have found odcctools:

  http://svn.macosforge.org/repository/odcctools/trunk/

so I should be able to build the toolchain (as, ld).

I don't need -Xg/dsymutils (because I using this as build system only)
and I can add a clause to /etc/fpc.cfg to include the necessary search
paths.

I'll give it a go and report back.

-b

On 08/01/11 17:49, Bruce Tulloch wrote:
> Is anyone on the list doing this? If so, how did you set it up?
>
> The information on the FPC wiki and elsewhere in the lists is woefully
> out of date.
>
> Many thanks, Bruce.
>  
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal