[dmd-internals] DragonFlyBSD Support
Jonathan M Davis via dmd-internals
dmd-internals at puremagic.com
Sat Aug 19 19:31:06 PDT 2017
On Saturday, August 19, 2017 23:21:50 Dave MacFarlane via dmd-internals
wrote:
> Hello,
>
> I'm trying to add support for DragonFlyBSD to dmd, but I'm running
> into an issue that I'm not sure how to move forward on..
>
> I've compiled a version of ldc's ltsmaster branch (after adding
> support to druntime and phobos), and using it I'm able to compile dmd
> (after adding support to druntime and phobos in HEAD, rather than
> ltsmaster..), but the compiled dmd isn't able to link anything. It
> gets a bunch of errors of the form "error: TLS relocation against
> invalid instruction" (the complete log of the errors is at
> https://gist.github.com/driusan/6a04060c234806d3fbb2625759bd55a4)
>
> From what I can tell, the symbols like _d_arrayappendcTX are supposed
> to be added from dmd, but for some reason aren't (I might be
> misreading the errors, though..)
Well, grepping druntime's source, it's in src/rt/lifetime.d. From my limited
understanding of how dmd and druntime interact, I'd expect druntime to be
the one generating the actual object code for it, whereas dmd just
references it, but it's going to have to be linked in regardless, and
normally druntime is part of the library file for Phobos when it's built,
meaning that you'd probably have to have Phobos available, even if it's not
being used by dmd at the moment. I really don't know how all of that works
with cross-compiling, and dmd's switch to D makes all of this more
complicated. We really need some sort of guide for it, but I don't know
who'd write it. Fortunately, it's not an issue that's likely to come up all
that often, but as you'd know better than I would, it's still going to be
pretty painful to get a new platform going without it.
- Jonathan M Davis
More information about the dmd-internals
mailing list