From: Ruben Kerkhof Date: Sun, 25 Jan 2015 12:43:19 +0000 (+0100) Subject: Add an option to disable hardening X-Git-Tag: rec-3.7.0-rc2~34^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c77252b6748462ca193b9da5eac97b89633d991e;p=pdns Add an option to disable hardening This makes debugging hardening problems easier --disable-hardening disables PIE, -fstack-protector, -D_FORTIFY_SOURCE and -z relro --- diff --git a/configure.ac b/configure.ac index b1972524d..3ce21a7d7 100644 --- a/configure.ac +++ b/configure.ac @@ -34,10 +34,16 @@ AC_DEFINE([_GNU_SOURCE], [1], [Define _GNU_SOURCE so that we get all necessary prototypes] ) -AC_CC_PIE -AC_CC_STACK_PROTECTOR -AC_CC_PARAM_SSP_BUFFER_SIZE([4]) -AC_CC_D_FORTIFY_SOURCE +AC_ARG_ENABLE([hardening], [ + AS_HELP_STRING([--disable-hardening, disable compiler security checks]) +]) +AS_IF([test "x$enable_hardening" != "xno"], [ + AC_CC_PIE + AC_CC_STACK_PROTECTOR + AC_CC_PARAM_SSP_BUFFER_SIZE([4]) + AC_CC_D_FORTIFY_SOURCE + AC_LD_RELRO +]) AC_SEARCH_LIBS([socket], [socket]) AC_SEARCH_LIBS([gethostent], [nsl]) @@ -49,7 +55,6 @@ AC_PROG_LIBTOOL([disable-static]) LT_INIT([disable-static]) ]) -AC_LD_RELRO MC_TM_GMTOFF