From 2fba21d8676f941b0b7d61850f440b12f0fb61cc Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 22 Feb 2011 16:20:42 -0500 Subject: [PATCH] Make -ffunction-sections off-by-default in 2.0.x I don't see how this can burn anybody, but I don't want to take chances: new build options are something that should be done in an alpha. To turn -ffunction-sections on, pass --enable-function-sections to configure. --- configure.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 66816b2e..3b7d1a58 100644 --- a/configure.in +++ b/configure.in @@ -60,8 +60,12 @@ AC_ARG_ENABLE([libevent-install], AS_HELP_STRING([--disable-libevent-install, disable installation of libevent]), [], [enable_libevent_install=yes]) AC_ARG_ENABLE([libevent-regress], - AS_HELP_STRING([--disable-libevent-regress, skip regress in make check]), + AS_HELP_STRING([--disable-libevent-regress, skip regress in make check]), [], [enable_libevent_regress=yes]) +AC_ARG_ENABLE([function-sections], + AS_HELP_STRING([--enable-function-sections, make static library allow smaller binaries with --gc-sections]), + [], [enable_function_sections=no]) + AC_PROG_LIBTOOL @@ -655,7 +659,7 @@ if test x$enable_gcc_warnings = xyes && test "$GCC" = "yes"; then fi LIBEVENT_GC_SECTIONS= -if test "$GCC" = yes ; then +if test "$GCC" = yes && test "$enable_function_sections" = yes ; then AC_CACHE_CHECK( [if linker supports omitting unused code and data], [libevent_cv_gc_sections_works], -- 2.40.0