From 31bb2f25f9968970cebc84e7da54a3a02d2fc4de Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Mon, 8 Jan 2024 22:43:31 -0600 Subject: check for control flow integrity support in compiler --- m4/check-hardening-options.m4 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'm4') diff --git a/m4/check-hardening-options.m4 b/m4/check-hardening-options.m4 index 4b5784b..2cb3083 100644 --- a/m4/check-hardening-options.m4 +++ b/m4/check-hardening-options.m4 @@ -94,6 +94,11 @@ AC_DEFUN([CHECK_C_HARDENING_OPTIONS], [ AC_SEARCH_LIBS([__stack_chk_guard],[ssp]) ]) ]) + + # Check for control-flow integrity support + AS_IF([test "x$HOST_OS" != "xdarwin"], [ + CHECK_CFLAG([[-fcf-protection=full]]) + ]) ]) # Restore CC, LD -- cgit v1.2.3-55-g6feb