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 # PLATFORM SPECIFIC SETTINGS
ifeq ($(PLATFORM),LINUX) ifeq ($(PLATFORM),LINUX)
OURCFLAGS += -fno-pic ifneq ($(CC),clang)
OURCFLAGS += -fno-pic
endif
NASMFLAGS += -f elf NASMFLAGS += -f elf
LIBS += -lvorbisfile -lvorbis -logg LIBS += -lvorbisfile -lvorbis -logg
endif endif

View File

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

View File

@ -24,7 +24,9 @@ ifeq (4,$(GCC_MAJOR))
F_NO_STACK_PROTECTOR := -fno-stack-protector F_NO_STACK_PROTECTOR := -fno-stack-protector
# there are some link-time issues with stack protectors, so make it possible to override # there are some link-time issues with stack protectors, so make it possible to override
F_STACK_PROTECTOR_ALL ?= -fstack-protector-all 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_TUNE_GENERIC := -mtune=generic
M_STACKREALIGN := -mstackrealign M_STACKREALIGN := -mstackrealign
L_SSP := -lssp L_SSP := -lssp