Building for ARM with LDC

Joakim via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Tue Sep 2 02:44:28 PDT 2014


On Saturday, 30 August 2014 at 21:58:18 UTC, David Nadlinger via 
digitalmars-d-ldc wrote:
> When I last tried (which was a _long_ time ago), there were 
> still some random crashes in the unit tests that looked like 
> they were caused by an error during unwinding.

If you mean random in the sense that the same test will sometimes 
pass and sometimes crash, I haven't seen that.

> Back then, my guess was that there might be a subtle mistake in 
> the ARM-specific unwinding definitions (type size, field 
> alignment, …) or an unhandled special case in the code. It's 
> probably fairly easy to figure out with a more methodical look 
> at the issue, but I was in "get something to work, now" mode 
> when I hacked up the patch.
>
> Let me know if there are any questions regarding EH that I 
> might be able to help you with.

I haven't actually looked at either the real/longdouble patch or 
your EH patch other than skimming them yet, just applied the two 
and tried different ways of building the resulting source.  I've 
now tried building with gcc and clang, both native and 
cross-compile for each, and find almost no difference in the test 
runs done each of the four ways.  This seems to indicate that a 
cross-compile is just as good as native compilation, which is 
great because I can cross-compile much faster on a single core of 
my core i5 than natively compiling ldc and the unit tests on the 
dual Cortex-A7 cores of the Cubieboard2 I'm testing on.

The std.string.sformat issue with the phobos tests that I 
mentioned earlier was in a static ctor for std.net.curl.  Once I 
removed that module from the test runner, I got 4 phobos modules' 
tests to pass, 10 modules assert in a test somewhere, 44 seg 
fault, and 8 say they "Aborted," so I'm 4/69 on the phobos unit 
tests right now (I got std.traits to compile with a small fix).  
Is that about what you guys got when you ran the phobos tests on 
ARM before?

I can't say if EH is the main issue or if there are other porting 
issues, as I haven't started looking into the details yet.


More information about the digitalmars-d-ldc mailing list