1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:32:45 +01:00

cflags.inc.mk: fix cflags test for llvm

gcc does an error but not clang, so add -Werror.
This commit is contained in:
Gaëtan Harter 2018-07-19 18:25:51 +02:00
parent 51a9ac1795
commit a99dd332cc
No known key found for this signature in database
GPG Key ID: 76DF6BCF1B1F883B

View File

@ -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