gdc-4.5 testing

Neal Becker ndbecker2 at gmail.com
Tue Dec 21 14:10:35 PST 2010


Anders F Björklund wrote:

> Neal Becker 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.
>>>
>>> Phobos is still static, though.
>>>
>> 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).
> 
> I don't get it, it shouldn't be that much different from a
> static libstdc++ or something. You do need libgcc_s.so for
> the exceptions to be thrown correctly, but otherwise your
> application would be linking to Phobos anyway I thought...
> 
> Do you have some more advanced example than the toy tests ?
> 
> And it's possibly a *good* thing that Phobos is only a
> static library, if it's not API/ABI-stable and ready...
> It's easier to handle the code bloat than the dll hell.
> But it does make for bigger executables than C++ does.
> 
> The size of the wxD executables was ridiculous, though. :-P
> 
> --anders

IIUC, the issue isn't exactly shared vs static lib, it's linking -fPIC code 
to a lib that is non-PIC code.  You can't link PIC code to non-PIC code 
except on i386.

http://www.technovelty.org/code/c/amd64-pic.html


More information about the Digitalmars-d mailing list