From 69de3b14426c96725bbf19d4c828b193f0f175b2 Mon Sep 17 00:00:00 2001 From: weidai Date: Wed, 12 Oct 2011 06:13:37 +0000 Subject: fix compile with clang 2.9 (Jeff Walton) git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@532 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- GNUmakefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index 93e3d89..67896b5 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -28,6 +28,7 @@ ifeq ($(ISX86),1) GCC42_OR_LATER = $(shell $(CXX) -v 2>&1 | $(EGREP) -c "^gcc version (4.[2-9]|[5-9])") INTEL_COMPILER = $(shell $(CXX) --version 2>&1 | $(EGREP) -c "\(ICC\)") ICC111_OR_LATER = $(shell $(CXX) --version 2>&1 | $(EGREP) -c "\(ICC\) ([2-9][0-9]|1[2-9]|11\.[1-9])") +CLANG_COMPILER = $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "^clang version") GAS210_OR_LATER = $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.[1-9][0-9]|[3-9])") GAS217_OR_LATER = $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.1[7-9]|2\.[2-9]|[3-9])") GAS219_OR_LATER = $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.19|2\.[2-9]|[3-9])") @@ -50,6 +51,10 @@ CXXFLAGS += -DCRYPTOPP_DISABLE_ASM endif endif +ifneq ($(CLANG_COMPILER),0) +CXXFLAGS += -Wno-tautological-compare +endif + ifeq ($(GAS210_OR_LATER),0) # .intel_syntax wasn't supported until GNU assembler 2.10 CXXFLAGS += -DCRYPTOPP_DISABLE_ASM else @@ -141,7 +146,7 @@ test: cryptest.exe clean: -$(RM) cryptest.exe libcryptopp.a libcryptopp.so $(LIBOBJS) $(TESTOBJS) cryptopp.dll libcryptopp.dll.a libcryptopp.import.a cryptest.import.exe dlltest.exe $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTI MPORTOBJS) $(DLLTESTOBJS) -install: static dynamic cryptest.exe +install: $(MKDIR) -p $(PREFIX)/include/cryptopp $(PREFIX)/lib $(PREFIX)/bin -$(CP) *.h $(PREFIX)/include/cryptopp -$(CP) *.a $(PREFIX)/lib -- cgit v1.2.1