]> granicus.if.org Git - libevent/commitdiff
Merge branch 'new_configure_options'
authorNick Mathewson <nickm@torproject.org>
Mon, 12 Sep 2011 14:09:28 +0000 (10:09 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 12 Sep 2011 14:09:28 +0000 (10:09 -0400)
1  2 
configure.in

diff --cc configure.in
index 397b12ea50864cfbf7386e444111d4748021d2eb,532c62975fefbb93e7bef4ac7c914db663c4a6c7..5d889efb7f56a6caad66e62b4a78e4454acef9b5
@@@ -54,17 -53,17 +54,26 @@@ if test "$GCC" = "yes" ; the
        CFLAGS="$CFLAGS -fno-strict-aliasing"
  fi
  
 +# OS X Lion started deprecating the system openssl. Let's just disable
 +# all deprecation warnings on OS X.
 +case "$host_os" in
 +
 + darwin*)
 +    CFLAGS="$CFLAGS -Wno-deprecated-declarations"
 +    ;;
 +esac
 +
  AC_ARG_ENABLE(gcc-warnings,
-      AS_HELP_STRING(--enable-gcc-warnings, enable verbose warnings with GCC))
+      AS_HELP_STRING(--disable-gcc-warnings, disable verbose warnings with GCC))
+ AC_ARG_ENABLE(gcc-hardening,
+      AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks),
+ [if test x$enableval = xyes; then
+     CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all"
+     CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
+     CFLAGS="$CFLAGS --param ssp-buffer-size=1"
+ fi])
  AC_ARG_ENABLE(thread-support,
       AS_HELP_STRING(--disable-thread-support, disable support for threading),
        [], [enable_thread_support=yes])