Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Cross-compiler from Windows to Mac OSX?

83 views
Skip to first unread message

Leff Ivanov

unread,
Feb 1, 2018, 11:33:18 AM2/1/18
to
Hello! I'm looking for a compiler that will allow me to cross-compile my code on Windows targeting Mac OSX and some generic Linux distribution. Do you know any compiler that can do it? Basically any programming language will do.

Languages I've found so far:
1) https://golang.org/ (very fat executables)
2) http://www.red-lang.org/ (no x64 compiler, only x86)
3) https://freepascal.org/ (I managed to compile crosscompiler, but it didn't work)

Kaz Kylheku

unread,
Feb 1, 2018, 9:44:23 PM2/1/18
to
On 2018-02-01, Leff Ivanov <droid...@gmail.com> wrote:
> Hello! I'm looking for a compiler that will allow me to cross-compile
> my code on Windows targeting Mac OSX and some generic Linux
> distribution. Do you know any compiler that can do it? Basically any
> programming language will do.

Any Linux distro build that supports being hosted on Cygwin will
build a ... whole Linux distro: C library, bash, kernel, ...

Don't know of one, though! :(

Marco van de Voort

unread,
Feb 4, 2018, 4:36:22 PM2/4/18
to
On 2018-02-01, Leff Ivanov <droid...@gmail.com> wrote:
> 3) https://freepascal.org/ (I managed to compile crosscompiler, but it didn't work)


- there is a tool called "fpcdeluxe" that checks out sources and builds
FPC, and downloads the necessary binutils.

- There is a bundle of FPC with Lazarus IDE called CodeTyphon, which is also
a good star for crosscompiling.

With Mac OS X, things are always more complex, since OS X doesn't use
binutils.
[If you want to run stuff on MacOS, I'd have to say that a used macbook
or mac mini is a good investment. -John]

alexf...@gmail.com

unread,
Feb 15, 2018, 10:26:17 AM2/15/18
to
On Thursday, February 1, 2018 at 8:33:18 AM UTC-8, Leff Ivanov wrote:
> Hello! I'm looking for a compiler that will allow me to cross-compile my code on Windows targeting Mac OSX and some generic Linux distribution. Do you know any compiler that can do it? Basically any programming language will do.
>

If you're sure about *any*, here's mine:

https://github.com/alexfru/SmallerC

You can even cross-compile from or for DOS.

Alex

Luuk

unread,
Feb 17, 2018, 10:43:29 AM2/17/18
to
On 01-02-18 15:38, Leff Ivanov wrote:
> Hello! I'm looking for a compiler that will allow me to
cross-compile my code on Windows targeting Mac OSX and some generic
Linux distribution. Do you know any compiler that can do it? Basically
any programming language will do.

> Languages I've found so far: ...

OpenCobol
http://opencobolide.readthedocs.io/en/latest/download.html

Leff Ivanov

unread,
Mar 1, 2018, 1:47:43 PM3/1/18
to
Isn't the OpenCobol/GnuCobol compiling to C? In that case I still need
a C cross-compiler to compile it, which isn't that easy.

Albert van der Horst

unread,
May 5, 2018, 9:23:11 AM5/5/18
to
In article <18-0...@comp.compilers>,
FASM does a good job. It allows me to build a Forth for Linux (32 64)
and MS WIndows (32 64) on either Linux or MS-Windows.
But assembly may not be what you're after, because it is one architecture.
It cannot cross-build for a DEC Alpha Linux system.

Groetjes Albert
--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Albert van der Horst

unread,
May 12, 2018, 1:07:35 PM5/12/18
to
In article <18-0...@comp.compilers>,
Albert van der Horst <alb...@cherry.spenarnc.xs4all.nl> wrote:
>In article <18-0...@comp.compilers>,
>Leff Ivanov <droid...@gmail.com> wrote:
>>Hello! I'm looking for a compiler that will allow me to cross-compile my code on Windows targeting Mac OSX and some generic Linux distribution. Do you know any compiler that can do it? Basically any programming language will do.
>>
>>Languages I've found so far:
>>1) https://golang.org/ (very fat executables)
>>2) http://www.red-lang.org/ (no x64 compiler, only x86)
>>3) https://freepascal.org/ (I managed to compile crosscompiler, but it didn't work)
>>
>
>FASM does a good job. It allows me to build a Forth for Linux (32 64)
>and MS WIndows (32 64) on either Linux or MS-Windows.
>But assembly may not be what you're after, because it is one architecture.
>It cannot cross-build for a DEC Alpha Linux system.

Other posts convinced me that I misunderstood the question.
The code must run identically on three implementations.
Then you can add ciforth to the list.
https://forth.hcc.nl/w/Producten/Ciforth
0 new messages