<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 6 June 2015 at 18:33, Iain Buclaw <span dir="ltr"><<a href="mailto:ibuclaw@gdcproject.org" target="_blank">ibuclaw@gdcproject.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div class="h5"><div class="gmail_extra"><div class="gmail_quote">On 6 June 2015 at 18:18, Dan Olson via D.gnu <span dir="ltr"><<a href="mailto:d.gnu@puremagic.com" target="_blank">d.gnu@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>"Iain Buclaw via D.gnu" <<a href="mailto:d.gnu@puremagic.com" target="_blank">d.gnu@puremagic.com</a>> writes:<br>
<br>
</span>> On 5 June 2015 at 08:40, Dan Olson via D.gnu <<a href="mailto:d.gnu@puremagic.com" target="_blank">d.gnu@puremagic.com</a>><br>
<div><div>> wrote:<br>
>><br>
>> Sorry for a long chain on OSX. But one last unresolved symbol from<br>
> make<br>
>> check-d: "_d_osx_image_init". Is it just a placeholder or is it<br>
> hidden<br>
>> somewhere. Does gdc still need the code to set setup gc scanning?<br>
> How<br>
>> is TLS on OSX? - if not ready, would emutls work?<br>
>> --<br>
>> Dan<br>
><br>
</div></div><span>> I hope I'm not shying you away by saying, this is what someone needs<br>
> to find out.<br>
><br>
</span><span>> I'd first suggest to build gcc only and test what is outputted. Use a<br>
> test program such as __thread int tls; and a main program that sets<br>
> it's value to 0xdeadbeef then build with -S and check if the output<br>
> shows calls to emutls like functions.<br>
><br>
> GDC already has GC support for emutls, so the interesting part is if<br>
> GCC does native tls on osx.<br>
<br>
</span>GCC with vanilla configure is generating emutls calls for OSX.<br>
</blockquote></div><br></div></div></div><div class="gmail_extra">So, we can safely remove all references to _d_osx_image_init from rt.memory, but keep the second version(OSX) as you don't want a static assert. ;-)<br></div></div>
</blockquote></div><br></div><div class="gmail_extra">But just to self reflect on that, maybe in it's place inline the old memory_osx but with TLS sections/handling removed:<br><a href="https://github.com/D-Programming-GDC/GDC/blob/0907d30b8a45036a7497d284d3210b899122cce6/libphobos/libdruntime/rt/memory_osx.d">https://github.com/D-Programming-GDC/GDC/blob/0907d30b8a45036a7497d284d3210b899122cce6/libphobos/libdruntime/rt/memory_osx.d</a><br><br></div><div class="gmail_extra">Is probably something like this:  <a href="http://dpaste.dzfl.pl/e55824cab9c3">http://dpaste.dzfl.pl/e55824cab9c3</a><br><br></div></div>