www.digitalmars.com         C & C++   DMDScript  

D.gnu - Question around druntime/phobos and GDC

reply "Daniel Harper" <djharperuk gmail.com> writes:
One of the things I've encountered when trying to compile GDC for 
OSX is an issue with the following file

https://github.com/D-Programming-GDC/GDC/blob/master/libphobos/libdruntime/core/thread.d

This issue was noticed by a guy a few months ago on the old 
BitBucket repository

https://bitbucket.org/goshawk/gdc/issue/357/definition-of-_tls_data_array-with-version

His suggestion for a fix worked for me and I was able to compile 
GDC for OSX 10.8 quite easily.

The question I have is, what repository do I send a pull request 
to, to fix this? Is the "druntime" element of GDC different from

https://github.com/D-Programming-Language/druntime

?

Or are they kept (roughly) in sync?
Sep 20 2012
parent reply Iain Buclaw <ibuclaw ubuntu.com> writes:
On 20 September 2012 20:50, Daniel Harper <djharperuk gmail.com> wrote:
 One of the things I've encountered when trying to compile GDC for OSX is an
 issue with the following file

 https://github.com/D-Programming-GDC/GDC/blob/master/libphobos/libdruntime/core/thread.d

 This issue was noticed by a guy a few months ago on the old BitBucket
 repository

 https://bitbucket.org/goshawk/gdc/issue/357/definition-of-_tls_data_array-with-version

 His suggestion for a fix worked for me and I was able to compile GDC for OSX
 10.8 quite easily.

 The question I have is, what repository do I send a pull request to, to fix
 this? Is the "druntime" element of GDC different from

 https://github.com/D-Programming-Language/druntime

 ?

 Or are they kept (roughly) in sync?
It's mostly kept in sync, however each compiler implements their own runtime folders (libdruntime/rt) TLS is an implementation detail and requires support of the compiler, so send anything relating to it to GDC. However, hold your horses. Just having a quick look at the issue reported (I don't look at bitbucket anymore) what they suggest does not solve the problem. GDC doesn't use _tls_data_array, so you are working around it, rather than fixing GDC-OSX runtime, which will still be potentially broken because it is not handled in the way GDC's TLS implementation works for OSX. Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
Sep 20 2012
next sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2012-09-21 01:30, Iain Buclaw wrote:

 It's mostly kept in sync, however each compiler implements their own
 runtime folders (libdruntime/rt)

 TLS is an implementation detail and requires support of the compiler,
 so send anything relating to it to GDC.  However, hold your horses.
 Just having a quick look at the issue reported (I don't look at
 bitbucket anymore) what they suggest does not solve the problem.  GDC
 doesn't use _tls_data_array, so you are working around it, rather than
 fixing GDC-OSX runtime, which will still be potentially broken because
 it is not handled in the way GDC's TLS implementation works for OSX.
BTW, does GCC/GDC support the native TLS implementation on Mac OS X 10.7 and later? -- /Jacob Carlborg
Sep 20 2012
parent Iain Buclaw <ibuclaw ubuntu.com> writes:
On 21 September 2012 07:15, Jacob Carlborg <doob me.com> wrote:
 On 2012-09-21 01:30, Iain Buclaw wrote:

 It's mostly kept in sync, however each compiler implements their own
 runtime folders (libdruntime/rt)

 TLS is an implementation detail and requires support of the compiler,
 so send anything relating to it to GDC.  However, hold your horses.
 Just having a quick look at the issue reported (I don't look at
 bitbucket anymore) what they suggest does not solve the problem.  GDC
 doesn't use _tls_data_array, so you are working around it, rather than
 fixing GDC-OSX runtime, which will still be potentially broken because
 it is not handled in the way GDC's TLS implementation works for OSX.
BTW, does GCC/GDC support the native TLS implementation on Mac OS X 10.7 and later? -- /Jacob Carlborg
In the build directory: grep HAVE_AS_TLS gcc/* If defined as true, then you should have proper tls support. Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
Sep 21 2012
prev sibling parent "Daniel Harper" <djharperuk gmail.com> writes:
On Thursday, 20 September 2012 at 23:29:39 UTC, Iain Buclaw wrote:
 On 20 September 2012 20:50, Daniel Harper 
 <djharperuk gmail.com> wrote:
 One of the things I've encountered when trying to compile GDC 
 for OSX is an
 issue with the following file

 https://github.com/D-Programming-GDC/GDC/blob/master/libphobos/libdruntime/core/thread.d

 This issue was noticed by a guy a few months ago on the old 
 BitBucket
 repository

 https://bitbucket.org/goshawk/gdc/issue/357/definition-of-_tls_data_array-with-version

 His suggestion for a fix worked for me and I was able to 
 compile GDC for OSX
 10.8 quite easily.

 The question I have is, what repository do I send a pull 
 request to, to fix
 this? Is the "druntime" element of GDC different from

 https://github.com/D-Programming-Language/druntime

 ?

 Or are they kept (roughly) in sync?
It's mostly kept in sync, however each compiler implements their own runtime folders (libdruntime/rt) TLS is an implementation detail and requires support of the compiler, so send anything relating to it to GDC. However, hold your horses. Just having a quick look at the issue reported (I don't look at bitbucket anymore) what they suggest does not solve the problem. GDC doesn't use _tls_data_array, so you are working around it, rather than fixing GDC-OSX runtime, which will still be potentially broken because it is not handled in the way GDC's TLS implementation works for OSX. Regards
Ah I see, I'm not to well versed in GDC yet so I'm not really sure what the implications of my "workaround" actually were. The bug still exists though, if you try and compile GDC (4.7) on OSX then it won't compile (it complains about missing symbols in relation to _tls_data_array) Does anyone have any ideas on how to fix this?
Sep 24 2012