Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F172441027
D20777.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D20777.id.diff
View Options
Index: head/math/openblas/Makefile
===================================================================
--- head/math/openblas/Makefile
+++ head/math/openblas/Makefile
@@ -17,8 +17,6 @@
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
-BROKEN_powerpc64= fails to compile: gemm.c:403: 'SGEMM_DEFAULT_Q' undeclared (first use in this function)
-
USES= fortran gmake perl5
USE_GITHUB= yes
@@ -56,6 +54,10 @@
.include <bsd.port.options.mk>
+.if ${ARCH} == powerpc64
+TARGET_CPU_ARCH= POWER6
+.endif
+
.if defined(TARGET_CPU_ARCH)
BUILDFLAGS+= TARGET=${TARGET_CPU_ARCH}
.endif
@@ -84,6 +86,8 @@
.if ${PORT_OPTIONS:MOPENMP}
USES+= compiler:openmp
BUILDFLAGS_THREAD+= USE_OPENMP=1
+.else
+USES+= compiler:c11
.endif
.if ! ${PORT_OPTIONS:MAVX}
@@ -131,6 +135,10 @@
-e 's+$${CROSS_SUFFIX}+${LOCALBASE}/bin/+' \
-e '/Clang.*OpenMP/g' \
${WRKSRC}/Makefile.system
+ ${REINPLACE_CMD} \
+ -e 's/defined(linux)/(defined(linux) || defined(__FreeBSD__))/g' \
+ -e 's/ifdef linux/if defined(linux) || defined(__FreeBSD__)/g' \
+ ${WRKSRC}/kernel/power/*.S
post-patch-OPENMP-on:
${REINPLACE_CMD} -e "s+OPENBLAS_NUM_THREADS+OMP_NUM_THREADS+g" \
Index: head/math/openblas/files/patch-common__power.h
===================================================================
--- head/math/openblas/files/patch-common__power.h
+++ head/math/openblas/files/patch-common__power.h
@@ -0,0 +1,29 @@
+--- common_power.h.orig 2019-06-26 10:25:04 UTC
++++ common_power.h
+@@ -499,7 +499,7 @@ static inline int blas_quickdivide(blasint x, blasint
+
+ #if defined(ASSEMBLER) && !defined(NEEDPARAM)
+
+-#ifdef OS_LINUX
++#if defined(OS_LINUX) || defined(OS_FREEBSD)
+ #ifndef __64BIT__
+ #define PROLOGUE \
+ .section .text;\
+@@ -774,7 +774,7 @@ Lmcount$lazy_ptr:
+
+ #define HALT mfspr r0, 1023
+
+-#ifdef OS_LINUX
++#if defined(OS_LINUX) || defined(OS_FREEBSD)
+ #if defined(PPC440) || defined(PPC440FP2)
+ #undef MAX_CPU_NUMBER
+ #define MAX_CPU_NUMBER 1
+@@ -819,7 +819,7 @@ Lmcount$lazy_ptr:
+ #define MAP_ANONYMOUS MAP_ANON
+ #endif
+
+-#ifdef OS_LINUX
++#if defined(OS_LINUX) || defined(OS_FREEBSD)
+ #ifndef __64BIT__
+ #define FRAMESLOT(X) (((X) * 4) + 8)
+ #else
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Sep 19, 11:54 AM (4 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39221135
Default Alt Text
D20777.id.diff (2 KB)
Attached To
Mode
D20777: math/openblas: fix build on powerpc64
Attached
Detach File
Event Timeline
Log In to Comment