Thread overview
MIPS32 target LDC cross-compiling toolchain builds with LDC 1.11.0-beta1
Jul 16
kinke
July 16
hi all,

I just Did a test for building LDC cross-compiling toolchain for MIPS32 target, and It built and also successfully run the demo code "Print hex dump" from dlang.org.

bellow is my building instructions:

-----
# the gcc toolchain I used is mipsel-linux-gcc.
#

# building the LDC2 mips32 runtime.
CC=mipsel-linux-gcc proxychains ldc-build-runtime --dFlags="-w;-mtriple=mipsel-linux;-march=mipsel;-mcpu=mips32" --cFlags="-march=mips32" --targetSystem="Linux;UNIX"


# tweak the toolchain
mv ldc-build-runtime.tmp mips32-ldc-runtime

LDC2_RUNTIME_MIPS32=${SOME_PATH_xxxx}/mips32-ldc-runtime
alias ldcls232='ldc2 -mtriple="mipsel-linux" -march=mipsel -mcpu=mips32 -gcc=mipsel-linux-gcc -L=-L${LDC2_RUNTIME_MIPS32}/lib'
-----

The toolchain was tested on a Loongson 1C board, and "Print hex dump" demo code works great!

Great thanks to the LDC team!


~~~~~~
thanks!


July 16
On Monday, 16 July 2018 at 09:25:08 UTC, dangbinghoo wrote:
> bellow is my building instructions:
>
> -----
> # the gcc toolchain I used is mipsel-linux-gcc.
> #
>
> # building the LDC2 mips32 runtime.
> CC=mipsel-linux-gcc proxychains ldc-build-runtime --dFlags="-w;-mtriple=mipsel-linux;-march=mipsel;-mcpu=mips32" --cFlags="-march=mips32" --targetSystem="Linux;UNIX"
>
>

sorry, ignore  `proxychains`, as in China, I need network proxy to access github.

thanks!


July 16
On Monday, 16 July 2018 at 09:25:08 UTC, dangbinghoo wrote:
> The toolchain was tested on a Loongson 1C board, and "Print hex dump" demo code works great!

Great, thanks for experimenting and letting us know! I added your ldc-build-runtime command-line as further example to the Wiki page [1], excl. the `-march` flag, which I guess is superfluous.

[1] https://wiki.dlang.org/Building_LDC_runtime_libraries#Usage_for_cross-compilation