www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Cross compilers; GDC/LDC

reply Manu <turkeyman gmail.com> writes:
--e89a8fb2054a15288804d70549c4
Content-Type: text/plain; charset=UTF-8

Hi people.

So I've been AWOL a while, and I'll still be intermittent for some weeks
yet, but I'm trying to work on std.simd and also my dconf talks in any gaps
I can.
However, in order to do a thorough job, I'm missing some tools. I wonder if
anyone can help me out...?

I need to do some rather strenuous testing of SIMD code gen in D, to make
sure I don't make mistakes and/or lie.

This requires testing against as many compilers+architectures as I can.
I have barely any internet access to speak of, I don't really know how, and
I also don't run linux, so I can't practically build myself a suite of
toolchains to work with >_<

Ideally, I would really like all these toolchains:
 GDC: x86, x64, ARM, PPC, MIPS, SH4 <- common toolchains
 LDC: x86, x64, ARM, PPC <- used by apple

I wonder if anyone with know-how building GDC or LDC for windows could help
me out by producing as many of these in binary as possible?

As a side note, I think it would be really valuable to keep a cache of such
windows binaries somewhere on the net anyway, so anyone working on foreign
platforms can get to work and actually focus on platform support, without
wasting all their time learning how to build these toolchains.

I think Daniel Green who usually builds the windows GDC toolchains actually
builds them from linux? (which seems weird to me)

Cheers people!

--e89a8fb2054a15288804d70549c4
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi people.<div><br></div><div style>So I&#39;ve been AWOL =
a while, and I&#39;ll still be intermittent for some weeks yet, but I&#39;m=
 trying to work on std.simd and also my dconf talks in any gaps I can.</div=

ls. I wonder if anyone can help me out...?</div><div style><br></div><div s= tyle>I need to do some rather strenuous testing of SIMD code gen in D, to m= ake sure I don&#39;t make mistakes and/or lie.</div> <div style><br></div><div style>This requires testing against as many compi= lers+architectures as I can.</div><div style>I have barely any internet acc= ess to speak of, I don&#39;t really know how, and I also don&#39;t run linu= x, so I can&#39;t practically build myself a suite of toolchains to work wi= th &gt;_&lt;</div> <div style><br></div><div style>Ideally, I would really like all these tool= chains:</div><div style>=C2=A0GDC: x86, x64, ARM, PPC, MIPS, SH4 &lt;- comm= on toolchains</div><div style>=C2=A0LDC: x86, x64, ARM, PPC &lt;- used by a= pple</div> <div style><br></div><div style>I wonder if anyone with know-how building G= DC or LDC for windows could help me out by producing as many of these in bi= nary as possible?<br></div><div style><br></div><div style>As a side note, = I think it would be really valuable to keep a cache of such windows binarie= s somewhere on the net anyway, so anyone working on foreign platforms can g= et to work and actually focus on platform support, without wasting all thei= r time learning how to build these toolchains.</div> <div style><br></div><div style>I think Daniel Green who usually builds the= windows GDC toolchains actually builds them from linux? (which seems weird= to me)</div><div style><br></div><div style>Cheers people!</div></div> --e89a8fb2054a15288804d70549c4--
Mar 03 2013
next sibling parent Johannes Pfau <nospam example.com> writes:
Am Sun, 3 Mar 2013 23:33:27 +1000
schrieb Manu <turkeyman gmail.com>:

 Hi people.
 
 So I've been AWOL a while, and I'll still be intermittent for some
 weeks yet, but I'm trying to work on std.simd and also my dconf talks
 in any gaps I can.
 However, in order to do a thorough job, I'm missing some tools. I
 wonder if anyone can help me out...?
 
 I need to do some rather strenuous testing of SIMD code gen in D, to
 make sure I don't make mistakes and/or lie.
 
 This requires testing against as many compilers+architectures as I
 can. I have barely any internet access to speak of, I don't really
 know how, and I also don't run linux, so I can't practically build
 myself a suite of toolchains to work with >_<
 
 Ideally, I would really like all these toolchains:
  GDC: x86, x64, ARM, PPC, MIPS, SH4 <- common toolchains
  LDC: x86, x64, ARM, PPC <- used by apple
 
 I wonder if anyone with know-how building GDC or LDC for windows
 could help me out by producing as many of these in binary as possible?
 
 As a side note, I think it would be really valuable to keep a cache
 of such windows binaries somewhere on the net anyway, so anyone
 working on foreign platforms can get to work and actually focus on
 platform support, without wasting all their time learning how to
 build these toolchains.
 
 I think Daniel Green who usually builds the windows GDC toolchains
 actually builds them from linux? (which seems weird to me)
 
 Cheers people!
 

I could build the gdc toolchains, but I need some more information: What OS should the toolchains target? Linux, windows or "bare-metal"? (Especially the x86 toolchains) Do you need libdruntime/libphobos or is a plain compiler enough? I'm not sure if druntime compiles for SH4, MIPS and PPC.
Mar 03 2013
prev sibling next sibling parent Manu <turkeyman gmail.com> writes:
--e89a8f64325031643304d70e8d10
Content-Type: text/plain; charset=UTF-8

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.

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

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?

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


On 4 March 2013 03:20, Johannes Pfau <nospam example.com> wrote:

 Am Sun, 3 Mar 2013 23:33:27 +1000
 schrieb Manu <turkeyman gmail.com>:

 Hi people.

 So I've been AWOL a while, and I'll still be intermittent for some
 weeks yet, but I'm trying to work on std.simd and also my dconf talks
 in any gaps I can.
 However, in order to do a thorough job, I'm missing some tools. I
 wonder if anyone can help me out...?

 I need to do some rather strenuous testing of SIMD code gen in D, to
 make sure I don't make mistakes and/or lie.

 This requires testing against as many compilers+architectures as I
 can. I have barely any internet access to speak of, I don't really
 know how, and I also don't run linux, so I can't practically build
 myself a suite of toolchains to work with >_<

 Ideally, I would really like all these toolchains:
  GDC: x86, x64, ARM, PPC, MIPS, SH4 <- common toolchains
  LDC: x86, x64, ARM, PPC <- used by apple

 I wonder if anyone with know-how building GDC or LDC for windows
 could help me out by producing as many of these in binary as possible?

 As a side note, I think it would be really valuable to keep a cache
 of such windows binaries somewhere on the net anyway, so anyone
 working on foreign platforms can get to work and actually focus on
 platform support, without wasting all their time learning how to
 build these toolchains.

 I think Daniel Green who usually builds the windows GDC toolchains
 actually builds them from linux? (which seems weird to me)

 Cheers people!

I could build the gdc toolchains, but I need some more information: What OS should the toolchains target? Linux, windows or "bare-metal"? (Especially the x86 toolchains) Do you need libdruntime/libphobos or is a plain compiler enough? I'm not sure if druntime compiles for SH4, MIPS and PPC.

--e89a8f64325031643304d70e8d10 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">x86 and x64 are already available. I&#39;ve seen ARM build= s kicking around too which I&#39;ve already done some work with. I&#39;m no= t sure if they&#39;re up to date, but it&#39;s probably fine for me to use.= <div> <br></div><div>Linux or bare metal + no library for the others will suit me= now. Whatever&#39;s easiest.</div><div><br></div><div>Google seem to have = a build script for building their Android ARM and MIPS toolchains:</div> <div><a href=3D"http://developer.android.com/tools/sdk/ndk/index.html" targ= et=3D"_blank">http://developer.android.com/tools/sdk/ndk/index.html</a><br>= </div><div style>I wonder if the GDC frontend can be dropped in to their sc= ripts easily?</div> <div><br></div><div style>I guess the most important one in that case is PP= C, since VMX is really standard, it&#39;s a very common arch, and there&#39= ;s no existing toolchains for it.</div><div><br></div><div>I remember talk = of a build-server that automatically rebuilds binaries of many toolchains e= ach time a new release of D comes out some time back, did that lead anywher= e?</div> <div><br></div><div>In the future, it&#39;d be great to have a more complet= e set of offerings linked from <a href=3D"http://dlang.org/download.html" t= arget=3D"_blank">http://dlang.org/download.html</a></div></div><div class= =3D"gmail_extra"> <br><br><div class=3D"gmail_quote">On 4 March 2013 03:20, Johannes Pfau <sp= an dir=3D"ltr">&lt;<a href=3D"mailto:nospam example.com" target=3D"_blank">= nospam example.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quot= e" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Am Sun, 3 Mar 2013 23:33:27 +1000<br> schrieb Manu &lt;<a href=3D"mailto:turkeyman gmail.com">turkeyman gmail.com= </a>&gt;:<br> <div class=3D"im"><br> &gt; Hi people.<br> &gt;<br> &gt; So I&#39;ve been AWOL a while, and I&#39;ll still be intermittent for = some<br> &gt; weeks yet, but I&#39;m trying to work on std.simd and also my dconf ta= lks<br> &gt; in any gaps I can.<br> &gt; However, in order to do a thorough job, I&#39;m missing some tools. I<= br> &gt; wonder if anyone can help me out...?<br> &gt;<br> &gt; I need to do some rather strenuous testing of SIMD code gen in D, to<b= r> &gt; make sure I don&#39;t make mistakes and/or lie.<br> &gt;<br> &gt; This requires testing against as many compilers+architectures as I<br> &gt; can. I have barely any internet access to speak of, I don&#39;t really= <br> &gt; know how, and I also don&#39;t run linux, so I can&#39;t practically b= uild<br> &gt; myself a suite of toolchains to work with &gt;_&lt;<br> &gt;<br> &gt; Ideally, I would really like all these toolchains:<br> &gt; =C2=A0GDC: x86, x64, ARM, PPC, MIPS, SH4 &lt;- common toolchains<br> </div><div class=3D"im">&gt; =C2=A0LDC: x86, x64, ARM, PPC &lt;- used by ap= ple<br> &gt;<br> &gt; I wonder if anyone with know-how building GDC or LDC for windows<br> &gt; could help me out by producing as many of these in binary as possible?= <br> &gt;<br> &gt; As a side note, I think it would be really valuable to keep a cache<br=

&gt; working on foreign platforms can get to work and actually focus on<br> &gt; platform support, without wasting all their time learning how to<br> &gt; build these toolchains.<br> &gt;<br> &gt; I think Daniel Green who usually builds the windows GDC toolchains<br> &gt; actually builds them from linux? (which seems weird to me)<br> &gt;<br> &gt; Cheers people!<br> &gt;<br> <br> </div>I could build the gdc toolchains, but I need some more information:<b= r> <br> What OS should the toolchains target? Linux, windows or &quot;bare-metal&qu= ot;?<br> (Especially the x86 toolchains)<br> <br> Do you need libdruntime/libphobos or is a plain compiler enough? I&#39;m<br=

</blockquote></div><br></div> --e89a8f64325031643304d70e8d10--
Mar 03 2013
prev sibling next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
--047d7bb70dfea699b904d716554a
Content-Type: text/plain; charset=ISO-8859-1

On Mar 4, 2013 12:38 AM, "Manu" <turkeyman gmail.com> wrote:
 x86 and x64 are already available. I've seen ARM builds kicking around

date, but it's probably fine for me to use.
 Linux or bare metal + no library for the others will suit me now.

 Google seem to have a build script for building their Android ARM and

 http://developer.android.com/tools/sdk/ndk/index.html
 I wonder if the GDC frontend can be dropped in to their scripts easily?

 I guess the most important one in that case is PPC, since VMX is really

it.
 I remember talk of a build-server that automatically rebuilds binaries of

that lead anywhere?
 In the future, it'd be great to have a more complete set of offerings

 On 4 March 2013 03:20, Johannes Pfau <nospam example.com> wrote:
 Am Sun, 3 Mar 2013 23:33:27 +1000
 schrieb Manu <turkeyman gmail.com>:

 Hi people.

 So I've been AWOL a while, and I'll still be intermittent for some
 weeks yet, but I'm trying to work on std.simd and also my dconf talks
 in any gaps I can.
 However, in order to do a thorough job, I'm missing some tools. I
 wonder if anyone can help me out...?

 I need to do some rather strenuous testing of SIMD code gen in D, to
 make sure I don't make mistakes and/or lie.

 This requires testing against as many compilers+architectures as I
 can. I have barely any internet access to speak of, I don't really
 know how, and I also don't run linux, so I can't practically build
 myself a suite of toolchains to work with >_<

 Ideally, I would really like all these toolchains:
  GDC: x86, x64, ARM, PPC, MIPS, SH4 <- common toolchains
  LDC: x86, x64, ARM, PPC <- used by apple

 I wonder if anyone with know-how building GDC or LDC for windows
 could help me out by producing as many of these in binary as possible?

 As a side note, I think it would be really valuable to keep a cache
 of such windows binaries somewhere on the net anyway, so anyone
 working on foreign platforms can get to work and actually focus on
 platform support, without wasting all their time learning how to
 build these toolchains.

 I think Daniel Green who usually builds the windows GDC toolchains
 actually builds them from linux? (which seems weird to me)

 Cheers people!

I could build the gdc toolchains, but I need some more information: What OS should the toolchains target? Linux, windows or "bare-metal"? (Especially the x86 toolchains) Do you need libdruntime/libphobos or is a plain compiler enough? I'm not sure if druntime compiles for SH4, MIPS and PPC.


I did try testing this with QEMU, however the only reliable target that can build gcc is ARM under emulation. The best method of doing this would be to have physical kit either donated or bought through donations that can set-up as port boxes for anyone who wants to port their D application over to architecture X. Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; --047d7bb70dfea699b904d716554a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <p><br> On Mar 4, 2013 12:38 AM, &quot;Manu&quot; &lt;<a href=3D"mailto:turkeyman g= mail.com">turkeyman gmail.com</a>&gt; wrote:<br> &gt;<br> &gt; x86 and x64 are already available. I&#39;ve seen ARM builds kicking ar= ound too which I&#39;ve already done some work with. I&#39;m not sure if th= ey&#39;re up to date, but it&#39;s probably fine for me to use.<br> &gt;<br> &gt; Linux or bare metal + no library for the others will suit me now. What= ever&#39;s easiest.<br> &gt;<br> &gt; Google seem to have a build script for building their Android ARM and = MIPS toolchains:<br> &gt; <a href=3D"http://developer.android.com/tools/sdk/ndk/index.html">http= ://developer.android.com/tools/sdk/ndk/index.html</a><br> &gt; I wonder if the GDC frontend can be dropped in to their scripts easily= ?<br> &gt;<br> &gt; I guess the most important one in that case is PPC, since VMX is reall= y standard, it&#39;s a very common arch, and there&#39;s no existing toolch= ains for it.<br> &gt;<br> &gt; 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?<br> &gt;<br> &gt; In the future, it&#39;d be great to have a more complete set of offeri= ngs linked from <a href=3D"http://dlang.org/download.html">http://dlang.org= /download.html</a><br> &gt;<br> &gt;<br> &gt; On 4 March 2013 03:20, Johannes Pfau &lt;<a href=3D"mailto:nospam exam= ple.com">nospam example.com</a>&gt; wrote:<br> &gt;&gt;<br> &gt;&gt; Am Sun, 3 Mar 2013 23:33:27 +1000<br> &gt;&gt; schrieb Manu &lt;<a href=3D"mailto:turkeyman gmail.com">turkeyman = gmail.com</a>&gt;:<br> &gt;&gt;<br> &gt;&gt; &gt; Hi people.<br> &gt;&gt; &gt;<br> &gt;&gt; &gt; So I&#39;ve been AWOL a while, and I&#39;ll still be intermit= tent for some<br> &gt;&gt; &gt; weeks yet, but I&#39;m trying to work on std.simd and also my= dconf talks<br> &gt;&gt; &gt; in any gaps I can.<br> &gt;&gt; &gt; However, in order to do a thorough job, I&#39;m missing some = tools. I<br> &gt;&gt; &gt; wonder if anyone can help me out...?<br> &gt;&gt; &gt;<br> &gt;&gt; &gt; I need to do some rather strenuous testing of SIMD code gen i= n D, to<br> &gt;&gt; &gt; make sure I don&#39;t make mistakes and/or lie.<br> &gt;&gt; &gt;<br> &gt;&gt; &gt; This requires testing against as many compilers+architectures= as I<br> &gt;&gt; &gt; can. I have barely any internet access to speak of, I don&#39= ;t really<br> &gt;&gt; &gt; know how, and I also don&#39;t run linux, so I can&#39;t prac= tically build<br> &gt;&gt; &gt; myself a suite of toolchains to work with &gt;_&lt;<br> &gt;&gt; &gt;<br> &gt;&gt; &gt; Ideally, I would really like all these toolchains:<br> &gt;&gt; &gt; =A0GDC: x86, x64, ARM, PPC, MIPS, SH4 &lt;- common toolchains= <br> &gt;&gt; &gt; =A0LDC: x86, x64, ARM, PPC &lt;- used by apple<br> &gt;&gt; &gt;<br> &gt;&gt; &gt; I wonder if anyone with know-how building GDC or LDC for wind= ows<br> &gt;&gt; &gt; could help me out by producing as many of these in binary as = possible?<br> &gt;&gt; &gt;<br> &gt;&gt; &gt; As a side note, I think it would be really valuable to keep a= cache<br> &gt;&gt; &gt; of such windows binaries somewhere on the net anyway, so anyo= ne<br> &gt;&gt; &gt; working on foreign platforms can get to work and actually foc= us on<br> &gt;&gt; &gt; platform support, without wasting all their time learning how= to<br> &gt;&gt; &gt; build these toolchains.<br> &gt;&gt; &gt;<br> &gt;&gt; &gt; I think Daniel Green who usually builds the windows GDC toolc= hains<br> &gt;&gt; &gt; actually builds them from linux? (which seems weird to me)<br=

&gt;&gt; &gt; Cheers people!<br> &gt;&gt; &gt;<br> &gt;&gt;<br> &gt;&gt; I could build the gdc toolchains, but I need some more information= :<br> &gt;&gt;<br> &gt;&gt; What OS should the toolchains target? Linux, windows or &quot;bare= -metal&quot;?<br> &gt;&gt; (Especially the x86 toolchains)<br> &gt;&gt;<br> &gt;&gt; Do you need libdruntime/libphobos or is a plain compiler enough? I= &#39;m<br> &gt;&gt; not sure if druntime compiles for SH4, MIPS and PPC.<br> &gt;<br> &gt;</p> <p>I did try testing this with QEMU, however the only reliable target that = can build gcc is ARM under emulation.</p> <p>The best method of doing this would be to have physical kit either donat= ed or bought through donations that can set-up as port boxes for anyone who= wants to port their D application over to architecture X. <br></p> <p>Regards<br> -- <br> Iain Buclaw</p> <p>*(p &lt; e ? p++ : p) =3D (c &amp; 0x0f) + &#39;0&#39;;<br> </p> --047d7bb70dfea699b904d716554a--
Mar 04 2013
prev sibling next sibling parent Johannes Pfau <nospam example.com> writes:
Am Mon, 4 Mar 2013 10:36:45 +1000
schrieb Manu <turkeyman 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
Mar 04 2013
prev sibling next sibling parent "David Nadlinger" <see klickverbot.at> writes:
On Sunday, 3 March 2013 at 13:57:15 UTC, Manu wrote:
 Ideally, I would really like all these toolchains:
  GDC: x86, x64, ARM, PPC, MIPS, SH4 <- common toolchains
  LDC: x86, x64, ARM, PPC <- used by apple

 I wonder if anyone with know-how building GDC or LDC for 
 windows could help
 me out by producing as many of these in binary as possible?

My dev laptop is being repaired right now, but I hope I'll be able to upload a recent MinGW build of LDC by the end of the week. I could build LLVM with all targets enabled, so you could at least do some basic codegen tests by manually specifying the target triple. See http://wiki.dlang.org/LDC for information on the ARM/PPC status. You might want to contact Kai directly, maybe he can easily provide you with a "real" PPC64 cross-compiler.
 As a side note, I think it would be really valuable to keep a 
 cache of such
 windows binaries somewhere on the net anyway, so anyone working 
 on foreign
 platforms can get to work and actually focus on platform 
 support, without
 wasting all their time learning how to build these toolchains.

In case of LDC, the main reason such binaries don't already exist, at least for the bare compiler, is that no Windows binaries exist at all (a MinGW preview will hopefully be available with the next release). Keep in mind, though, that any serious porting effort will likely require changes to the compiler source (e.g. custom ABI transformations), so the benefit of binaries for this specific use case will probably be limited. David
Mar 04 2013
prev sibling next sibling parent Manu <turkeyman gmail.com> writes:
--00248c768dc68fce0c04d719ff46
Content-Type: text/plain; charset=UTF-8

Wowzer! That's awesome! :)

So, I don't understand this whole crosstools-NG thing, how did you do that
so easily?

So, aside from doing these tests I'm working on now, let's say I were
working on some games console projects, how hard is it to integrate the
console patches (like the ones linked in my prior email) into this build
system to make actual working compilers for those platforms?
This seems like an amazing tool! But it'd be really awesome if it
maintained targets for games consoles too...


On 4 March 2013 22:57, Johannes Pfau <nospam example.com> wrote:

 Am Mon, 4 Mar 2013 10:36:45 +1000
 schrieb Manu <turkeyman 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

--00248c768dc68fce0c04d719ff46 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Wowzer! That&#39;s awesome! :)<div><br></div><div style>So= , I don&#39;t understand this whole crosstools-NG thing, how did you do tha= t so easily?</div><div style><br></div><div style>So, aside from doing thes= e tests I&#39;m working on now, let&#39;s say I were working on some games = console projects, how hard is it to integrate the console patches (like the= ones linked in my prior email) into this build system to make actual worki= ng compilers for those platforms?</div> <div style>This seems like an amazing tool! But it&#39;d be really awesome = if it maintained targets for games consoles too...</div></div><div class=3D= "gmail_extra"><br><br><div class=3D"gmail_quote">On 4 March 2013 22:57, Joh= annes Pfau <span dir=3D"ltr">&lt;<a href=3D"mailto:nospam example.com" targ= et=3D"_blank">nospam example.com</a>&gt;</span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex">Am Mon, 4 Mar 2013 10:36:45 +1000<br> schrieb Manu &lt;<a href=3D"mailto:turkeyman gmail.com">turkeyman gmail.com= </a>&gt;:<br> <div class=3D"im"><br> &gt; x86 and x64 are already available. I&#39;ve seen ARM builds kicking<br=

ot sure if<br> <div class=3D"im">&gt; they&#39;re up to date, but it&#39;s probably fine f= or me to use.<br> <br> </div>I included a new ARM build. Unfortunately ARM druntime broke when<br> upgrading to 2.062. We already had working cross-compilers with phobos<br> for ARM (raspberry pi).<br> <div class=3D"im"><br> &gt;<br> &gt; Linux or bare metal + no library for the others will suit me now.<br> &gt; Whatever&#39;s easiest.<br> <br> </div>OK, then linux<br> <div class=3D"im"><br> &gt;<br> &gt; Google seem to have a build script for building their Android ARM and<= br> &gt; MIPS toolchains:<br> &gt; <a href=3D"http://developer.android.com/tools/sdk/ndk/index.html" targ= et=3D"_blank">http://developer.android.com/tools/sdk/ndk/index.html</a><br> &gt; I wonder if the GDC frontend can be dropped in to their scripts<br> &gt; easily?<br> <br> </div>Unless you actually need android support building a crosstool-NG<br> toolchain is easier.<br> <div class=3D"im"><br> &gt; I guess the most important one in that case is PPC, since VMX is<br> &gt; really standard, it&#39;s a very common arch, and there&#39;s no exist= ing<br> &gt; toolchains for it.<br> &gt;<br> &gt; I remember talk of a build-server that automatically rebuilds<br> &gt; binaries of many toolchains each time a new release of D comes out<br> &gt; some time back, did that lead anywhere?<br> &gt;<br> &gt; In the future, it&#39;d be great to have a more complete set of offeri= ngs<br> &gt; linked from <a href=3D"http://dlang.org/download.html" target=3D"_blan= k">http://dlang.org/download.html</a><br> <br> </div>Once we have working crosstool-NG configurations updating the cross<b= r> compilers is trivial. I should set up a qemu image though so others can<br> easily build the packages as well. However I think a bare compiler<br> without druntime is only useful for very few people.<br> <br> <br> I&#39;ve uploaded the toolchains now. I verified that they can compile a<br=

actually works.<br> <br> Also attached a simple hello world. I guess you know this already but<br> you have to compile with -nophoboslib and make sure that gdc can find<br> the object.di file. The included object.di was just copied from my<br> local installation. It&#39;s not really used but the frontend does some<br> sanity checks on object.di now so an empty file doesn&#39;t work anymore.<b= r> Also make sure _Dmodule_ref is defined as in the test.d example file.<br> <br> <br> Some information about the toolchains:<br> GCC 4.7.2<br> GDC b8f5c22b0e7afa7e68a287ed788597e783540063 (2.062 frontend)<br> Endianness: Whatever was the default in ct-NG<br> <br> (All version identifiers from <a href=3D"http://dlang.org/version.html" tar= get=3D"_blank">http://dlang.org/version.html</a> should<br> work.)<br> <br> It&#39;s sometimes possible to change the endianness without recompiling gc= c<br> (e.g. for MIPS -EB and -EL flags.). I&#39;m not sure if this works though<b= r> as the C libraries are compiled with default endianness.<br> <br> All toolchains target 32bit processors. If you need 64bit targets just<br> tell me. Multilib is not enabled.<br> <br> <a href=3D"http://www.mediafire.com/?b8pgyvbotbgpd" target=3D"_blank">http:= //www.mediafire.com/?b8pgyvbotbgpd</a><br> <br> And here&#39;s an old release for Raspbian with druntime &amp; phobos:<br> <a href=3D"http://www.mediafire.com/?00d05h1gox9c50h" target=3D"_blank">htt= p://www.mediafire.com/?00d05h1gox9c50h</a><br> </blockquote></div><br></div> --00248c768dc68fce0c04d719ff46--
Mar 04 2013
prev sibling next sibling parent Johannes Pfau <nospam example.com> writes:
Am Tue, 5 Mar 2013 00:16:08 +1000
schrieb Manu <turkeyman gmail.com>:

 Wowzer! That's awesome! :)
 
 So, I don't understand this whole crosstools-NG thing, how did you do
 that so easily?
 
 So, aside from doing these tests I'm working on now, let's say I were
 working on some games console projects, how hard is it to integrate
 the console patches (like the ones linked in my prior email) into
 this build system to make actual working compilers for those
 platforms? This seems like an amazing tool! But it'd be really
 awesome if it maintained targets for games consoles too...
 

Crosstool-NG is a set of scripts & patches to built gcc cross compilers. It includes patches for common build problems, a nice GUI to configure the build and allows to build complicated cross compiler configurations (like building a toolchain which targets C (e.g. ARM), runs on B (e.g. Windows) and is compiled on B (e.g. Linux)). (The important part is that it's maintained and used by many people so it has patches for most of the problems you can run into. For example I ran into this problem when building devkitPro: http://crosstool-ng.org/hg/crosstool-ng/rev/372245834071) It can also build additional useful tools and libraries (like gdb, strace, ...) Integrating D is very easy, here are some instructions: http://gdcproject.org/wiki/Cross%20Compiler/crosstool-NG Adding console toolchains might be a little more difficult. Adding the GCC/binutils patches is simple (just copy them into the right folder), but you have to be careful making sure that gcc is built with exactly the same options as the current console toolchain (certainly doable). I'm not sure how good the newlib support is in crosstool-NG though, adding rules for newlib might be some extra work. But if I was a devkitPro developer I'd try to move the toolchain to crosstool-NG as it really simplifies building cross compilers.
Mar 06 2013
prev sibling next sibling parent "Kai Nacke" <kai redstar.de> writes:
On Monday, 4 March 2013 at 13:29:34 UTC, David Nadlinger wrote:
 On Sunday, 3 March 2013 at 13:57:15 UTC, Manu wrote:
 Ideally, I would really like all these toolchains:
 GDC: x86, x64, ARM, PPC, MIPS, SH4 <- common toolchains
 LDC: x86, x64, ARM, PPC <- used by apple

See http://wiki.dlang.org/LDC for information on the ARM/PPC status. You might want to contact Kai directly, maybe he can easily provide you with a "real" PPC64 cross-compiler.

Hi Manu, I uploaded a Win64-version of LDC to http://www.redstar.de/ldc/LDC.zip (md5: 5ae2c1c4b2c6e94e81b930b668a02cc4). It contains this version and targets: LDC - the LLVM D compiler (trunk): based on DMD v2.061 and LLVM 3.3svn Default target: x86_64-pc-win32 Host CPU: corei7 http://dlang.org - http://wiki.dlang.org/LDC Registered Targets: arm - ARM mips - Mips mips64 - Mips64 [experimental] mips64el - Mips64el [experimental] mipsel - Mipsel ppc32 - PowerPC 32 ppc64 - PowerPC 64 thumb - Thumb x86 - 32-bit X86: Pentium-Pro and above x86-64 - 64-bit X86: EM64T and AMD64 Maybe this is useful for you. Kai
Mar 09 2013
prev sibling parent Manu <turkeyman gmail.com> writes:
--e89a8f646a195b32bc04d79d8b66
Content-Type: text/plain; charset=UTF-8

On 10 March 2013 03:58, Kai Nacke <kai redstar.de> wrote:

 On Monday, 4 March 2013 at 13:29:34 UTC, David Nadlinger wrote:

 On Sunday, 3 March 2013 at 13:57:15 UTC, Manu wrote:

 Ideally, I would really like all these toolchains:
 GDC: x86, x64, ARM, PPC, MIPS, SH4 <- common toolchains
 LDC: x86, x64, ARM, PPC <- used by apple

might want to contact Kai directly, maybe he can easily provide you with a "real" PPC64 cross-compiler.

I uploaded a Win64-version of LDC to http://www.redstar.de/ldc/LDC.**zip<http://www.redstar.de/ldc/LDC.zip>(md5: 5ae2c1c4b2c6e94e81b930b668a02c **c4). It contains this version and targets: LDC - the LLVM D compiler (trunk): based on DMD v2.061 and LLVM 3.3svn Default target: x86_64-pc-win32 Host CPU: corei7 http://dlang.org - http://wiki.dlang.org/LDC Registered Targets: arm - ARM mips - Mips mips64 - Mips64 [experimental] mips64el - Mips64el [experimental] mipsel - Mipsel ppc32 - PowerPC 32 ppc64 - PowerPC 64 thumb - Thumb x86 - 32-bit X86: Pentium-Pro and above x86-64 - 64-bit X86: EM64T and AMD64 Maybe this is useful for you. Kai

Awesome Kai! Thanks so much! I think that covers the tools I need. Now I just need to find some down time to put it all together >_< --e89a8f646a195b32bc04d79d8b66 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">On 10 March 2013 03:58, Kai Nacke <span dir=3D"ltr">&lt;<a= href=3D"mailto:kai redstar.de" target=3D"_blank">kai redstar.de</a>&gt;</s= pan> wrote:<br><div class=3D"gmail_extra"><div class=3D"gmail_quote"><block= quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc= solid;padding-left:1ex"> <div class=3D"im">On Monday, 4 March 2013 at 13:29:34 UTC, David Nadlinger = wrote:<br> </div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l= eft:1px #ccc solid;padding-left:1ex"><div class=3D"im"> On Sunday, 3 March 2013 at 13:57:15 UTC, Manu wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> Ideally, I would really like all these toolchains:<br> GDC: x86, x64, ARM, PPC, MIPS, SH4 &lt;- common toolchains<br> LDC: x86, x64, ARM, PPC &lt;- used by apple<br> <br> </blockquote> <br></div><div class=3D"im"> See <a href=3D"http://wiki.dlang.org/LDC" target=3D"_blank">http://wiki.dla= ng.org/LDC</a> for information on the ARM/PPC status. You might want to con= tact Kai directly, maybe he can easily provide you with a &quot;real&quot; = PPC64 cross-compiler.<br> <br> </div></blockquote> <br> Hi Manu,<br> <br> I uploaded a Win64-version of LDC to <a href=3D"http://www.redstar.de/ldc/L= DC.zip" target=3D"_blank">http://www.redstar.de/ldc/LDC.<u></u>zip</a> (md5= : 5ae2c1c4b2c6e94e81b930b668a02c<u></u>c4). It contains this version and ta= rgets:<br> <br> LDC - the LLVM D compiler (trunk):<br> =C2=A0 based on DMD v2.061 and LLVM 3.3svn<br> =C2=A0 Default target: x86_64-pc-win32<br> =C2=A0 Host CPU: corei7<br> =C2=A0 <a href=3D"http://dlang.org" target=3D"_blank">http://dlang.org</a> = - <a href=3D"http://wiki.dlang.org/LDC" target=3D"_blank">http://wiki.dlang= .org/LDC</a><br> <br> =C2=A0 Registered Targets:<br> =C2=A0 =C2=A0 arm =C2=A0 =C2=A0 =C2=A0- ARM<br> =C2=A0 =C2=A0 mips =C2=A0 =C2=A0 - Mips<br> =C2=A0 =C2=A0 mips64 =C2=A0 - Mips64 [experimental]<br> =C2=A0 =C2=A0 mips64el - Mips64el [experimental]<br> =C2=A0 =C2=A0 mipsel =C2=A0 - Mipsel<br> =C2=A0 =C2=A0 ppc32 =C2=A0 =C2=A0- PowerPC 32<br> =C2=A0 =C2=A0 ppc64 =C2=A0 =C2=A0- PowerPC 64<br> =C2=A0 =C2=A0 thumb =C2=A0 =C2=A0- Thumb<br> =C2=A0 =C2=A0 x86 =C2=A0 =C2=A0 =C2=A0- 32-bit X86: Pentium-Pro and above<b= r> =C2=A0 =C2=A0 x86-64 =C2=A0 - 64-bit X86: EM64T and AMD64<br> <br> Maybe this is useful for you.<span class=3D"HOEnZb"><font color=3D"#888888"=
<br>

Kai<br> </font></span></blockquote></div><br></div><div class=3D"gmail_extra" style=
Awesome Kai! Thanks so much!</div><div class=3D"gmail_extra" style>I think=

just need to find some down time to put it all together &gt;_&lt;</div> </div> --e89a8f646a195b32bc04d79d8b66--
Mar 10 2013