[Issue 16794] New: Official .deb packages must compile libphobos2.a with -fPIC
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Nov 25 15:22:13 PST 2016
https://issues.dlang.org/show_bug.cgi?id=16794
Issue ID: 16794
Summary: Official .deb packages must compile libphobos2.a with
-fPIC
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: critical
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: hsteoh at quickfur.ath.cx
The latest versions of Debian / Ubuntu ship with gcc-6.2 configured with PIE by
default. Because of this, existing .deb packages of the dmd toolchain will not
be able to link D executables due to incompatibility between non-PIC code in
libphobos2.a and PIC code generated by default when gcc is invoked by dmd.
Recommend to change the official build scripts for .deb packages so that PIC=1
is specified by default for druntime/phobos builds, so that libphobos2.a is
compiled with -fPIC. Note that this will also require that the default
dmd.conf specify -fPIC in the default compiler flags, otherwise users may still
run into PIC/non-PIC incompatibility problems.
See also:
https://issues.dlang.org/show_bug.cgi?id=13149
https://issues.dlang.org/show_bug.cgi?id=15054
https://wiki.debian.org/Hardening
--
More information about the Digitalmars-d-bugs
mailing list