Makefiles: disable a few warning categories and other switches when compiling

with clang to prevent spamming the output.

git-svn-id: https://svn.eduke32.com/eduke32@2159 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-12-09 19:08:47 +00:00
parent 6fc7e5b683
commit 6dc17eec1b
3 changed files with 16 additions and 4 deletions

View file

@ -182,7 +182,9 @@ endif
# PLATFORM SPECIFIC SETTINGS
ifeq ($(PLATFORM),LINUX)
OURCFLAGS += -fno-pic
ifneq ($(CC),clang)
OURCFLAGS += -fno-pic
endif
NASMFLAGS += -f elf
LIBS += -lvorbisfile -lvorbis -logg
endif

View file

@ -109,13 +109,21 @@ ifneq (0,$(DEBUGANYWAY))
debug+=-ggdb
endif
W_NO_UNUSED_RESULT := $(shell echo '' | $(CC) -E -Wno-unused-result - 2>/dev/null && echo -Wno-unused-result)
W_NO_UNUSED_RESULT := $(findstring -Wno-unused-result,$(W_NO_UNUSED_RESULT))
ifneq ($(CC),clang)
W_NO_UNUSED_RESULT := $(shell echo '' | $(CC) -E -Wno-unused-result - 2>/dev/null && echo -Wno-unused-result)
W_NO_UNUSED_RESULT := $(findstring -Wno-unused-result,$(W_NO_UNUSED_RESULT))
else
W_NO_UNUSED_RESULT :=
endif
BASECFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -D_FORTIFY_SOURCE=2 \
$(F_JUMP_TABLES) $(W_NO_UNUSED_RESULT) $(ARCH) \
-Wextra #-Wwrite-strings -Waddress -Wlogical-op
ifeq ($(CC),clang)
BASECFLAGS+= -Wno-unused-value -Wno-parentheses
endif
ifneq (3,$(GCC_MAJOR))
BASECFLAGS+= -Wstrict-overflow=1
endif

View file

@ -24,7 +24,9 @@ ifeq (4,$(GCC_MAJOR))
F_NO_STACK_PROTECTOR := -fno-stack-protector
# there are some link-time issues with stack protectors, so make it possible to override
F_STACK_PROTECTOR_ALL ?= -fstack-protector-all
F_JUMP_TABLES := -fjump-tables
ifneq ($(CC),clang)
F_JUMP_TABLES := -fjump-tables
endif
M_TUNE_GENERIC := -mtune=generic
M_STACKREALIGN := -mstackrealign
L_SSP := -lssp