July 17, 2014
>> http://lld.llvm.org/#current-status
>
> Does LDC employ this linker?

No. It's alpha.
July 18, 2014
> LDC also needs to be built with an ARM Thumb LLVM backend. I did this, but I lost my script files :(  I'll have to recreate them.  I remember it being much simpler than GDC.  I've asked the LDC folks to include an ARM Thumb backend in their release, but I don't think they've done it yet.  On Arch Linux, the LDC package seems to already include ARM Thumb:
>
> ldc2 --version
> LDC - the LLVM D compiler (0.13.0):
>   based on DMD v2.064 and LLVM 3.4.2
>   Default target: x86_64-unknown-linux-gnu
>   Host CPU: corei7
>   http://dlang.org - http://wiki.dlang.org/LDC
>
>   Registered Targets:
>     aarch64  - AArch64 (ARM 64-bit target)
>     arm      - ARM
>     cpp      - C++ backend
>     hexagon  - Hexagon
>     mips     - Mips
>     mips64   - Mips64 [experimental]
>     mips64el - Mips64el [experimental]
>     mipsel   - Mipsel
>     msp430   - MSP430 [experimental]
>     nvptx    - NVIDIA PTX 32-bit
>     nvptx64  - NVIDIA PTX 64-bit
>     ppc32    - PowerPC 32
>     ppc64    - PowerPC 64
>     ppc64le  - PowerPC 64 LE
>     r600     - AMD GPUs HD2XXX-HD6XXX
>     sparc    - Sparc
>     sparcv9  - Sparc V9
>     systemz  - SystemZ
>     thumb    - Thumb
>     x86      - 32-bit X86: Pentium-Pro and above
>     x86-64   - 64-bit X86: EM64T and AMD64
>     xcore    - XCore
>
>
> Mike


C:\Users\xxx>ldc2 --version
LDC - the LLVM D compiler (0.13.0):
  based on DMD v2.064 and LLVM 3.4.2
  Default target: i686-pc-mingw32
  Host CPU: penryn
  http://dlang.org - http://wiki.dlang.org/LDC

  Registered Targets:
    x86    - 32-bit X86: Pentium-Pro and above
    x86-64 - 64-bit X86: EM64T and AMD64

C:\Users\xxx>

windows platform only two target?

Registered Targets:
    x86    - 32-bit X86: Pentium-Pro and above
    x86-64 - 64-bit X86: EM64T and AMD64
???
July 19, 2014
Hi master!

On Friday, 18 July 2014 at 13:32:44 UTC, master wrote:
>
> windows platform only two target?
>

As there are still serious problems with cross compiling we do only provide binaries for x86 / x86_64 targets.

As soon as I have fixed the floating point issue (see https://github.com/ldc-developers/ldc/pull/643) it makes sense to provide binaries with more targets.

Regards,
Kai
August 11, 2014
On Saturday, 19 July 2014 at 18:51:16 UTC, Kai Nacke wrote:
> Hi master!
>
> On Friday, 18 July 2014 at 13:32:44 UTC, master wrote:
>>
>> windows platform only two target?
>>
>
> As there are still serious problems with cross compiling we do only provide binaries for x86 / x86_64 targets.
>
> As soon as I have fixed the floating point issue (see https://github.com/ldc-developers/ldc/pull/643) it makes sense to provide binaries with more targets.

Can you make available whatever scripts/patches/config you're currently using to cross-compile for ARM?  I want to try it out, in preparation for getting Android/ARM working.
August 12, 2014
Hi Joakim!

On Monday, 11 August 2014 at 09:44:56 UTC, Joakim wrote:
> On Saturday, 19 July 2014 at 18:51:16 UTC, Kai Nacke wrote:
>> Hi master!
>>
>> On Friday, 18 July 2014 at 13:32:44 UTC, master wrote:
>>>
>>> windows platform only two target?
>>>
>>
>> As there are still serious problems with cross compiling we do only provide binaries for x86 / x86_64 targets.
>>
>> As soon as I have fixed the floating point issue (see https://github.com/ldc-developers/ldc/pull/643) it makes sense to provide binaries with more targets.
>
> Can you make available whatever scripts/patches/config you're currently using to cross-compile for ARM?  I want to try it out, in preparation for getting Android/ARM working.

For cross-compiling you need to use the pull request 643. Setting CC to the right gcc compiler (gcc-linux-arm) should be all you have to do.

Regards,
Kai
August 12, 2014
On Tuesday, 12 August 2014 at 04:38:09 UTC, Kai Nacke wrote:
> Hi Joakim!
>
> On Monday, 11 August 2014 at 09:44:56 UTC, Joakim wrote:
>> On Saturday, 19 July 2014 at 18:51:16 UTC, Kai Nacke wrote:
>>> Hi master!
>>>
>>> On Friday, 18 July 2014 at 13:32:44 UTC, master wrote:
>>>>
>>>> windows platform only two target?
>>>>
>>>
>>> As there are still serious problems with cross compiling we do only provide binaries for x86 / x86_64 targets.
>>>
>>> As soon as I have fixed the floating point issue (see https://github.com/ldc-developers/ldc/pull/643) it makes sense to provide binaries with more targets.
>>
>> Can you make available whatever scripts/patches/config you're currently using to cross-compile for ARM?  I want to try it out, in preparation for getting Android/ARM working.
>
> For cross-compiling you need to use the pull request 643. Setting CC to the right gcc compiler (gcc-linux-arm) should be all you have to do.

Thanks for the info, I'll try your pull request.

What does setting CC to gcc-linux-arm do, invoke the ARM linker?  How do I make sure druntime/phobos are compiled for ARM?

Just so it's clear, I want to compile ldc as a linux/x86 binary that will generate ARM code on an x86 host, then compile druntime, phobos, and their unit tests as ARM libraries/binaries to deploy to an ARM target.
August 13, 2014
Hi Joakim!

On Tuesday, 12 August 2014 at 04:51:00 UTC, Joakim wrote:
> On Tuesday, 12 August 2014 at 04:38:09 UTC, Kai Nacke wrote:
>> Hi Joakim!
>>
>> On Monday, 11 August 2014 at 09:44:56 UTC, Joakim wrote:
>>> On Saturday, 19 July 2014 at 18:51:16 UTC, Kai Nacke wrote:
>>>> Hi master!
>>>>
>>>> On Friday, 18 July 2014 at 13:32:44 UTC, master wrote:
>>>>>
>>>>> windows platform only two target?
>>>>>
>>>>
>>>> As there are still serious problems with cross compiling we do only provide binaries for x86 / x86_64 targets.
>>>>
>>>> As soon as I have fixed the floating point issue (see https://github.com/ldc-developers/ldc/pull/643) it makes sense to provide binaries with more targets.
>>>
>>> Can you make available whatever scripts/patches/config you're currently using to cross-compile for ARM?  I want to try it out, in preparation for getting Android/ARM working.
>>
>> For cross-compiling you need to use the pull request 643. Setting CC to the right gcc compiler (gcc-linux-arm) should be all you have to do.
>
> Thanks for the info, I'll try your pull request.
>
> What does setting CC to gcc-linux-arm do, invoke the ARM linker?  How do I make sure druntime/phobos are compiled for ARM?

Yes, the CC setting is used to invoke the linker.

> Just so it's clear, I want to compile ldc as a linux/x86 binary that will generate ARM code on an x86 host, then compile druntime, phobos, and their unit tests as ARM libraries/binaries to deploy to an ARM target.

Cross-compiling druntime/phobos is possible but untried. You
could try to setup host and target compilers in CMakeList.txt or
you could build a small script to compile all .d modules into a
library. There is no out-of-the-box solution.
(Currently I build ldc on an ARM box and avoid the cross
compiling scenario.)

Regards,
Kai
August 14, 2014
On Wednesday, 13 August 2014 at 16:21:28 UTC, Kai Nacke wrote:
> Cross-compiling druntime/phobos is possible but untried. You
> could try to setup host and target compilers in CMakeList.txt or
> you could build a small script to compile all .d modules into a
> library. There is no out-of-the-box solution.
> (Currently I build ldc on an ARM box and avoid the cross
> compiling scenario.)

OK, I figured.  I'll try something similar to what Dan did on iOS (http://forum.dlang.org/thread/m2txc2kqxv.fsf@comcast.net), as he didn't have that native compilation option either.
August 26, 2014
On Thursday, 14 August 2014 at 01:56:04 UTC, Joakim wrote:
> On Wednesday, 13 August 2014 at 16:21:28 UTC, Kai Nacke wrote:
>> Cross-compiling druntime/phobos is possible but untried. You
>> could try to setup host and target compilers in CMakeList.txt or
>> you could build a small script to compile all .d modules into a
>> library. There is no out-of-the-box solution.
>> (Currently I build ldc on an ARM box and avoid the cross
>> compiling scenario.)
>
> OK, I figured.  I'll try something similar to what Dan did on iOS (http://forum.dlang.org/thread/m2txc2kqxv.fsf@comcast.net), as he didn't have that native compilation option either.

An update: by simply following in Dan's footsteps for iOS, but with slightly different flags for linux/ARM, I've been able to build an x86 ldc binary and an ARM druntime/phobos in a linux/x86 VM and deploy to a linux/ARM device. :)

I'm able to build the dmd sample program sieve.d for ARMv7 with all three combinations of ldc alone, ldc and druntime, and ldc and phobos, with small modifications to sieve.d for writing output for each case.  The first two combos produce an executable that runs fine on linux/ARM, the one with phobos seems to run and then prints out junk output.

I had to apply the real/long-double pull #643 to get phobos to compile for ARM.  Right now, I push the objects and static libraries to the linux/ARM target and link them using the native linker, as I didn't want to mess with trying to figure out how to get the x86 linker to link for ARM yet.

I'm going to try cross-compiling and running the unit tests next.  What should I expect?

I'll try merging David's old patch for ARM exception-handling from issue #489 at some point.
August 26, 2014
On Tuesday, 26 August 2014 at 11:54:02 UTC, Joakim wrote:
> On Thursday, 14 August 2014 at 01:56:04 UTC, Joakim wrote:
>> On Wednesday, 13 August 2014 at 16:21:28 UTC, Kai Nacke wrote:
>>> Cross-compiling druntime/phobos is possible but untried. You
>>> could try to setup host and target compilers in CMakeList.txt or
>>> you could build a small script to compile all .d modules into a
>>> library. There is no out-of-the-box solution.
>>> (Currently I build ldc on an ARM box and avoid the cross
>>> compiling scenario.)
>>
>> OK, I figured.  I'll try something similar to what Dan did on iOS (http://forum.dlang.org/thread/m2txc2kqxv.fsf@comcast.net), as he didn't have that native compilation option either.
>
> An update: by simply following in Dan's footsteps for iOS, but with slightly different flags for linux/ARM, I've been able to build an x86 ldc binary and an ARM druntime/phobos in a linux/x86 VM and deploy to a linux/ARM device. :)
>
> I'm able to build the dmd sample program sieve.d for ARMv7 with all three combinations of ldc alone, ldc and druntime, and ldc and phobos, with small modifications to sieve.d for writing output for each case.  The first two combos produce an executable that runs fine on linux/ARM, the one with phobos seems to run and then prints out junk output.
>
> I had to apply the real/long-double pull #643 to get phobos to compile for ARM.  Right now, I push the objects and static libraries to the linux/ARM target and link them using the native linker, as I didn't want to mess with trying to figure out how to get the x86 linker to link for ARM yet.
>
> I'm going to try cross-compiling and running the unit tests next.
>  What should I expect?

I still have trouble with binaries compiled without optimization. Using -O1 or higher works.

> I'll try merging David's old patch for ARM exception-handling from issue #489 at some point.

I merged the easy part of the patch so expect some merge conflicts.

BTW: sounds real cool!

Regards,
Kai