Hitchikers Guide to Porting Phobos / D Runtime to other architectures
Johannes Pfau
nospam at example.com
Wed Dec 4 07:18:47 PST 2013
Am Wed, 04 Dec 2013 08:29:11 +0100
schrieb "Joakim" <joakim at airpost.net>:
> On Tuesday, 3 December 2013 at 21:39:20 UTC, Johannes Pfau wrote:
> > Am Tue, 03 Dec 2013 16:30:10 +0100
> > schrieb "Joakim" <joakim at airpost.net>:
> >
> >> On Tuesday, 3 December 2013 at 15:13:36 UTC, Johannes Pfau
> >> wrote:
> >> > Am Tue, 03 Dec 2013 12:26:57 +0100
> >> > schrieb "Joakim" <joakim at airpost.net>:
> >> >
> >> >> Seems like you got pretty far with your Android port: are
> >> >> you planning on submitting any of these patches back
> >> >> upstream?
> >> >
> >> > At some point, probably yes. However, I want to get the
> >> > 'easy' stuff
> >> > working first. This means a stable and well-tested
> >> > ARM/Linux/glibc
> >> > build should be available first. (It makes more sense this
> >> > way as we
> >> > still have/had some ARM codegen bugs in the compiler.)
> >>
> >> OK, anything against putting your incomplete Android port
> >> online someplace, say on github? I'm working on an
> >> Android/x86 port now, that way we could work together and
> >> submit our patches together. This would especially allay
> >> Iain's concerns about future conflicts between Android/x86 and
> >> Android/ARM patches. My work is publicly available here:
> >>
> >> https://github.com/joakim-noah/druntime/tree/android
> >
> > Sure, here's the code:
> >
> > Android stuff, but I guess 99% of it is obsolete now
> > https://github.com/jpf91/GDC/commits/android
> Are these all your patches to druntime? For example, you
> mentioned earlier that you "had to rewrite the complete core.stdc
> bindings," but there are only three small patches to core.stdc in
> the above branch:
>
> https://github.com/jpf91/GDC/commit/d807f9d8a1cc51efe8b14a48d6a294174dc92168
Hmm, it's possible that I didn't push those changes to github. I might
have some backups of that stuff, but I'm not sure. (IIRC I had another
git project for that where I experimented with the 'ports' idea)
>
> You also mentioned porting the GC, but there are no patches for
> that. I thought you'd gotten further along on an Android port
> based on your earlier comments. It appears that we hit the same
> stderr issues though. :)
'porting' is an overstatement. The GC is already quite portable, all I
did was adding functions to get the stack top / bottom on Android.
(Stack top is actually handled in a generic way in gdc).
See
https://github.com/jpf91/GDC/blob/428a7573896962acfdd8132465b1f4af0ff3aea8/d/druntime/rt/memory.d#L119
and search for Android. (Of course no real testing was done and the GC
could still be broken in other ways. But stack-scanning should work,
TLS scanning is portable anyway and heap scanning should work as well)
More information about the Digitalmars-d
mailing list