bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozekdnl
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozekdnl Check for support for -fstack-protector or -strong
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozekdnl
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub HrozekAC_DEFUN([AC_CC_F_STACK_PROTECTOR],[
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS])
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek if test $enable_hardening = yes; then
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek case "$host" in
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek *)
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek gl_COMPILER_OPTION_IF([-fstack-protector-strong], [
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek CFLAGS="$CFLAGS -fstack-protector-strong"
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek ],
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek [
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek gl_COMPILER_OPTION_IF([-fstack-protector], [
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek CFLAGS="$CFLAGS -fstack-protector"
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek ], [], [AC_LANG_PROGRAM()])
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek ],
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek [AC_LANG_PROGRAM()]
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek )
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek esac
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek fi
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek])
bf54fbed126ec3d459af40ea370ffadacd31c76dJakub Hrozek