From a99dd332cc1cd065c53140abe3c53bbb0a8e2a17 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= <gaetan.harter@fu-berlin.de>
Date: Thu, 19 Jul 2018 18:25:51 +0200
Subject: [PATCH] cflags.inc.mk: fix cflags test for llvm

gcc does an error but not clang, so add -Werror.
---
 makefiles/cflags.inc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/makefiles/cflags.inc.mk b/makefiles/cflags.inc.mk
index eabc6f0193..48f52c9cd0 100644
--- a/makefiles/cflags.inc.mk
+++ b/makefiles/cflags.inc.mk
@@ -28,7 +28,7 @@ endif
 # Template for testing a compiler flag and adding it to CFLAGS (errors usually
 # happens when using older toolchains which do not support the given flags)
 define cflags_test_and_add
-  ifeq ($(shell $(CC) $(1) -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
+  ifeq ($(shell $(CC) -Werror $(1) -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
     CFLAGS += $(1)
   endif
 endef
-- 
GitLab