On 2017-12-13 14:26, Diederik de Groot via dmd-internals wrote:
On Wednesday, 13 December 2017 at 12:15:07 UTC, Diederik de Groot
wrote:
After this project is done, i will have another look at dmd-cxx to see
what is causing the issues i have been seeing when compiling on linux
(x86_64).
For example: '/usr/bin/ld:
/data/develop/dmd/dmd-cxx/druntime/lib/libdruntime-linux64.a(config.o):
relocation R_X86_64_32 against undefined symbol `__dmd_personality_v0'
can not be used when making a shared object; recompile with -fPIC'
Most likely these will be related to PIC/PIE issues on hardened
platforms. See: https://github.com/dlang/dmd/pull/7420. So to fix
these i would have to backport some of these PR's to dmd-cxx.
Yes, the OS hardening is rather annoying:/
Btw -fPIC also needs to be added to druntime (and Phobos, but building
Phobos isn't essential for bootstrapping).
Though, I don't think that the overhead of PIE on 32-bit systems will be
an issue for the intermediate bootstrap compiler and thus it doesn't
need to be as complicated as for master:
https://github.com/dlang/druntime/pull/1880
https://github.com/dlang/druntime/pull/1974
https://github.com/dlang/phobos/pull/5586
https://github.com/dlang/phobos/pull/5868
https://github.com/dlang/phobos/pull/5868
https://github.com/dlang/dmd/pull/7002
https://github.com/dlang/dmd/pull/7420
https://github.com/dlang/dmd/pull/7427
https://github.com/dlang/dmd/pull/7433
So simply add -fPIC to DFLAGS or maybe even hard-code it like it's done
for macOS:
https://github.com/dlang/dmd/blob/master/src/ddmd/mars.d#L465
_______________________________________________
dmd-internals mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-internals
_______________________________________________
dmd-internals mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-internals