AC_CACHE_CHECK([whether ${CC} accepts -fstack-protector],
ssp_cv_cc,
[ssp_old_cflags="$CFLAGS"
- CFLAGS="$CFLAGS -fstack-protector"
+ CFLAGS="$CFLAGS -fstack-protector -Werror"
AC_TRY_COMPILE(,, ssp_cv_cc=yes, ssp_cv_cc=no)
CFLAGS="$ssp_old_cflags"
])
AC_CACHE_CHECK([whether ${CXX} accepts -fstack-protector],
ssp_cv_cxx,
[ssp_old_cxxflags="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS -fstack-protector"
+ CXXFLAGS="$CXXFLAGS -fstack-protector -Werror"
AC_TRY_COMPILE(,, ssp_cv_cxx=yes, ssp_cv_cxx=no)
CXXFLAGS="$ssp_old_cxxflags"
])
AC_MSG_CHECKING([whether stack-smashing protection is available])
ssp_old_cflags="$CFLAGS"
ssp_old_ldflags="$LDFLAGS"
- CFLAGS="$CFLAGS -fstack-protector-all -fPIC"
+ CFLAGS="$CFLAGS -Werror -fstack-protector-all -fPIC"
LDFLAGS="$LDFLAGS -Wl,-z,defs"
cat confdefs.h > conftest.c
cat >>conftest.c <<_ACEOF