From: Aki Tuomi Date: Fri, 17 Jan 2020 07:35:44 +0000 (+0200) Subject: dovecot.m4: Split retpoline check into parts X-Git-Tag: 2.3.10~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb598ea1a55793195714c965590faa927e258ed7;p=thirdparty%2Fdovecot%2Fcore.git dovecot.m4: Split retpoline check into parts --- diff --git a/m4/dovecot.m4 b/m4/dovecot.m4 index 2a157d3490..286d0e65ee 100644 --- a/m4/dovecot.m4 +++ b/m4/dovecot.m4 @@ -200,8 +200,13 @@ AC_DEFUN([AC_CC_RETPOLINE],[ AS_IF([test "$enable_hardening" = yes], [ case "$host" in *) - gl_COMPILER_OPTION_IF([-mfunction-return=thunk -mindirect-branch=thunk], [ - CFLAGS="$CFLAGS -mfunction-return=thunk -mindirect-branch=thunk" + gl_COMPILER_OPTION_IF([-mfunction-return=thunk], + [CFLAGS="$CFLAGS -mfunction-return=thunk], + [], + [AC_LANG_PROGRAM()] + ) + gl_COMPILER_OPTION_IF([-mindirect-branch=thunk], [ + CFLAGS="$CFLAGS -mindirect-branch=thunk" ], [], [AC_LANG_PROGRAM()]