[Issue 5278] gentoo's 'hardended' gcc doesn't work with dmd

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Nov 30 15:12:49 PST 2016


https://issues.dlang.org/show_bug.cgi?id=5278

hsteoh at quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh at quickfur.ath.cx

--- Comment #34 from hsteoh at quickfur.ath.cx ---
The only way I've found that works with statically-linked Phobos is to compile
druntime and phobos with PIC=1 so that libphobos.a is PIC, in addition to
putting -fPIC in dmd.conf (but not -defaultlib=libphobos.so, since that causes
phobos to be linked dynamically).  All other combinations seems to fail in one
place or another.

See: https://issues.dlang.org/show_bug.cgi?id=16794

Alternatively, it *may* be possible to get away with non-PIC libphobos.a if
there's a way to coax dmd to invoke gcc (used as the linker) with -no-pie.  I
tried -L-no-pie but that didn't seem to do the trick either.  Probably
something else is needed to make it work.

--


More information about the Digitalmars-d-bugs mailing list