Bug#859368: gdal shouldn't disable PIE

Adrian Bunk bunk at debian.org
Sun Apr 2 20:15:05 UTC 2017

Source: gdal
Version: 2.1.2+dfsg-3
Severity: important
Tags: patch

With gcc in stretch defaulting to PIE, hardening=+all,-pie changed
semantics from "enable hardening but not PIE" to "enable all hardening
and explicitely disable the default PIE".
The latter is usually not intended.

For packages like gdal that include static libraries the situation
is even worse, since non-PIE static libraries cannot be used with
the stretch gcc unless -no-pie is explicitly passed when linking.

The -pie in hardening flags was in some cases required in pre-stretch
releases to avoid build failures caused by (incorrectly) passing -fPIE
to the compiler when building shared libraries or plugins.
This problem does no longer exist.

Please apply the following change:

--- debian/rules.old	2017-04-02 19:23:02.000000000 +0000
+++ debian/rules	2017-04-02 19:23:08.000000000 +0000
@@ -9,7 +9,7 @@
 #export DH_VERBOSE=1
 # Enable hardening build flags
-export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 UPSTREAM_VERSION = $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p' | sed -e 's/\+.*//; s/^[0-9]://')

More information about the Pkg-grass-devel mailing list