Re: shared libraries on OS X

2014-11-15 Thread Jacob Carlborg via Digitalmars-d
On 2014-11-14 16:26, Martin Nowak wrote: There is some Mach-O support to be notified (via a callback) when a new shared library is loaded. It wasn't possible to unset that callback though, meaning it would segfault when druntime itself is unloaded. Right, I keep forgetting that. -- /Jacob Car

Re: shared libraries on OS X

2014-11-15 Thread Jacob Carlborg via Digitalmars-d
On 2014-11-14 17:18, David Nadlinger wrote: 10.7. And IMHO the most useful documentation for actually getting stuff done is the ld source code (opensource.apple.com). There's also the source code for the compiler (Clang, LLVM) and the dynamic linker (dyld). -- /Jacob Carlborg

Re: shared libraries on OS X

2014-11-15 Thread Jacob Carlborg via Digitalmars-d
On 2014-11-14 17:40, Sean Kelly wrote: We're two releases into having native support for TLS in OSX now, so it probably is time to switch over. There have been four releases of OS X which support TLS, 10.7-10.10. -- /Jacob Carlborg

Re: shared libraries on OS X

2014-11-14 Thread Sean Kelly via Digitalmars-d
On Tuesday, 11 November 2014 at 17:24:31 UTC, Jacob Carlborg wrote: On 2014-11-11 15:05, Jacob Carlborg wrote: The first step would be to implement native TLS, see this issue [1]. BTW, the reason to implement native TLS is because otherwise we need to implement basically what the dynamic lin

Re: shared libraries on OS X

2014-11-14 Thread David Nadlinger via Digitalmars-d
On Friday, 14 November 2014 at 15:22:45 UTC, Martin Nowak wrote: What's the situation of native TLS? Any docs? What version of OSX is required? 10.7. And IMHO the most useful documentation for actually getting stuff done is the ld source code (opensource.apple.com). David

Re: shared libraries on OS X

2014-11-14 Thread Martin Nowak via Digitalmars-d
On 11/11/2014 03:05 PM, Jacob Carlborg wrote: There were some changes to the compiler as well, adding some hooks when a dynamic library is loaded. But that shouldn't be needed on OS X since the dynamic linker have native support for this. Yes, you need a constructor and destructor in each shar

Re: shared libraries on OS X

2014-11-14 Thread Martin Nowak via Digitalmars-d
On 11/11/2014 06:24 PM, Jacob Carlborg wrote: BTW, the reason to implement native TLS is because otherwise we need to implement basically what the dynamic linker is already doing for TLS our self. Since it would be nice to have native TLS support anyway I thought that was a better idea. What's

Re: shared libraries on OS X

2014-11-11 Thread Jacob Carlborg via Digitalmars-d
On 2014-11-11 15:05, Jacob Carlborg wrote: The first step would be to implement native TLS, see this issue [1]. BTW, the reason to implement native TLS is because otherwise we need to implement basically what the dynamic linker is already doing for TLS our self. Since it would be nice to hav

Re: shared libraries on OS X

2014-11-11 Thread Jacob Carlborg via Digitalmars-d
On 2014-11-11 11:42, John Colvin wrote: what's the status? I tried building druntime with 'make -f posix.mak dll' and got src/rt/sections.d(52): Error: static assert (is(typeof(__error) == void* function())) is false I'd be happy to put in some work to improve the situation, but a brief over

shared libraries on OS X

2014-11-11 Thread John Colvin via Digitalmars-d
what's the status? I tried building druntime with 'make -f posix.mak dll' and got src/rt/sections.d(52): Error: static assert (is(typeof(__error) == void* function())) is false I'd be happy to put in some work to improve the situation, but a brief overview of the status quo would be useful