www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16794] New: Official .deb packages must compile libphobos2.a


          Issue ID: 16794
           Summary: Official .deb packages must compile libphobos2.a with
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: critical
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: hsteoh 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:


Nov 25 2016