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 <paulepanter@users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/9377
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
Paul Menzel 2015-04-08 10:53:39 +02:00 committed by Aaron Durbin
parent dbe5756bb3
commit 23b4e4c4e8
1 changed files with 7 additions and 1 deletions

View File

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