Browse Source

Linux build fixes, and build controller.

Adam Ierymenko 9 years ago
parent
commit
1254dece5b
2 changed files with 4 additions and 17 deletions
  1. 4 4
      make-linux.mk
  2. 0 13
      selftest.cpp

+ 4 - 4
make-linux.mk

@@ -93,17 +93,17 @@ endif
 ifeq ($(ZT_DEBUG),1)
 ifeq ($(ZT_DEBUG),1)
 	DEFS+=-DZT_TRACE
 	DEFS+=-DZT_TRACE
 	override CFLAGS+=-Wall -g -O -pthread $(INCLUDES) $(DEFS)
 	override CFLAGS+=-Wall -g -O -pthread $(INCLUDES) $(DEFS)
-	override CXXFLAGS+=-Wall -g -O -pthread $(INCLUDES) $(DEFS)
+	override CXXFLAGS+=-Wall -g -O -std=c++11 -pthread $(INCLUDES) $(DEFS)
 	LDFLAGS=
 	LDFLAGS=
 	STRIP?=echo
 	STRIP?=echo
 	# The following line enables optimization for the crypto code, since
 	# The following line enables optimization for the crypto code, since
 	# C25519 in particular is almost UNUSABLE in -O0 even on a 3ghz box!
 	# 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 -O2 -g -pthread $(INCLUDES) $(DEFS)
 else
 else
-	CFLAGS?=-O3 -fstack-protector-strong
+	CFLAGS?=-O3 -fstack-protector
 	override CFLAGS+=-Wall -fPIE -pthread $(INCLUDES) -DNDEBUG $(DEFS)
 	override CFLAGS+=-Wall -fPIE -pthread $(INCLUDES) -DNDEBUG $(DEFS)
-	CXXFLAGS?=-O3 -fstack-protector-strong
-	override CXXFLAGS+=-Wall -Wno-unused-result -Wreorder -fPIE -fno-rtti -pthread $(INCLUDES) -DNDEBUG $(DEFS)
+	CXXFLAGS?=-O3 -fstack-protector
+	override CXXFLAGS+=-Wall -Wno-unused-result -Wreorder -fPIE -std=c++11 -pthread $(INCLUDES) -DNDEBUG $(DEFS)
 	LDFLAGS=-pie -Wl,-z,relro,-z,now
 	LDFLAGS=-pie -Wl,-z,relro,-z,now
 	STRIP?=strip
 	STRIP?=strip
 	STRIP+=--strip-all
 	STRIP+=--strip-all

+ 0 - 13
selftest.cpp

@@ -501,19 +501,6 @@ static int testCertificate()
 		return -1;
 		return -1;
 	}
 	}
 
 
-	std::cout << "[certificate] Testing string serialization... ";
-	CertificateOfMembership copyA(cA.toString());
-	CertificateOfMembership copyB(cB.toString());
-	if (copyA != cA) {
-		std::cout << "FAIL" << std::endl;
-		return -1;
-	}
-	if (copyB != cB) {
-		std::cout << "FAIL" << std::endl;
-		return -1;
-	}
-	std::cout << "PASS" << std::endl;
-
 	std::cout << "[certificate] Generating two certificates that should not agree...";
 	std::cout << "[certificate] Generating two certificates that should not agree...";
 	cA = CertificateOfMembership(10000,100,1,idA.address());
 	cA = CertificateOfMembership(10000,100,1,idA.address());
 	cB = CertificateOfMembership(10101,100,1,idB.address());
 	cB = CertificateOfMembership(10101,100,1,idB.address());