From ff18dbca675f85d5ab0b33e326060e55b4c3ea6d Mon Sep 17 00:00:00 2001 From: Partha Majumdar Date: Fri, 10 Mar 2017 12:43:57 -0800 Subject: [PATCH] Added -Werror in the makefile for linux builds. It is easier to fix compilation warnings than handling run time bugs. --- make-linux.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/make-linux.mk b/make-linux.mk index c8d4c9b..0f02919 100644 --- a/make-linux.mk +++ b/make-linux.mk @@ -91,18 +91,18 @@ CODESIGN_INSTALLER_CERT= # Debug output for ZeroTier service ifeq ($(ZT_DEBUG),1) DEFS+=-DZT_TRACE - CFLAGS+=-Wall -g -pthread $(INCLUDES) $(DEFS) - CXXFLAGS+=-Wall -g -pthread $(INCLUDES) $(DEFS) + CFLAGS+=-Wall -Werror -g -pthread $(INCLUDES) $(DEFS) + CXXFLAGS+=-Wall -Werror -g -pthread $(INCLUDES) $(DEFS) LDFLAGS=-ldl STRIP?=echo # The following line enables optimization for the crypto code, since # C25519 in particular is almost UNUSABLE in -O0 even on a 3ghz box! -ext/lz4/lz4.o node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CFLAGS = -Wall -O2 -g -pthread $(INCLUDES) $(DEFS) +ext/lz4/lz4.o node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CFLAGS = -Wall -Werror -O2 -g -pthread $(INCLUDES) $(DEFS) else CFLAGS?=-O3 -fstack-protector - CFLAGS+=-Wall -fPIE -fvisibility=hidden -pthread $(INCLUDES) -DNDEBUG $(DEFS) + CFLAGS+=-Wall -Werror -fPIE -fvisibility=hidden -pthread $(INCLUDES) -DNDEBUG $(DEFS) CXXFLAGS?= -fstack-protector - CXXFLAGS+=-Wall -Wreorder -fPIE -fvisibility=hidden -fno-rtti -pthread $(INCLUDES) -DNDEBUG $(DEFS) -std=c++11 + CXXFLAGS+=-Wall -Werror -Wreorder -fPIE -fvisibility=hidden -fno-rtti -pthread $(INCLUDES) -DNDEBUG $(DEFS) -std=c++11 LDFLAGS=-ldl -pie -Wl,-z,relro,-z,now STRIP?=strip STRIP+=--strip-all @@ -359,4 +359,4 @@ clean_thorough: clean_basic clean: clean_basic clean_for_production: - -find . -type f \( -name '*.identity'\) -delete \ No newline at end of file + -find . -type f \( -name '*.identity'\) -delete