How to build a set of toolchains for cross-compiling for LDC?

Kai Nacke via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Sun Jun 28 11:14:12 PDT 2015


On Sunday, 28 June 2015 at 14:03:15 UTC, Majestio wrote:
> Hi all!
>
> I apologize in advance for my English, I use Google Translator 
> :-\
>
> I became interested in the D programming language recently. I 
> want build a comfortable environment for cross-compilation. In 
> my Linux Funtoo already has a similar environment for C/C++ 
> based http://mxe.cc:
>
> i686-w64-mingw32.shared
> i686-w64-mingw32.static
> x86_64-w64-mingw32.shared
> x86_64-w64-mingw32.static
>
> ... and more libs, including Qt 5.4.2 for each toolchain.
>
> So far I have built native LDC, and native "Hello world" is 
> compiled and linked successfully.
>
> Actually, the question is how to build step by step for the 
> environment LDC for  cross-compile, similar MXE?
>
> Just in case, my directory structure:
>
> /home/majestio/dev/cross/mxe - C/C++ cross-compile env
> /home/majestio/dev/cross/llvm - LLVM,Clang,LDC
>
> WBR

Hi Majestio!

You need to compile LLVM for the targets you want. With USE flag 
multitarget, LLVM is build for all available targets. Then 
rebuild LDC with this LLVM.

I described cross-compiling for AArch64 here: 
http://forum.dlang.org/post/fhwvxatxezkafnalwhqr@forum.dlang.org

Regards,
Kai


More information about the digitalmars-d-ldc mailing list