www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - GDC cross compiler documentation / tutorial

reply Johannes Pfau <nospam example.com> writes:
I wrote some documentation on how to build a gdc cross-compiler:
http://gdcproject.org/wiki/Cross%20Compiler

For now there's only a tutorial describing how to use crosstool-NG with
gdc, but crosstool-NG already supports many different configurations:
http://gdcproject.org/wiki/Cross%20Compiler/crosstool-NG

crosstool-NG allows to build cross compilers for these architectures:
Alpha, ARM, AVR32, Blackfin, MIPS, OpenRISC/or32(+), PowerPC, s390,
SPARC, SuperH, x86

Supported C libraries: uclibc, eglibc, glibc, mingw, newlib

Supported OS: linux, windows, bare-metal

Some configurations probably won't work with gdc right now,
windows/mingw builds probably need additional patches to be usable.

crosstool-NG also allows to build canadian-cross compilers, where the
build machine != host machine != target machine.
For example this allows to build a cross compiler on Linux/x86-64 which
runs on Windows/x86 and compiles code for Linux/ARM.
Nov 04 2012
parent reply Jacob Carlborg <doob me.com> writes:
On 2012-11-04 11:44, Johannes Pfau wrote:

 Supported OS: linux, windows, bare-metal
No support for Mac OS X? The compilers on Mac OS X are cross-compilers out of the box. -- /Jacob Carlborg
Nov 04 2012
parent reply Johannes Pfau <nospam example.com> writes:
Am Sun, 04 Nov 2012 11:48:08 +0100
schrieb Jacob Carlborg <doob me.com>:

 On 2012-11-04 11:44, Johannes Pfau wrote:
 
 Supported OS: linux, windows, bare-metal
No support for Mac OS X? The compilers on Mac OS X are cross-compilers out of the box.
AFAICS you can use crosstool-NG on OSX to generate cross compilers which run on OSX and compile for other OS, but you can't create a cross compiler which runs on windows / linux and compiles for OSX.
Nov 04 2012
parent Jacob Carlborg <doob me.com> writes:
On 2012-11-04 12:02, Johannes Pfau wrote:

 AFAICS you can use crosstool-NG on OSX to generate cross compilers
 which run on OSX and compile for other OS, but you can't create a cross
 compiler which runs on windows / linux and compiles for OSX.
Ok, I see. I was mostly thinking of compiling both 32 and 64bit or compiling for ARM. -- /Jacob Carlborg
Nov 04 2012