Am Sun, 13 Jul 2014 12:10:28 +0200
schrieb "Joseph Rushton Wakeling via D.gnu" <d.gnu@puremagic.com>:

> Hello all,
> 
> Is there a simple/trivial way to ensure that when I build GDC, I
> build not only the native target for my machine (x86_64) but also the
> arm-linux-gnueabi target?
> 
> I decided it was time to start pulling out Adam Ruppe's embedded
> programming guide, and as a decidedly non-embedded programmer, the
> instructions here:
> http://wiki.dlang.org/Bare_Metal_ARM_Cortex-M_GDC_Cross_Compiler
> 
> ... are not something I'm confident in just following (not least
> because e.g. certain scripts are provided without much indication of
> what they should be called, where they should be placed, or how to
> use them).
> 
> What I'd really like is just to have arm-linux-gnueabi as another
> target built in the normal process of compiling and installing GDC,
> not something I have to organize separately from my normal GDC build.
> 
> Can anyone advise?
> 
> Thanks & best wishes,
> 
>       -- Joe

AFAIK that's not possible with GCC right now. One GCC build always
targets one main architecture.

Is there any reason why you can't use the binaries from
http://gdcproject.org/downloads/ ?


I assume you want a cross compiler? For native compilers on ARM
machines you can just use the usual instructions:
http://wiki.dlang.org/GDC/Installation/Generic

For cross compilers you must build at least binutils so this is more
complicated. The
http://wiki.dlang.org/Bare_Metal_ARM_Cortex-M_GDC_Cross_Compiler only
apply if you want an embedded compiler, i.e. you don't use linux/glibc.

For linux/glibc things are even more complicated. I'll have to refer
you to standard GCC-cross compiler tutorials, compiling cross-gdc is
exactly the same as compiling cross-gcc.

The simplest way to build such cross-compilers is with crosstool-NG:
http://wiki.dlang.org/GDC/Cross_Compiler/crosstool-NG
I also build the binaries at http://gdcproject.org/downloads/ with
crosstool-NG.

Reply via email to