On Monday, 22 April 2013 at 17:22:50 UTC, Timofei Bolshakov wrote:
Hi, Dawid!

On Thursday, 23 February 2012 at 15:25:59 UTC, Dawid Ciężarkiewicz wrote:
Hi,

# Introduction

I've started some initial work to get a working GDC crosscompiler
targeting ARM platforms. Currently I'm able to compile the
toolchain and produce a working "Hello World!" binary that I'm
able to execute on my BeagleBoard developement platform with
ArchLinux installed. The generated assembly looks sane,
unfortunately the program hangs, but I'm able to debug it in gdb
and I see it loops somewhere at:

      2261    in
/home/dpc/lab/d-cross/test-tc-1/.build/src/gcc-4.6.2/libphobos/gc/gcx.d
=> 0x2f950 <_D2gc3gcx2GC6mallocMFkkPkZPv+648>: str r2,
[r4, r9, lsl #2]

I'm going to investigate this and possibly fix with time. Anyone interested in getting this to work seamlessly is kindly requested
to join efforts and share the results.


# How to compile

There's a crosstool-ng tool that is a great way to assemble and
build (cross-)toolchains. I've added some hacks to integrate the
gdc repository and thus add a gdc support.

I've pushed the forked crosstools-ng here:

https://bitbucket.org/xdpcx/crosstool-ng-dlang/

(I prefer git, but original crosstools-ng is using hg, so I
sticked with it).

Grab that code and learn to how to use ct-ng.

Basically installing crosstool-ng it's just a metter of
downloading and doing:

      ./bootstrap
      ./configure
      make
      make install

(I use `./configure --prefix="$HOME/opt"` for home-local
configuration.)

This will give you `ct-ng` command that you can use in any
directory

     cd ~/my/toolchain/buildir
     mkdir src
     cp ~/config/that/i/prepared/for/you/config .config
     ct-ng menuconfig
     ct-ng build
     ls arm-none-linux-eabi

I attach the mentioned config.

Actually, as I don't know how to attach it I've put it here:
http://pastebin.ca/2121043

I tried to do that and build failed:

[DEBUG]    ==> Executing: 'sh' './gcc/d/setup-gcc.sh'
[ALL  ]    This version of GCC (4.4) is not supported.

do you have somewhere corrected code / config?


If anyone is interested I could upload the compiled binaries
somewhere, as the toolchain is static.

I will greatly appreciate that!



I have the same trouble.
And I don't know how resolve it..
I tried to change config "/$HOME/opt/lib/ct-ng.hg+../config/cc/gcc.in" by added gcc 4.7.0 support, but this way compile has another errors:

[INFO ]  Installing C library
[INFO ]  Installing C library: done in 441.77s (at 17:52)
[INFO ] =================================================================
[INFO ]  Installing final compiler
[WARN ] Building d language(s) is not yet supported. Will try...
[ERROR]    configure: error:
[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing final compiler'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@172] [ERROR] >> called from: do_cc_backend[scripts/build/cc/gcc.sh@753]
[ERROR]  >>        called from: do_cc[scripts/build/cc/gcc.sh@525]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@597]
[ERROR]  >>


Reply via email to