[Gc] GC on 64 bit linux
hans.boehm at hp.com
Wed Aug 29 13:44:18 PDT 2007
There is currently no profound reason that the 64-bit version only
supports static libraries; I just ran out of time to work on the other
I think the only profound incompatibility is between THREAD_LOCAL_ALLOC
and a call to GC_use_DllMain(). I think you should be able to build
with GC_DLL and THREAD_LOCAL_ALLOC, though you may have to patch the
test program to support that. You will just have to make sure that
thread creation etc. calls into the appropriate GC routines, rather than
calling the Windows routines directly. Or you have to do without
THREAD_LOCAL_ALLOC. (The code handling thread-local allocation buffers
at thread entry and exit is not prepared to run in a state in which it
can't safely acquire the allocation lock. It would be hard to make it
run from DllMain. Preallocating all that state for the maximum number
of threads wouldn't be ideal either.)
My inclination would be to generate a 64-bit dll makefile.
NT_THREADS_MAKEFILE is enough of a mess at this point (it was originally
automatically generated and then manually hacked) that I would be
tempted to start with NT_X64_STATIC_THREADS_MAKEFILE, and copy the few
relevant lines from NT_THREADS_MAKEFILE.
> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Friedrich Dominicus
> Sent: Wednesday, August 29, 2007 7:50 AM
> To: Gc at napali.hpl.hp.com
> Subject: [Gc] GC on 64 bit linux
> I have tried to compile the library for Windows 64 bit on
> AMD64 and got it principally working with MSVC. However it
> seems I can not linkg against this static library with other
> compilers. So now I've though on how to make the GC library
> available for me.
> I tried first to wrap around the static library. But it cause
> the DLL to crash while creating a new thread (that is not
> really a suprise) I searched through the sources and found
> that GC_DLL and THREAD_LOCAL_ALLOC seem to be incompatible.
> Now what is the most promising way to get this library run
> under 64 bit and other compilers but MSVC?
> 1) Adapt the 32-bit dll makefile for the 64-bit system?
> 2) Writing wrapper around the static library and encapsulate
> the needed calls to thread initialzation functions somehow?
> (suggestsions on how to do that would be very appriciated)
> 3) other ways I have not thought of
> With best regards
> Gc mailing list
> Gc at linux.hpl.hp.com
More information about the Gc