From 23b4e4c4e80c0acd17c088c6bdde8c3bfccce898 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Wed, 8 Apr 2015 10:53:39 +0200 Subject: Makefile.inc: Only add `-Wno-unused-but-set-variable` for GCC Clang (3.5) does not know that option. error: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Werror,-Wunknown-warning-option] Fix up commit f69a99db (coreboot: x86: enable gc-sections) to only add that option, when GCC is used. Change-Id: I65b41133a806df1803ccc445e27184c579a718a0 Signed-off-by: Paul Menzel Reviewed-on: http://review.coreboot.org/9377 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- Makefile.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Makefile.inc') diff --git a/Makefile.inc b/Makefile.inc index 2d3ae2bc51..10759f569d 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -237,7 +237,13 @@ CPPFLAGS_common += -include $(src)/include/kconfig.h CFLAGS_common += -pipe -g -nostdinc CFLAGS_common += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes CFLAGS_common += -Wwrite-strings -Wredundant-decls -Wno-trigraphs -CFLAGS_common += -Wstrict-aliasing -Wshadow -Wno-unused-but-set-variable +CFLAGS_common += -Wstrict-aliasing -Wshadow + +ifeq ($(CONFIG_COMPILER_GCC),y) +# cf. commit f69a99db (coreboot: x86: enable gc-sections) +CFLAGS_common += -Wno-unused-but-set-variable +endif + ifeq ($(CONFIG_WARNINGS_ARE_ERRORS),y) CFLAGS_common += -Werror endif -- cgit v1.2.3