Thread overview
LDC on OpenBSD
Dec 07
Samuel
Dec 07
kinke
December 07
I was wanting to run some D code on an OpenBSD server. I have already successfully built LDC 0.17. Does anyone have advice for getting started porting druntime? Should I just go through druntime/phobos and start adding OpenBSD definitions until it compiles successfully?
December 07
On Monday, 7 December 2020 at 19:49:15 UTC, Samuel wrote:
> Should I just go through druntime/phobos and start adding OpenBSD definitions until it compiles successfully?

That's one way; make sure to try to link the unittests too (`ninja druntime-ldc-debug phobos2-ldc-debug druntime-test-runner-debug phobos2-test-runner-debug`).

Grepping for `FreeBSD` (which is CI-tested) and adding/verifying OpenBSD declarations would be another approach.

Your patches should then be submitted to *upstream* druntime/Phobos. Thanks in advance!
December 11
On 2020-12-07 20:49, Samuel wrote:
> I was wanting to run some D code on an OpenBSD server. I have already successfully built LDC 0.17. Does anyone have advice for getting started porting druntime? Should I just go through druntime/phobos and start adding OpenBSD definitions until it compiles successfully?

Yes, unfortunately the platform specific code is not located in a single directory, as one could have hoped for. Both druntime and Phobos will have platform specific code scattered all over the place. Most of the platform specific code is in druntime. A lot of it will be bindings to C APIs.

-- 
/Jacob Carlborg