On 08-04-2012 21:08, Iain Buclaw wrote:
I got asked whether there are any porting hints for phobos on other
architectures the other day from the debian GCC maintainers. So I
gathered this must be at least a dedicated wiki or article to be written
up on the subject. :)

I know there are a few working on porting gdc and associated libraries
over to ARM (with my assistance from the compiler side). So please tell,
what are your experiences? Successes? Failures? What tips would you give
to someone wanting to port to their own architecture?

Regards
Iain

For the love of god, use D_LP64. I cannot count how many times X86 and X86_64 (and similar pairs) have been misused for this.

Don't rely on extern (D) for inline asm in any capacity. It differs across compilers, architectures, bitnesses, and OSs (this is one seriously stupid aspect of the language).

Not so much for when you're porting, but as a help for others who might have to port platform-specific code you're writing: *Always* include an else block for the unsupported case that static asserts.

--
- Alex

Reply via email to