--- configure | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 3481730..0e06718 100755 --- a/configure +++ b/configure _at_@ -43,6 +43,11 @@ $package options: --enable-clock use clock_gettime() instead of gettimeofday() [disabled] --enable-monotonic count time with CLOCK_MONOTONIC instead of CLOCK_REALTIME --with-default-path=PATH default executable search path [/usr/bin:/bin] + --stack-protector=CHOICE enable -fstack-protector [no] + +Choices for --stack-protector are no, yes, strong, all, corresponding +to -fno-stack-protector, -fstack-protector, -fstack-protector-strong +and -fstack-protector-all, respectively. EOF exit 0 _at_@ -102,6 +107,10 @@ tryflag () { fi } +requireflag() { + tryflag "$1" "$2" || fail "compiler does not understand $2" +} + tryldflag () { echo "Checking whether linker accepts $2 ..." echo "typedef int x;" > "$tmpc" _at_@ -230,6 +239,7 @@ select=false taiclock=false clockrt=false clockmon=false +stack_protect=no ddefaultpath=/usr/bin:/bin defaultpath=$ddefaultpath dpathorig=true _at_@ -276,6 +286,7 @@ for arg ; do --disable-monotonic|--enable-monotonic=no) clockmon=false ;; --with-default-path=*) defaultpath=${arg#*=} ; dpathorig=false ;; --without-default-path) defaultpath=$ddefaultpath ; dpathorig=true ;; + --stack-protector=*) stack_protect=${arg#*=} ;; --enable-*|--disable-*|--with-*|--without-*|--*dir=*) ;; --host=*|--target=*) target=${arg#*=} ;; --build=*) build=${arg#*=} ;; _at_@ -377,7 +388,13 @@ tryflag CPPFLAGS_AUTO -fno-exceptions tryflag CPPFLAGS_AUTO -fno-unwind-tables tryflag CPPFLAGS_AUTO -fno-asynchronous-unwind-tables tryflag CPPFLAGS_AUTO -Wa,--noexecstack -tryflag CPPFLAGS_AUTO -fno-stack-protector +case "$stack_protect" in + no) tryflag CPPFLAGS_AUTO -fno-stack-protector ;; + yes) requireflag CPPFLAGS_AUTO -fstack-protector ;; + strong) requireflag CPPFLAGS_AUTO -fstack-protector-strong ;; + all) requireflag CPPFLAGS_AUTO -fstack-protector-all ;; + *) fail "$0: invalid --stack-protector choice $stack_protect" ;; +esac tryflag CPPFLAGS_AUTO -Werror=implicit-function-declaration tryflag CPPFLAGS_AUTO -Werror=implicit-int tryflag CPPFLAGS_AUTO -Werror=pointer-sign -- 2.7.4 -- Rasmus Villemoes Software Developer Prevas A/S Hedeager 3 DK-8200 Aarhus N +45 51210274 rasmus.villemoes_at_prevas.dk www.prevas.dkReceived on Thu Oct 05 2017 - 08:46:12 UTC
This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC