svn commit: r507634 - in head/math/openblas: . files
Piotr Kubaj
pkubaj at FreeBSD.org
Tue Jul 30 12:11:23 UTC 2019
Author: pkubaj
Date: Tue Jul 30 12:11:21 2019
New Revision: 507634
URL: https://svnweb.freebsd.org/changeset/ports/507634
Log:
math/openblas: fix build on powerpc64 with TARGET=PPC970 and switch to PPC970
This patch fixes build for PPC970 target. Since most people that run FreeBSD on powerpc64 use PowerPC 970 CPU's, switch to it by default and add non-default option to optimize for POWER6 (optimizing for newer POWER doesn't work on BE).
Bump PORTREVISION because of package change.
PR: 238868
Approved by: phd_kimberlite at yahoo.co.jp (maintainer), linimon (mentor)
Differential Revision: https://reviews.freebsd.org/D21010
Added:
head/math/openblas/files/patch-param.h (contents, props changed)
Modified:
head/math/openblas/Makefile
head/math/openblas/files/patch-common__power.h
Modified: head/math/openblas/Makefile
==============================================================================
--- head/math/openblas/Makefile Tue Jul 30 12:03:42 2019 (r507633)
+++ head/math/openblas/Makefile Tue Jul 30 12:11:21 2019 (r507634)
@@ -3,7 +3,7 @@
PORTNAME= openblas
PORTVERSION= 0.2.20
-PORTREVISION= 9
+PORTREVISION= 10
DISTVERSIONPREFIX= v
PORTEPOCH= 1
CATEGORIES= math
@@ -40,6 +40,7 @@ BUILDFLAGS= FCOMMON_OPT=-frecursive MAKE_NB_JOBS=-1
OPTIONS_DEFINE= INTERFACE64 OPENMP
OPTIONS_DEFINE_i386= DYNAMIC_ARCH AVX AVX2
OPTIONS_DEFINE_amd64= ${OPTIONS_DEFINE_i386}
+OPTIONS_DEFINE_powerpc64= POWER6
.if defined(BATCH) || defined(PACKAGE_BUILDING)
OPTIONS_DEFAULT_i386= DYNAMIC_ARCH
@@ -51,11 +52,16 @@ INTERFACE64_DESC= Use 8 byte integers on 64-bit archit
OPENMP_DESC= Use OpenMP for threading
AVX_DESC= Support Advanced Vector Extensions (AVX)
AVX2_DESC= Support Advanced Vector Extensions 2 (AVX2)
+POWER6_DESC= Optimize for POWER6, instead of the default PPC970
.include <bsd.port.options.mk>
.if ${ARCH} == powerpc64
+. if ${PORT_OPTIONS:MPOWER6}
TARGET_CPU_ARCH= POWER6
+.else
+TARGET_CPU_ARCH= PPC970
+. endif
.endif
.if defined(TARGET_CPU_ARCH)
Modified: head/math/openblas/files/patch-common__power.h
==============================================================================
--- head/math/openblas/files/patch-common__power.h Tue Jul 30 12:03:42 2019 (r507633)
+++ head/math/openblas/files/patch-common__power.h Tue Jul 30 12:11:21 2019 (r507634)
@@ -1,5 +1,14 @@
---- common_power.h.orig 2019-06-26 10:25:04 UTC
+--- common_power.h.orig 2017-07-24 04:03:35 UTC
+++ common_power.h
+@@ -241,7 +241,7 @@ static inline int blas_quickdivide(blasint x, blasint
+ #define HAVE_PREFETCH
+ #endif
+
+-#if defined(POWER3) || defined(POWER6) || defined(PPCG4) || defined(CELL) || defined(POWER8)
++#if defined(POWER3) || defined(POWER6) || defined(PPCG4) || defined(CELL) || defined(POWER8) || defined(PPC970)
+ #define DCBT_ARG 0
+ #else
+ #define DCBT_ARG 8
@@ -499,7 +499,7 @@ static inline int blas_quickdivide(blasint x, blasint
#if defined(ASSEMBLER) && !defined(NEEDPARAM)
Added: head/math/openblas/files/patch-param.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/openblas/files/patch-param.h Tue Jul 30 12:11:21 2019 (r507634)
@@ -0,0 +1,11 @@
+--- param.h.orig 2019-06-28 14:19:50 UTC
++++ param.h
+@@ -1877,7 +1877,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILI
+ #define ZGEMM_DEFAULT_UNROLL_M 2
+ #define ZGEMM_DEFAULT_UNROLL_N 2
+
+-#ifdef OS_LINUX
++#if defined(OS_LINUX) || defined(OS_FREEBSD)
+ #if L2_SIZE == 1024976
+ #define SGEMM_DEFAULT_P 320
+ #define DGEMM_DEFAULT_P 256
More information about the svn-ports-head
mailing list