From 7d9bc85bed6df5665508f8aca44db3037232eddf Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 12 Jan 2012 13:19:36 -0500 Subject: [PATCH] Build PIE executables for newer Debian and Ubuntu --HG-- branch : 1.7 --- mkpkg | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 2.40.0