--- cppForSwig/cryptopp/Makefile.orig	2015-06-10 21:49:31 UTC
+++ cppForSwig/cryptopp/Makefile
@@ -117,6 +117,19 @@ LDLIBS += -lnsl -lsocket
 M32OR64 = -m$(shell isainfo -b)
 endif
 
+ifeq ($(UNAME),FreeBSD)
+AR = ar
+ARFLAGS = cr
+CXX ?= c++
+IS_GCC2 = $(shell $(CXX) -v 2>&1 | $(EGREP) -c gcc-932)
+ifeq ($(IS_GCC2),1)
+CXXFLAGS += -fno-coalesce-templates -fno-coalesce-static-vtables
+LDLIBS += -lstdc++
+LDFLAGS += -flat_namespace -undefined suppress -m
+endif
+endif
+
+
 ifneq ($(IS_SUN_CC),0)	# override flags for CC Sun C++ compiler
 CXXFLAGS = -DNDEBUG -O -g0 -native -template=no%extdef $(M32OR64)
 LDFLAGS =
