Building for ARM with LDC

Joakim via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Mon Sep 15 00:33:25 PDT 2014


On Thursday, 11 September 2014 at 21:48:43 UTC, Joakim wrote:
> On Thursday, 11 September 2014 at 21:44:29 UTC, Joakim wrote:
>> More good news, the sieve.d sample file from dmd's repo now 
>> not only compiles fine against phobos but doesn't spit out 
>> junk output anymore, ie it works.  I wish all ldc problems 
>> could just be solved by an llvm upgrade like this. ;)
>
> Yikes, spoke too soon, it prints out the first line and then 
> segfaults.  I guess this is an improvement over junk output.

Got the segfault in the sieve program to go away by changing the 
default calling convention for all linkage types in gen/abi.cpp 
to C, just as Kai did on PPC64.  I don't get any "Aborted" tests 
now either.

One issue cropping up in std.format appears to be with structs 
that use alias this for a member, specifically these two:

https://github.com/D-Programming-Language/phobos/blob/master/std/format.d#L1307
https://github.com/D-Programming-Language/phobos/blob/master/std/format.d#L1748

The first one returns false, the second one returns a junk number 
for the imaginary component of the complex number.  Not sure why 
it fails for some structs that use alias this and not others, 
going to look into it.

Another issue is that the dwarf output for debugging might be 
corrupted somehow.  If I compile sieve.d and have it run fine 
against non-debug druntime/phobos, it then segfaults in different 
places if I link it against debug druntime or phobos, which are 
simply compiled with the -g flag.

Finally, many modules still claim that they assert in a test in 
std.format, when std.format itself says that test passes, weird.


More information about the digitalmars-d-ldc mailing list