gdc-4.5 testing

Anders F Björklund afb at algonet.se
Wed Dec 22 04:17:06 PST 2010


Iain Buclaw wrote:
>>> AFAIK both shared libraries and x86_64 code have been working
>>> for years with GDC, even though that is not the case with DMD.

>> But you can't link shared obj to static lib (Phobos), except on i386 - so
>> you really can't use shared obj on x86_64 (if you need phobos).
>
> As far as I'm aware, the #1 reason why (for GDC, at least) Phobos can't be
> compiled as shared is because of inline asm clobbering the PIC register (EBX on
> i386). Because we're not smart enough (LDC likely suffers from this also), in
> some instances EBX can be wrongly marked as being clobbered too.

Ah, OK. That sounds like a different problem than "can't link"...
Does this also affect other shared libraries, without inline asm ?

Compiling Phobos as a shared library also seems to be a somewhat
different issue from compiling user D code as a shared library.

--anders


More information about the Digitalmars-d mailing list