Cross compilers; GDC/LDC

Johannes Pfau nospam at example.com
Mon Mar 4 04:57:03 PST 2013


Am Mon, 4 Mar 2013 10:36:45 +1000
schrieb Manu <turkeyman at gmail.com>:

> x86 and x64 are already available. I've seen ARM builds kicking
> around too which I've already done some work with. I'm not sure if
> they're up to date, but it's probably fine for me to use.

I included a new ARM build. Unfortunately ARM druntime broke when
upgrading to 2.062. We already had working cross-compilers with phobos
for ARM (raspberry pi).

> 
> Linux or bare metal + no library for the others will suit me now.
> Whatever's easiest.

OK, then linux

> 
> Google seem to have a build script for building their Android ARM and
> MIPS toolchains:
> http://developer.android.com/tools/sdk/ndk/index.html
> I wonder if the GDC frontend can be dropped in to their scripts
> easily?

Unless you actually need android support building a crosstool-NG
toolchain is easier.

> I guess the most important one in that case is PPC, since VMX is
> really standard, it's a very common arch, and there's no existing
> toolchains for it.
> 
> I remember talk of a build-server that automatically rebuilds
> binaries of many toolchains each time a new release of D comes out
> some time back, did that lead anywhere?
> 
> In the future, it'd be great to have a more complete set of offerings
> linked from http://dlang.org/download.html

Once we have working crosstool-NG configurations updating the cross
compilers is trivial. I should set up a qemu image though so others can
easily build the packages as well. However I think a bare compiler
without druntime is only useful for very few people.


I've uploaded the toolchains now. I verified that they can compile a
simple program, but I don't have hardware to test if the result
actually works.

Also attached a simple hello world. I guess you know this already but
you have to compile with -nophoboslib and make sure that gdc can find
the object.di file. The included object.di was just copied from my
local installation. It's not really used but the frontend does some
sanity checks on object.di now so an empty file doesn't work anymore.
Also make sure _Dmodule_ref is defined as in the test.d example file.


Some information about the toolchains:
GCC 4.7.2
GDC b8f5c22b0e7afa7e68a287ed788597e783540063 (2.062 frontend)
Endianness: Whatever was the default in ct-NG

(All version identifiers from http://dlang.org/version.html should
work.)

It's sometimes possible to change the endianness without recompiling gcc
(e.g. for MIPS -EB and -EL flags.). I'm not sure if this works though
as the C libraries are compiled with default endianness.

All toolchains target 32bit processors. If you need 64bit targets just
tell me. Multilib is not enabled.

http://www.mediafire.com/?b8pgyvbotbgpd

And here's an old release for Raspbian with druntime & phobos:
http://www.mediafire.com/?00d05h1gox9c50h


More information about the Digitalmars-d mailing list