aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPhilip Tricca <philip.b.tricca@intel.com>2017-09-21 21:01:42 -0700
committerPhilip Tricca <philip.b.tricca@intel.com>2017-09-25 15:41:01 -0700
commitc3a8fdc48371df79d527cb57b32aa7c13fe1edb0 (patch)
treef1a7a7a959dfac8ab86ca2908e0fddd57f5660f9 /m4
parent1c55c6c3d1c6fdb08b8b70e92dc222316beef168 (diff)
downloadtpm2-tss-c3a8fdc48371df79d527cb57b32aa7c13fe1edb0.tar.gz
build: Cause warnings to be errors when checking for compiler flag support.
This was the original intent I just didn't understand how the macro works. Turns out that warnings are ignored so if a compiler flag that's not supported only causes a warning then it's considered "supported" and will be included in CFLAGS with the macro as it was. But since we make all warnings errors when we build, the unsupported flag causes a build failure. With this patch causes unsupported, optional compiler flags to be dropped. Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
Diffstat (limited to 'm4')
-rw-r--r--m4/flags.m43
1 files changed, 2 insertions, 1 deletions
diff --git a/m4/flags.m4 b/m4/flags.m4
index d5ed9445..3a5511f9 100644
--- a/m4/flags.m4
+++ b/m4/flags.m4
@@ -11,7 +11,8 @@ AC_DEFUN([AX_ADD_COMPILER_FLAG],[
AS_IF([test x$2 != xrequired],[
AC_MSG_WARN([Optional CFLAG "$1" not supported by your compiler, continuing.])],[
AC_MSG_ERROR([Required CFLAG "$1" not supported by your compiler, aborting.])]
- )]
+ )],[
+ -Wall -Werror]
)]
)
dnl AX_ADD_PREPROC_FLAG: