diff options
author | sandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-11-01 02:14:19 +0000 |
---|---|---|
committer | sandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-11-01 02:14:19 +0000 |
commit | 9815bd97561c778ee0bc0c17f245e88e66570111 (patch) | |
tree | 8dc6795f8afa2acc7505e23e13aae2efa62bd51b /gcc/configure.ac | |
parent | 175150216b9512925eae215851259e33ea6ba78d (diff) |
2017-10-31 Sandra Loosemore <sandra@codesourcery.com>
gcc/
* configure.ac (--enable-libssp): New.
(gcc_cv_libc_provides_ssp): Check for explicit setting before
trying to determine target-specific default. Adjust indentation.
* configure: Regenerated.
* doc/install.texi (Configuration): Expand --disable-libssp
documentation.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254288 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r-- | gcc/configure.ac | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac index 0ff9dfe24a0..08685b846a0 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -5756,10 +5756,25 @@ if test x$gcc_cv_solaris_crts = xyes; then [Define if the system-provided CRTs are present on Solaris.]) fi +AC_ARG_ENABLE(libssp, +[AS_HELP_STRING([--enable-libssp], [enable linking against libssp])], +[case "${enableval}" in + yes|no) + ;; + *) + AC_MSG_ERROR([unknown libssp setting $enableval]) + ;; +esac], []) + # Test for stack protector support in target C library. AC_CACHE_CHECK(__stack_chk_fail in target C library, - gcc_cv_libc_provides_ssp, - [gcc_cv_libc_provides_ssp=no + gcc_cv_libc_provides_ssp, + [gcc_cv_libc_provides_ssp=no + if test "x$enable_libssp" = "xno"; then + gcc_cv_libc_provides_ssp=yes + elif test "x$enable_libssp" = "xyes"; then + gcc_cv_libc_provides_ssp=no + else case "$target" in *-*-musl*) # All versions of musl provide stack protector @@ -5796,8 +5811,9 @@ AC_CACHE_CHECK(__stack_chk_fail in target C library, AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], [echo "no __stack_chk_fail on this target"]) ;; - *) gcc_cv_libc_provides_ssp=no ;; - esac]) + *) gcc_cv_libc_provides_ssp=no ;; + esac + fi]) if test x$gcc_cv_libc_provides_ssp = xyes; then AC_DEFINE(TARGET_LIBC_PROVIDES_SSP, 1, |