diff options
author | June McEnroe <june@causal.agency> | 2022-03-21 17:14:22 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2022-03-21 17:14:22 -0400 |
commit | 36e3e016edf8b8068aa7c5e9f188159ee4d4e2fb (patch) | |
tree | abf6a8eda1231cf996ced611c8840384c0b03b81 /m4 | |
parent | doc: Note OpenSSL 3.0.0 compatibility in README (diff) | |
parent | Import LibreSSL 3.5.1 (diff) | |
download | libretls-3.5.1.tar.gz libretls-3.5.1.zip |
Merge LibreSSL 3.5.1 3.5.1
Diffstat (limited to 'm4')
-rw-r--r-- | m4/check-hardening-options.m4 | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/m4/check-hardening-options.m4 b/m4/check-hardening-options.m4 index c8ab12e..4b5784b 100644 --- a/m4/check-hardening-options.m4 +++ b/m4/check-hardening-options.m4 @@ -4,16 +4,13 @@ AC_DEFUN([CHECK_CFLAG], [ AC_MSG_CHECKING([if $saved_CC supports "$1"]) old_cflags="$CFLAGS" CFLAGS="$1 -Wall -Werror" - AC_TRY_LINK([ - #include <stdio.h> - ], - [printf("Hello")], - AC_MSG_RESULT([yes]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[printf("Hello")]])], + [AC_MSG_RESULT([yes]) CFLAGS=$old_cflags - HARDEN_CFLAGS="$HARDEN_CFLAGS $1", - AC_MSG_RESULT([no]) + HARDEN_CFLAGS="$HARDEN_CFLAGS $1"], + [AC_MSG_RESULT([no]) CFLAGS=$old_cflags - [$2]) + [$2]]) ]) AC_DEFUN([CHECK_LDFLAG], [ @@ -21,16 +18,13 @@ AC_DEFUN([CHECK_LDFLAG], [ AC_MSG_CHECKING([if $saved_LD supports "$1"]) old_ldflags="$LDFLAGS" LDFLAGS="$1 -Wall -Werror" - AC_TRY_LINK([ - #include <stdio.h> - ], - [printf("Hello")], - AC_MSG_RESULT([yes]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[printf("Hello")]])], + [AC_MSG_RESULT([yes]) LDFLAGS=$old_ldflags - HARDEN_LDFLAGS="$HARDEN_LDFLAGS $1", - AC_MSG_RESULT([no]) + HARDEN_LDFLAGS="$HARDEN_LDFLAGS $1"], + [AC_MSG_RESULT([no]) LDFLAGS=$old_ldflags - [$2]) + [$2]]) ]) AC_DEFUN([DISABLE_AS_EXECUTABLE_STACK], [ |