]> granicus.if.org Git - sudo/commitdiff
configure will not add -O2 to CFLAGS if it is already defined to
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 16 Mar 2011 17:38:58 +0000 (13:38 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 16 Mar 2011 17:38:58 +0000 (13:38 -0400)
add -O2 to the CFLAGS we pass in when PIE is being used.

mkpkg

diff --git a/mkpkg b/mkpkg
index 7c4599dd9db26409cd07ba0791ce984742e28ea0..5de95b166fa29ae15c92c04ee01b96a503388d79 100755 (executable)
--- a/mkpkg
+++ b/mkpkg
@@ -116,7 +116,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
@@ -140,7 +140,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"