Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jan 2019 05:38:28 +0000 (UTC)
From:      Mark Linimon <linimon@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r490453 - head/security/cryptopp
Message-ID:  <201901160538.x0G5cSM1090452@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: linimon
Date: Wed Jan 16 05:38:28 2019
New Revision: 490453
URL: https://svnweb.freebsd.org/changeset/ports/490453

Log:
  Add support for building with AltiVec extensions.  Note that because
  MACHINE_CPU is not defined on powerpc*, we rely only on ARCH.
  
  Because of this we choose to optimize using instructions available in
  POWER8 and newer, so this port built with SIMD option won't work on older
  POWER CPUs (we could however add additional options for that, to support
  AltiVec in older POWER, if desired).
  
  While here, also remove BROKEN on powerpc.
  
  PR:		234953
  Submitted by:	Piotr Kubaj
  Approved by:	portmgr (tier-2 blanket)

Modified:
  head/security/cryptopp/Makefile

Modified: head/security/cryptopp/Makefile
==============================================================================
--- head/security/cryptopp/Makefile	Wed Jan 16 05:34:20 2019	(r490452)
+++ head/security/cryptopp/Makefile	Wed Jan 16 05:38:28 2019	(r490453)
@@ -14,8 +14,6 @@ COMMENT=	Free C++ class library of Cryptographic Primi
 LICENSE=	BSL
 LICENSE_FILE=	${WRKSRC}/License.txt
 
-BROKEN_powerpc=	does not compile; unrecognized C++ options
-
 USES=		cpe compiler:c++11-lang gmake zip
 USE_LDCONFIG=	yes
 CPE_PRODUCT=	crypto++
@@ -35,6 +33,8 @@ PLIST_SUB+=	SOVERSION=${SOVERSION} \
 OPTIONS_DEFINE=		DEBUG DOCS FULL_DEBUG THREADS TOOLS
 OPTIONS_DEFINE_amd64=	SIMD
 OPTIONS_DEFINE_i386=	SIMD
+OPTIONS_DEFINE_powerpc=	SIMD
+OPTIONS_DEFINE_powerpc64=	SIMD
 OPTIONS_DEFAULT=	THREADS TOOLS
 OPTIONS_SUB=		yes
 
@@ -57,18 +57,23 @@ THREADS_LDFLAGS=	-lpthread
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MSIMD}
-.  if !${MACHINE_CPU:Msse2}
+.  if ${ARCH} == i386 || ${ARCH} == amd64
+.    if !${MACHINE_CPU:Msse2}
 CXXFLAGS+=	-DCRYPTOPP_DISABLE_ASM -DCRYPTOPP_DISABLE_SSE2
-.  endif
-.  if !${MACHINE_CPU:Mssse3}
+.    endif
+.    if !${MACHINE_CPU:Mssse3}
 CXXFLAGS+=	-DCRYPTOPP_DISABLE_SSSE3
-.  endif
-.  if !${MACHINE_CPU:Msse41}
+.    endif
+.    if !${MACHINE_CPU:Msse41}
 CXXFLAGS+=	-DCRYPTOPP_DISABLE_SSE4
+.    endif
+.  elif ${ARCH} == powerpc || ${ARCH} == powerpc64
+CXXFLAGS+=	-DCRYPTOPP_ALTIVEC_AVAILABLE -maltivec -mcrypto -mvsx
 .  endif
 .else
 CXXFLAGS+=	-DCRYPTOPP_DISABLE_ASM -DCRYPTOPP_DISABLE_SSE2 \
-		-DCRYPTOPP_DISABLE_SSSE3 -DCRYPTOPP_DISABLE_SSE4
+		-DCRYPTOPP_DISABLE_SSSE3 -DCRYPTOPP_DISABLE_SSE4 \
+		-DCRYPTOPP_DISABLE_ALTIVEC
 .endif
 
 pre-configure-FULL_DEBUG-on:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901160538.x0G5cSM1090452>