From 6dc17eec1bafd8c6cb756bcc6c02086d62616fea Mon Sep 17 00:00:00 2001 From: helixhorned Date: Fri, 9 Dec 2011 19:08:47 +0000 Subject: [PATCH] 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 --- polymer/eduke32/Makefile | 4 +++- polymer/eduke32/Makefile.common | 12 ++++++++++-- polymer/eduke32/build/Makefile.shared | 4 +++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/polymer/eduke32/Makefile b/polymer/eduke32/Makefile index 702b1854e..2025defd7 100644 --- a/polymer/eduke32/Makefile +++ b/polymer/eduke32/Makefile @@ -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 diff --git a/polymer/eduke32/Makefile.common b/polymer/eduke32/Makefile.common index 938819246..ac86c5df9 100644 --- a/polymer/eduke32/Makefile.common +++ b/polymer/eduke32/Makefile.common @@ -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 diff --git a/polymer/eduke32/build/Makefile.shared b/polymer/eduke32/build/Makefile.shared index 98e662788..1e84f102c 100644 --- a/polymer/eduke32/build/Makefile.shared +++ b/polymer/eduke32/build/Makefile.shared @@ -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