From: Todd C. Miller Date: Wed, 16 Mar 2011 17:38:48 +0000 (-0400) Subject: configure will not add -O2 to CFLAGS if it is already defined to X-Git-Tag: SUDO_1_7_6~45 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=419bfafbee02c5e0399b574781a3523c6a4a9639;p=sudo configure will not add -O2 to CFLAGS if it is already defined to add -O2 to the CFLAGS we pass in when PIE is being used. --HG-- branch : 1.7 --- diff --git a/mkpkg b/mkpkg index 174f20c6a..3e848e2f7 100755 --- a/mkpkg +++ b/mkpkg @@ -107,7 +107,7 @@ case "$osversion" in prefix=/usr if [ $osrelease -ge 50 ]; then # RHEL 5 and up build pies and have audit support - export CFLAGS="$F_PIE" LDFLAGS="-pie" + export CFLAGS="-O2 $F_PIE" LDFLAGS="-pie" configure_opts="${configure_opts}${configure_opts+$tab}--with-linux-audit" PPVARS="${PPVARS}${PPVARS+$space}linux_audit=1.4.0" fi @@ -131,7 +131,7 @@ case "$osversion" in prefix=/usr if [ $osrelease -ge 10 ]; then # SLES 10 and higher build pies - export CFLAGS="$F_PIE" LDFLAGS="-pie" + export CFLAGS="-O2 $F_PIE" LDFLAGS="-pie" if [ $osrelease -ge 11 ]; then # SLES 11 and higher has SELinux configure_opts="${configure_opts}${configure_opts+$tab}--with-selinux"