Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #1637 (new enhancement)

Opened 15 years ago

Last modified 14 years ago

support for (cross) compiling for arm using ldc

Reported by: fdv Assigned to: lindquist
Priority: normal Milestone: 1.0
Component: Tango Version: trunk
Keywords: arm Cc: fdv, larsivi

Description

Trying to compile the ldc runtime for (linux) arm (on linux), and the "user" library - libtango-user-ldc.a, currently fails with asserts like "Architecture not supported." in Thread.d and gcx.d, and the class CpuInfoArm in Cpuid.d is also missing.

For the "user" library, modifications are needed in tango/stdc/constants and __jmp_buf needs to be defined for arm in setjmp.d.

The size for __jmp_buf, as well as the assembly for gcx.d and Thread.d are quite optimistic attempts as far as I'm concerned. Hopefully, someone with proper knowledge of the underlying design and platform, and the arm architecture, will be able to improve on it.

There are quite probably other things missing as well. With the modifications in the attached patch, I am able to cross compile and run trivial programs with this setup, but more advanced programs fail (runtime, they do compile) with difficult-to-debug crashes. I am afraid the stack is not trustworthy, but that's just a hunch.

Versions used:

  • tango is svn rev. 4633.
  • ldc is hg rev. 1299:847b767b2d0b, from Mon May 04 13:32:16 2009 +0200.
  • llvm is svn rev. 71100 (earlier revisions fail to build).
  • I'm also using arm_gcc-4.2.2_glibc-2.7_i686-linux-1.

Ticket #1636 also sort of blocks this one, as it is currently required for compilation.

Attachments

tango.patch (8.9 kB) - added by fdv on 05/08/09 11:22:59.
arm-support.patch

Change History

05/08/09 11:22:59 changed by fdv

  • attachment tango.patch added.

arm-support.patch

05/08/09 12:19:57 changed by fawzi

  • status changed from new to assigned.
  • owner changed from kris to fawzi.

11/29/09 12:05:20 changed by fawzi

  • owner changed from fawzi to kris.
  • status changed from assigned to new.

01/12/10 07:28:12 changed by kris

  • cc set to fdv, larsivi.
  • milestone changed from 0.99.9 to 1.0.

I'm afraid the patch is now a bit outdated ... can you perhaps provide an update?

04/24/10 22:25:17 changed by kris

  • owner changed from kris to lindquist.

is there someone in the LDC group who could own this, lindquist?