From: Todd C. Miller Date: Thu, 12 Jan 2012 18:19:36 +0000 (-0500) Subject: Build PIE executables for newer Debian and Ubuntu X-Git-Tag: SUDO_1_7_9~47 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7d9bc85bed6df5665508f8aca44db3037232eddf;p=sudo Build PIE executables for newer Debian and Ubuntu --HG-- branch : 1.7 --- diff --git a/mkpkg b/mkpkg index ca3b6b8bd..2c50cfc67 100755 --- a/mkpkg +++ b/mkpkg @@ -189,6 +189,14 @@ case "$osversion" in case "$osversion" in ubu*) configure_opts="${configure_opts}${configure_opts+$tab}--enable-admin-flag${tab}--without-lecture" + if [ $osrelease -ge 1004 ]; then + export CFLAGS="-O2 -g $F_PIE" LDFLAGS="-pie" + fi + ;; + deb*) + if [ $osrelease -ge 600 ]; then + export CFLAGS="-O2 -g $F_PIE" LDFLAGS="-pie" + fi ;; esac # Note, must indent with tabs, not spaces due to IFS trickery