Browse Source

allow to disable ssp

pull/465/head
Max Lv 9 years ago
parent
commit
fa8dc5ccc6
2 changed files with 27 additions and 2 deletions
  1. 17
      configure
  2. 12
      configure.ac

17
configure

@ -794,6 +794,7 @@ with_mbedtls
with_mbedtls_include with_mbedtls_include
with_mbedtls_lib with_mbedtls_lib
enable_applecc enable_applecc
enable_ssp
enable_assert enable_assert
' '
ac_precious_vars='build_alias ac_precious_vars='build_alias
@ -1439,6 +1440,7 @@ Optional Features:
build against shared libraries when possible build against shared libraries when possible
--disable-zlib disable zlib compression support --disable-zlib disable zlib compression support
--enable-applecc enable Apple CommonCrypto API support --enable-applecc enable Apple CommonCrypto API support
--disable-ssp Do not compile with -fstack-protector
--disable-assert turn off assertions --disable-assert turn off assertions
Optional Packages: Optional Packages:
@ -13782,7 +13784,20 @@ $as_echo "$as_me: -fstack-protector disabled on Solaris" >&6;}
has_stack_protector=no has_stack_protector=no
;; ;;
esac esac
if test x$has_stack_protector = xyes; then
# Check whether --enable-ssp was given.
if test "${enable_ssp+set}" = set; then :
enableval=$enable_ssp;
enable_ssp="no"
else
enable_ssp="yes"
fi
if test x$has_stack_protector = xyes && test x$enable_ssp = xyes; then
CFLAGS="$CFLAGS -fstack-protector" CFLAGS="$CFLAGS -fstack-protector"
{ $as_echo "$as_me:${as_lineno-$LINENO}: -fstack-protector enabled in CFLAGS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: -fstack-protector enabled in CFLAGS" >&5
$as_echo "$as_me: -fstack-protector enabled in CFLAGS" >&6;} $as_echo "$as_me: -fstack-protector enabled in CFLAGS" >&6;}

12
configure.ac

@ -142,7 +142,17 @@ case "$host_os" in
has_stack_protector=no has_stack_protector=no
;; ;;
esac esac
if test x$has_stack_protector = xyes; then
AC_ARG_ENABLE(ssp,
[AS_HELP_STRING(--disable-ssp,Do not compile with -fstack-protector)],
[
enable_ssp="no"
],
[
enable_ssp="yes"
])
if test x$has_stack_protector = xyes && test x$enable_ssp = xyes; then
CFLAGS="$CFLAGS -fstack-protector" CFLAGS="$CFLAGS -fstack-protector"
AC_MSG_NOTICE([-fstack-protector enabled in CFLAGS]) AC_MSG_NOTICE([-fstack-protector enabled in CFLAGS])
fi fi

Loading…
Cancel
Save