www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - MIPS32 target LDC cross-compiling toolchain builds with LDC

reply dangbinghoo <dangbinghoo gmail.com> writes:
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:

-----




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



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!
Jul 16 2018
next sibling parent dangbinghoo <dangbinghoo gmail.com> writes:
On Monday, 16 July 2018 at 09:25:08 UTC, dangbinghoo wrote:
 bellow is my building instructions:

 -----




 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!
Jul 16 2018
prev sibling parent kinke <noone nowhere.com> writes:
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
Jul 16 2018