Apple is officially moving away from Intel to a custom Arm chip

Adam D. Ruppe destructionator at gmail.com
Fri Jun 26 14:02:05 UTC 2020


On Friday, 26 June 2020 at 13:48:34 UTC, JN wrote:
> Is there a guide for how to create a binary working on 
> Raspberry Pi from Windows?

I have never actually tried it, but a process similar to how the 
android cross compiles work should do this as well.

1) get your Windows ldc set up

2) grab the arm-linux ldc package as well.

3) change your ldc.conf to use the libraries from the arm-linux 
package when targeting arm-linux

4) Compile with the argument to ldc `-mtriple 
arm-unknown-linux-gnueabi` or `-mtriple 
aarch64-unknown-linux-gnu` (32 vs 64 bit target) and you should 
be all set. (note you just use your normal Windows ldc, all that 
changes is this -mtriple argument to change the target. Or if 
compiling with dub, it is `dub -a platform_specifier_here`.)


Step 3 is the relatively painful one, for android, i made a 
program to do it automatically 
https://github.com/adamdruppe/d_android/blob/master/android-setup.d#L232


But we should lobby the ldc upstream to just include all the 
configs out of the box on all systems. Maybe the libraries are a 
separate download, but no reason not to put the config in so it 
just works out of the box for cross compile too.


More information about the Digitalmars-d mailing list