From: Rob Browning Date: Sun, 10 Nov 2013 20:11:44 +0000 (-0600) Subject: Makefile: avoid using -Werror with clang for now. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=3fdd538a22eae6681df3a59c116f78c237c9ecc7;p=packages%2Fb%2Fbup.git Makefile: avoid using -Werror with clang for now. Apparently the default compiler on OS X and FreeBSD is now clang, and it doesn't like our CHECK_VALUE_FITS() definition. So for now, just don't specify -Werror when we detect clang. Thanks to Alexander Barton , Thomas Klausner , Sebastian Schumb , and Zoran Zaric for reporting the problem. Signed-off-by: Rob Browning Tested-by: Alexander Barton --- diff --git a/Makefile b/Makefile index 62f006c..d2e61a7 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,11 @@ OS:=$(shell uname | sed 's/[-_].*//') -CFLAGS := -Wall -O2 -Werror $(PYINCLUDE) $(CFLAGS) + +ifeq ($(shell $(CC) --version | grep clang),) + CFLAGS := -Wall -Werror -O2 $(PYINCLUDE) $(CFLAGS) +else # clang + CFLAGS := -Wall -O2 $(PYINCLUDE) $(CFLAGS) +endif + SOEXT:=.so ifeq ($(OS),CYGWIN)