Starting D with a project in mind.

Stefan Frijters sfrijters at gmail.com
Mon Oct 14 03:07:53 PDT 2013


On Monday, 14 October 2013 at 07:36:03 UTC, Andrew wrote:
> Thanks Stefan, those were the instructions that I tried.
>
> With GDC, is it possible to generate portable intermediate C 
> code so that I can compile D sources on the Mac and then just 
> copy the resultant C code to an ARM debian machine and build 
> that there ?
>
> That would allow me to work around the problem of not being 
> able to build D directly on the target system.
>
> Thanks

Hi, I actually managed to build GDC over the weekend, directly on
the RPi. It required some small changes to the process as
compared to [1]:

- Fresh raspbian install (same).
- Installed the packages (same).
- Set up swap USB HD (same).
- I got gcc-4.8.1 release sources, didn't apply the patches
(seems they are already in place now), nor did I rerun the
autoconf.

I then proceeded to clone GDC, run the scripts and build, however
I ran into a set of bugs[2]. I tried to get around those with my
limited knowledge but got stuck. Luckily Johannes Pfau has been
doing some great work as usual and already fixed these problems
(mostly) in his fork / ARM branch [3]. So I redid this part of
the process, with a fresh GCC source directory, using a clone of
his fork, and the compilation ran to completion. A small test
program also worked, but Johannes warned that there is some
codegen issue in his fork, which is why he hasn't opened a pull
request to merge into GDC proper yet[2]. I don't know the details
of that but this might be good enough for now for your purposes.
I assume that by the time 2.064 comes around and GDC's frontend
is update one can go back to the main GDC master branch, as most
fixes are already in druntime as well.

Cheers,

Stefan

[1]
http://gdcproject.org/wiki/Raspberry%20Pi/build/Raspbian%28Hardfloat%29/GCC-Devel
[2] http://bugzilla.gdcproject.org/show_bug.cgi?id=80
[3] https://github.com/jpf91/GDC/tree/arm


More information about the Digitalmars-d-learn mailing list