defs.mk: Make it compile with Clang 3.5.0

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2016-03-04 11:43:15 +00:00
commit 0dcf8e254b

View file

@ -261,11 +261,15 @@ FIND_SUBDIRS = $(filter-out . .. ./nomake ./CVS $(addprefix ./,$(IGNOR
SUBDIRS_TO_ITERATE = $(filter-out $(IGNORE_SUBDIRS),$(SUBDIRS))
# compiler and linker
# gcc
GCC_VERSION = $(shell gcc -v 2>&1 | grep "gcc version" | awk '{ print $$3;}')
GCC_MAJOR = $(shell gcc -v 2>&1 | grep "gcc version" | awk '{ split($$3,a,"."); print a[1];}')
GCC_MINOR = $(shell gcc -v 2>&1 | grep "gcc version" | awk '{ split($$3,a,"."); print a[2];}')
GCC_REV = $(shell gcc -v 2>&1 | grep "gcc version" | awk '{ split($$3,a,"."); print a[3];}')
# clang
CLANG_CPPFLAGS += -Wno-unused-private-field -Wno-self-assign-field -Wno-overloaded-virtual
ifneq ($(GCC_VERSION),4.1.0)
ifneq ($(GCC_VERSION),4.5.1)
#BUILD_CFLAGS += -std=c99
@ -941,7 +945,7 @@ endif
ifeq ($(USE_EXCEPTIONS_IN_C),true)
BUILD_CFLAGS+= -fexceptions
BUILD_LDFLAGS += -shared-libgcc
GCC_LDFLAGS += -shared-libgcc
endif
ifeq ($(STRIP_SYMBOLS),true)