On Wednesday 19 August 2015 23:31:12 Markus Koschany wrote: [snip] > Hi, > > I discovered that freeciv, particularly the freeciv-qt client, fails to > build from source when I enable all hardening build flags including > -fPIE,-pie (position independent executable). This has never been an > issue before and it seems this regression surfaced with the > introduction of GCC-5.
Right, but sadly it's (arguably) not a Qt bug (see below). > I think Qt's -reduce-relocation option reduces our ability to harden > our binaries. To workaround this bug I had to change from > > export DEB_BUILD_MAINT_OPTIONS = hardening=+all > > to > > export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie Actually that should have been -fPIC > This appears to be not the best solution and Freeciv is not the only > affected package: > > https://bugs.debian.org/792592 Pino: the "right" fix here is passing -fPIC instead of -fPIE > There are similar bug reports for other distributions: > > https://bugs.archlinux.org/task/45283 > > and there is also a related GCC-5 bug report > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 > > According to the changelog this regression might have been introduced > on 24 July 2015 by Rohan Garg. I'm not sure about the severity but I > would really like to see the old behaviour again. Actually this behavior was introduced by me while uploading 5.4.2 to the archive. The problem is actually that gcc's upstream do not consider the gcc bug you noted above as a bug. Thus Qt's upstream developer Thiago Macieira had no option but to require using -fPIC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886#c30 So with my maintainer hat on I consider this not a bug: you need to pass -fPIC to the applications that build against qt. If you really think it should be different then please do as suggested in the Arch linux's bug report: complain to upstream at https://bugreports.qt.io/browse/QTBUG-45755 or at their mailing list developm...@qt-project.org. If you get to convince upstream of this believe me we won't have any problems in changing whatever is necessary. The real fix here is to make gcc work again with both -fPIC and -Wl,- Bsymbolic, and, as you say, see the old behavior again. Kinds regards, Lisandro. -- Lisandro Damián Nicanor Pérez Meyer http://perezmeyer.com.ar/ http://perezmeyer.blogspot.com/
signature.asc
Description: This is a digitally signed message part.