diff options
author | Ken Raeburn <raeburn@mit.edu> | 2008-08-07 21:46:34 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2008-08-07 21:46:34 +0000 |
commit | b27cda4fcd995f65eb8141532f25b12fa3da96d6 (patch) | |
tree | b1dae34b5880d4864332d3cd6790fd1225f53953 /src/aclocal.m4 | |
parent | 015371d10a34b6fafa97c6eee9ee48dd38b924d5 (diff) | |
download | krb5-b27cda4fcd995f65eb8141532f25b12fa3da96d6.zip krb5-b27cda4fcd995f65eb8141532f25b12fa3da96d6.tar.gz krb5-b27cda4fcd995f65eb8141532f25b12fa3da96d6.tar.bz2 |
New config option to enable size optimizations
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20636 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/aclocal.m4')
-rw-r--r-- | src/aclocal.m4 | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 10803cc..859529e 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -1,5 +1,5 @@ AC_PREREQ(2.52) -AC_COPYRIGHT([Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 +AC_COPYRIGHT([Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008 Massachusetts Institute of Technology. ]) dnl @@ -610,11 +610,24 @@ if test "$GCC" = yes; then krb5_cv_prog_gnu_ld=yes fi fi]) +AC_ARG_WITH([size-optimizations], +[ --with-size-optimizations enable a few optimizations to reduce code size + possibly at some run-time cost], +, +withval=no) +if test "$withval" = yes; then + AC_DEFINE(CONFIG_SMALL,1,[Define to reduce code size even if it means more cpu usage]) +fi # maybe add -Waggregate-return, or can we assume that actually works by now? # -Wno-long-long, if needed, for k5-platform.h without inttypes.h etc. extra_gcc_warn_opts="-Wall -Wcast-qual -Wcast-align -Wconversion -Wshadow" # -Wmissing-prototypes if test "$GCC" = yes ; then + # Putting this here means we get -Os after -O2, which works. + if test "$with_size_optimizations" = yes; then + AC_MSG_NOTICE(adding -Os optimization option) + CFLAGS="$CFLAGS -Os" + fi if test "x$krb5_ac_cflags_set" = xset ; then AC_MSG_NOTICE(not adding extra gcc warning flags because CFLAGS was set) else @@ -629,7 +642,7 @@ if test "$GCC" = yes ; then fi if test "$ac_cv_cxx_compiler_gnu" = yes; then if test "x$krb5_ac_cxxflags_set" = xset ; then - AC_MSG_NOTICE(not adding extra g++ warnings because CXXFLAGS was sent) + AC_MSG_NOTICE(not adding extra g++ warnings because CXXFLAGS was set) else AC_MSG_NOTICE(adding extra warning flags for g++) CXXFLAGS="$CXXFLAGS $extra_gcc_warn_opts" |