On Mon, 9 Mar 2020 at 13:48, Thorsten Glaser <t.gla...@tarent.de> wrote: > On Mon, 9 Mar 2020, Lisandro Damián Nicanor Pérez Meyer wrote: > > PIE implies PIE so (and here is what I miss wrote above) PIE should > > not be added if PIC was used. > > PIC implies PIE ;)
Ha! My IRC alternate nickname should be TypoMan. > > Moreover PIC is more suitable for libraries, so it should be the right > > choice here. > > The problem is that applications linked against Qt also need PIC, > not PIE. The pkg-config stuff gets this right, but the continued > insisting that -specs= stuff should be used to enable PIE on some > architectures due to disagreements between dpkg and gcc maintainers > causes PIE, if enabled in hardening, to be added too late on the > compiler command line (and not ignored if PIC was already given). Exactly, and in this cases one should filter out PIE. -- Lisandro Damián Nicanor Pérez Meyer http://perezmeyer.com.ar/ http://perezmeyer.blogspot.com/