On 15 November 2013 09:45, Paulo Pinto <pjmlp@progtools.org> wrote:
On Friday, 15 November 2013 at 09:20:18 UTC, Joakim wrote:
On Friday, 15 November 2013 at 08:54:21 UTC, Paulo Pinto wrote:
On Friday, 15 November 2013 at 08:24:55 UTC, Joakim wrote:
Would it make sense to use dmd for linux/x86 to cross-compile to Android/x86 or is this a job for ldc/gdc only?

I would say ldc/gdc only, as LLVM/gcc are the supported NDK toolchains and dmd lacks an ARM backend.

Yeah, I'm aware of these facts, but I don't think they matter.  For one, dmd not having an ARM backend doesn't impact me since I'm targeting Android/x86 for now, :) as stated earlier.  I don't think it's relevant what toolchains are integrated into the NDK as, for example, the Free Pascal compiler can now compile to Android and it isn't based on gcc or llvm:

http://wiki.freepascal.org/Android

I think the bigger issue is that llvm/gcc and therefore ldc/gdc have support for cross-compilation, but I don't know the status of cross-compiling support with dmd.

Yes, but FreePascal already had an ARM backend before they started with Android, and cross-compiling support infrastructure.

As far as I know dmd does not support cross compiling.

--
Paulo


-m32/-m64 is the closest you'll get to a cross-compilation in dmd. ;-)

--
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';