March 16, 2012 OpenBSD port of dmd? | ||||
---|---|---|---|---|
| ||||
Just found this, has anyone tried dmd or friends on OpenBSD? http://stackoverflow.com/questions/9698581/programming-in-d-for-openbsd Thanks, Andrei |
March 16, 2012 Re: OpenBSD port of dmd? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Fri, 16 Mar 2012 15:53:45 +0100, Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote: > Just found this, has anyone tried dmd or friends on OpenBSD? > > http://stackoverflow.com/questions/9698581/programming-in-d-for-openbsd > OpenBSD would need some druntime work. |
March 16, 2012 Re: OpenBSD port of dmd? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | Am 16.03.2012 15:53, schrieb Andrei Alexandrescu:
> Just found this, has anyone tried dmd or friends on OpenBSD?
>
> http://stackoverflow.com/questions/9698581/programming-in-d-for-openbsd
>
>
> Thanks,
>
> Andrei
>
It is a bit off-topic, but I have started to look at a possible port to Minix 3.2.0, which now has NetBSD userland.
But currently I am only playing around with the dmd source code.
--
Paulo
|
March 16, 2012 Re: OpenBSD port of dmd? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On 3/16/2012 7:53 AM, Andrei Alexandrescu wrote:
> Just found this, has anyone tried dmd or friends on OpenBSD?
>
> http://stackoverflow.com/questions/9698581/programming-in-d-for-openbsd
There was a start on an OpenBSD port, but it hasn't progressed very far. It shouldn't be hard - if someone wants to pick up the flag on this and run with it, I'd be happy to fold in the changes.
|
March 16, 2012 Re: OpenBSD port of dmd? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Martin Nowak | "Martin Nowak" <dawg@dawgfoto.de> wrote in message news:op.wa9r9izqsqugbd@localhost... > On Fri, 16 Mar 2012 15:53:45 +0100, Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote: > >> Just found this, has anyone tried dmd or friends on OpenBSD? >> >> http://stackoverflow.com/questions/9698581/programming-in-d-for-openbsd >> > OpenBSD would need some druntime work. Do you have anything in particular in mind? |
March 16, 2012 Re: OpenBSD port of dmd? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky | On Friday, March 16, 2012 16:00:47 Nick Sabalausky wrote:
> "Martin Nowak" <dawg@dawgfoto.de> wrote in message news:op.wa9r9izqsqugbd@localhost...
>
> > On Fri, 16 Mar 2012 15:53:45 +0100, Andrei Alexandrescu
> >
> > <SeeWebsiteForEmail@erdani.org> wrote:
> >> Just found this, has anyone tried dmd or friends on OpenBSD?
> >>
> >> http://stackoverflow.com/questions/9698581/programming-in-d-for-openbsd
> >
> > OpenBSD would need some druntime work.
>
> Do you have anything in particular in mind?
Probably everything that's not straight Posix would require changes. For instance, every place that has a version(FreeBSD) block would probably need a version(OpenBSD) block. It's probably not all that hard to make the changes, but they'd still need to be done.
The very fact that Walter pushes for the model of
version(A) {}
else version(B) {}
else static assert("Unsupported OS");
means that _any_ new OS requires druntime work, even if it's minimal. That's not necessarily a bad thing, since there's a definite chance that the new OS requires additional changes specific to it anyway, but as long as there is sections of druntime are OS-specific without generic versions provided (which isn't going to change), you can't just use druntime with a new OS without updating druntime.
- Jonathan M Davis
|
March 16, 2012 Re: OpenBSD port of dmd? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Am Fri, 16 Mar 2012 12:08:01 -0700
schrieb Walter Bright <newshound2@digitalmars.com>:
> On 3/16/2012 7:53 AM, Andrei Alexandrescu wrote:
> > Just found this, has anyone tried dmd or friends on OpenBSD?
> >
> > http://stackoverflow.com/questions/9698581/programming-in-d-for-openbsd
>
> There was a start on an OpenBSD port, but it hasn't progressed very far. It shouldn't be hard - if someone wants to pick up the flag on this and run with it, I'd be happy to fold in the changes.
AFAICS OpenBSD doesn't support TLS (the __thread tls, posix pthread_getspecific works of course). Can D work at all without TLS support?
(We have a similar problem with Android, I know for sure TLS isn't
supported there.)
|
March 16, 2012 Re: OpenBSD port of dmd? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johannes Pfau | On Mar 16, 2012, at 2:19 PM, Johannes Pfau wrote:
> Am Fri, 16 Mar 2012 12:08:01 -0700
> schrieb Walter Bright <newshound2@digitalmars.com>:
>
>> On 3/16/2012 7:53 AM, Andrei Alexandrescu wrote:
>>> Just found this, has anyone tried dmd or friends on OpenBSD?
>>>
>>> http://stackoverflow.com/questions/9698581/programming-in-d-for-openbsd
>>
>> There was a start on an OpenBSD port, but it hasn't progressed very far. It shouldn't be hard - if someone wants to pick up the flag on this and run with it, I'd be happy to fold in the changes.
>
> AFAICS OpenBSD doesn't support TLS (the __thread tls, posix pthread_getspecific works of course). Can D work at all without TLS support?
>
> (We have a similar problem with Android, I know for sure TLS isn't
> supported there.)
OSX pre-Lion doesn't support __thread either, so DMD rolls its own there. The same functionality could probably be used for OpenBSD.
|
March 16, 2012 Re: OpenBSD port of dmd? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | On 3/16/2012 1:38 PM, Jonathan M Davis wrote:
> That's not necessarily a bad thing,
It's very deliberate, and it's *certainly* not a bad thing. No ifs, ands, or buts about it.
Supporting a new OS by assuming that declarations for some other random OS will work is a recipe for unending frustration and disaster. For example, suppose there is a subtle difference in the layout of the FILE* struct. OOPS!
The way the versioning is done it:
1. forces the porter to check that stuff.
2. exposes all the places in the library where there is OS dependent code
There should never, EVER, in the library code be something like:
version (FreeBSD)
... do something weird with FreeBSD ...
else
... do the default ...
If you find any code like this in the library, please file a bugzilla entry for it.
Instead:
version (FreeBSD)
... do something weird with FreeBSD ...
else
static assert(0, "OS not supported");
|
March 16, 2012 Re: OpenBSD port of dmd? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On 3/16/12 5:27 PM, Walter Bright wrote:
> There should never, EVER, in the library code be something like:
>
> version (FreeBSD)
> ... do something weird with FreeBSD ...
> else
> ... do the default ...
>
> If you find any code like this in the library, please file a bugzilla
> entry for it.
>
> Instead:
>
> version (FreeBSD)
> ... do something weird with FreeBSD ...
> else
> static assert(0, "OS not supported");
Never say never. There are I/O routines that are specialized for several OSs and fall back to a generic (slower) implementation.
Andrei
|
Copyright © 1999-2021 by the D Language Foundation