View | Details | Raw Unified | Return to bug 231371 | Differences between
and this patch

Collapse All | Expand All

(-)math/openblas/Makefile (-78 / +38 lines)
Lines 2-14 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	openblas
4
PORTNAME=	openblas
5
PORTVERSION=	0.2.20
5
PORTVERSION=	0.3.7
6
PORTREVISION=	11
7
DISTVERSIONPREFIX=	v
6
DISTVERSIONPREFIX=	v
8
PORTEPOCH=	1
7
PORTEPOCH=	1
9
CATEGORIES=	math
8
CATEGORIES=	math
10
MASTER_SITES=	NL/lapack/timing/:lapack_tmg
9
MASTER_SITES=	NL/lapack/timing/:lapack_tmg
11
DISTFILES=	large.tgz:lapack_tmg timing.tgz:lapack_tmg
10
DISTFILES=	large.tgz:lapack_tmg \
11
		timing.tgz:lapack_tmg
12
DIST_SUBDIR=	openblas
12
DIST_SUBDIR=	openblas
13
13
14
MAINTAINER=	phd_kimberlite@yahoo.co.jp
14
MAINTAINER=	phd_kimberlite@yahoo.co.jp
Lines 17-23 COMMENT= Optimized BLAS library based on GotoBLAS2 Link Here
17
LICENSE=	BSD3CLAUSE
17
LICENSE=	BSD3CLAUSE
18
LICENSE_FILE=	${WRKSRC}/LICENSE
18
LICENSE_FILE=	${WRKSRC}/LICENSE
19
19
20
USES=		fortran gmake perl5
20
USES=		fortran gmake perl5 pkgconfig
21
22
CONFLICTS_INSTALL=	cblas lapacke
21
23
22
USE_GITHUB=	yes
24
USE_GITHUB=	yes
23
GH_ACCOUNT=	xianyi
25
GH_ACCOUNT=	xianyi
Lines 28-45 TIMING_FILE= timing.tgz Link Here
28
USE_LDCONFIG=	yes
30
USE_LDCONFIG=	yes
29
USE_PERL5=	build
31
USE_PERL5=	build
30
32
31
OPENBLAS_SUFX=	r${PORTVERSION}
32
OPENBLAS_LIBS=	libopenblas libopenblasp
33
OPENBLAS_SVER=	0
33
OPENBLAS_SVER=	0
34
OPENBLAS_FILES=	${OPENBLAS_LIBS:S|$|.so|} ${OPENBLAS_LIBS:S|$|.so.${OPENBLAS_SVER}|} ${OPENBLAS_LIBS:S|$|.a|}
35
PLIST_FILES=	${OPENBLAS_FILES:S|^|lib/|}
36
TEST_TARGET=	tests
34
TEST_TARGET=	tests
37
35
38
BUILDFLAGS=	FCOMMON_OPT=-frecursive MAKE_NB_JOBS=-1
36
BUILDFLAGS=	FCOMMON_OPT=-frecursive MAKE_NB_JOBS=-1
39
37
40
OPTIONS_DEFINE=		INTERFACE64 OPENMP
38
OPTIONS_DEFINE=			INTERFACE64 OPENMP
41
OPTIONS_DEFINE_i386=	DYNAMIC_ARCH AVX AVX2
39
OPTIONS_DEFINE_i386=	AVX AVX2 DYNAMIC_ARCH
42
OPTIONS_DEFINE_amd64=	${OPTIONS_DEFINE_i386}
40
OPTIONS_DEFINE_amd64=	AVX AVX2 DYNAMIC_ARCH
43
OPTIONS_DEFINE_powerpc64=	POWER6
41
OPTIONS_DEFINE_powerpc64=	POWER6
44
OPTIONS_EXCLUDE_powerpc64=	OPENMP
42
OPTIONS_EXCLUDE_powerpc64=	OPENMP
45
43
Lines 55-64 AVX_DESC= Support Advanced Vector Extensions (AVX) Link Here
55
AVX2_DESC=		Support Advanced Vector Extensions 2 (AVX2)
53
AVX2_DESC=		Support Advanced Vector Extensions 2 (AVX2)
56
POWER6_DESC=		Optimize for POWER6, instead of the default PPC970
54
POWER6_DESC=		Optimize for POWER6, instead of the default PPC970
57
55
56
MAKE_ENV+=		${MAKE_ENV_${ARCH}}
57
MAKE_ENV_powerpc64=	TARGET=POWER7
58
58
.include <bsd.port.options.mk>
59
.include <bsd.port.options.mk>
59
60
60
.if ${ARCH} == powerpc64
61
.if ${ARCH} == powerpc64
61
USE_GCC=	yes
62
USE_GCC=		yes
62
.  if ${PORT_OPTIONS:MPOWER6}
63
.  if ${PORT_OPTIONS:MPOWER6}
63
TARGET_CPU_ARCH=	POWER6
64
TARGET_CPU_ARCH=	POWER6
64
.else
65
.else
Lines 70-76 TARGET_CPU_ARCH= PPC970 Link Here
70
BUILDFLAGS+=	TARGET=${TARGET_CPU_ARCH}
71
BUILDFLAGS+=	TARGET=${TARGET_CPU_ARCH}
71
.endif
72
.endif
72
73
73
MAXTHREADS?=	64
74
MAXTHREADS?=		64
74
BUILDFLAGS_THREAD+=	NUM_THREADS=${MAXTHREADS} USE_THREAD=1
75
BUILDFLAGS_THREAD+=	NUM_THREADS=${MAXTHREADS} USE_THREAD=1
75
76
76
.if ${ARCH:M*64} == ""
77
.if ${ARCH:M*64} == ""
Lines 91-109 BUILDFLAGS+= DYNAMIC_ARCH=1 Link Here
91
BUILDFLAGS+=	INTERFACE64=1
92
BUILDFLAGS+=	INTERFACE64=1
92
.endif
93
.endif
93
94
95
.if ! ${PORT_OPTIONS:MAVX}
96
BUILDFLAGS+=	NO_AVX=1
97
.endif
98
99
.if ! ${PORT_OPTIONS:MAVX2}
100
BUILDFLAGS+=	NO_AVX2=1
101
.endif
102
94
.if ${PORT_OPTIONS:MOPENMP}
103
.if ${PORT_OPTIONS:MOPENMP}
95
USES+=		compiler:openmp
104
USES+=			compiler:openmp
96
BUILDFLAGS_THREAD+=	USE_OPENMP=1
105
BUILDFLAGS_THREAD+=	USE_OPENMP=1
97
.else
106
.else
98
USES+=		compiler:c11
107
USES+=		compiler:c11
99
.endif
108
.endif
100
109
101
.if ! ${PORT_OPTIONS:MAVX}
110
.include <bsd.port.pre.mk>
102
BUILDFLAGS+=	NO_AVX=1
103
.endif
104
111
105
.if ! ${PORT_OPTIONS:MAVX2}
112
.if ${PORT_OPTIONS:MOPENMP}
106
BUILDFLAGS+=	NO_AVX2=1
113
.if ${CHOSEN_COMPILER_TYPE} == gcc
114
USE_GCC=	yes
115
.endif
107
.endif
116
.endif
108
117
109
post-extract:
118
post-extract:
Lines 111-174 post-extract: Link Here
111
	${CP} ${LARGE_FILE} ${TIMING_FILE} ${WRKSRC}
120
	${CP} ${LARGE_FILE} ${TIMING_FILE} ${WRKSRC}
112
	${MKDIR} ${WRKDIR}/lib
121
	${MKDIR} ${WRKDIR}/lib
113
122
114
post-patch:
115
	${REINPLACE_CMD} -e "s+%%FIND%%+${FIND}+" \
116
	-e "s+%%XARGS%%+${XARGS}+" \
117
	-e "s+%%REINPLACE_CMD%%+${REINPLACE_CMD}+" \
118
		${WRKSRC}/Makefile
119
	${REINPLACE_CMD} -e "s+%%FC%%+${FC}+" -e "s+%%CC%%+${CC}+" \
120
		${WRKSRC}/Makefile.rule
121
	${REINPLACE_CMD} -e "s+(ARCH)+(ARCH_)+" \
122
		${WRKSRC}/Makefile.rule \
123
		${WRKSRC}/Makefile.tail \
124
		${WRKSRC}/driver/level3/Makefile \
125
		${WRKSRC}/driver/others/Makefile \
126
		${WRKSRC}/exports/Makefile \
127
		${WRKSRC}/interface/Makefile \
128
		${WRKSRC}/kernel/Makefile \
129
		${WRKSRC}/kernel/Makefile.L3 \
130
		${WRKSRC}/lapack/laswp/Makefile \
131
		${WRKSRC}/lapack-netlib/SRC/Makefile \
132
		${WRKSRC}/lapack-netlib/SRC/VARIANTS/Makefile \
133
		${WRKSRC}/lapack-netlib/TESTING/MATGEN/Makefile \
134
		${WRKSRC}/lapack-netlib/LAPACKE/src/Makefile \
135
		${WRKSRC}/lapack-netlib/LAPACKE/utils/Makefile \
136
		${WRKSRC}/reference/Makefile
137
	${REINPLACE_CMD} -e "s+(ARCH)+(ARCH_)+" \
138
	-e 's+%%LDFLAGS%%+${LDFLAGS}+' \
139
	-e 's+%%LOCALBASE%%+${LOCALBASE}+' \
140
	-e 's+%%FIND%%+${FIND}+' \
141
	-e 's+%%XARGS%%+${XARGS}+' \
142
	-e 's+%%REINPLACE_CMD%%+${REINPLACE_CMD}+' \
143
	-e 's+$${CROSS_SUFFIX}+${LOCALBASE}/bin/+' \
144
	-e '/Clang.*OpenMP/g' \
145
		${WRKSRC}/Makefile.system
146
	${REINPLACE_CMD} \
147
	-e 's/defined(linux)/(defined(linux) || defined(__FreeBSD__))/g' \
148
	-e 's/ifdef linux/if defined(linux) || defined(__FreeBSD__)/g' \
149
		${WRKSRC}/kernel/power/*.S
150
151
post-patch-OPENMP-on:
123
post-patch-OPENMP-on:
152
	${REINPLACE_CMD} -e "s+OPENBLAS_NUM_THREADS+OMP_NUM_THREADS+g" \
124
	@${REINPLACE_CMD} -e "s+OPENBLAS_NUM_THREADS+OMP_NUM_THREADS+g" \
153
		${WRKSRC}/test/Makefile \
125
		${WRKSRC}/test/Makefile \
154
		${WRKSRC}/ctest/Makefile
126
		${WRKSRC}/ctest/Makefile
155
127
156
do-build:
157
	cd ${WRKSRC} ; ${SETENV} ${BUILDFLAGS} NUM_THREADS=1 USE_THREAD=0 \
158
	${MAKE_CMD} ${MAKE_ARGS}
159
	${CP} ${WRKSRC}/libopenblas-${OPENBLAS_SUFX}.a ${WRKDIR}/lib/libopenblas.a
160
	${CP} ${WRKSRC}/libopenblas-${OPENBLAS_SUFX}.so ${WRKDIR}/lib/libopenblas.so.${OPENBLAS_SVER}
161
	cd ${WRKSRC} ; ${MAKE_CMD} ${MAKE_ARGS} clean
162
	cd ${WRKSRC} ; ${SETENV} ${BUILDFLAGS} ${BUILDFLAGS_THREAD} \
163
	${MAKE_CMD} ${MAKE_ARGS}
164
	${CP} ${WRKSRC}/libopenblasp-${OPENBLAS_SUFX}.a ${WRKDIR}/lib/libopenblasp.a
165
	${CP} ${WRKSRC}/libopenblasp-${OPENBLAS_SUFX}.so ${WRKDIR}/lib/libopenblasp.so.${OPENBLAS_SVER}
166
167
BENCHMARK_MAXTHREADS?=	${MAXTHREADS}
128
BENCHMARK_MAXTHREADS?=	${MAXTHREADS}
168
.if ${PORT_OPTIONS:MOPENMP}
129
.if ${PORT_OPTIONS:MOPENMP}
169
BENCHMARK_THREADS_FLAG=		OMP_NUM_THREADS=${BENCHMARK_MAXTHREADS}
130
BENCHMARK_THREADS_FLAG=	OMP_NUM_THREADS=${BENCHMARK_MAXTHREADS}
170
.else
131
.else
171
BENCHMARK_THREADS_FLAG=		OPENBLAS_NUM_THREADS=${BENCHMARK_MAXTHREADS}
132
BENCHMARK_THREADS_FLAG=	OPENBLAS_NUM_THREADS=${BENCHMARK_MAXTHREADS}
172
.endif
133
.endif
173
134
174
benchmark: build
135
benchmark: build
Lines 177-188 benchmark: build Link Here
177
	cd ${WRKSRC}/benchmark ; ${SETENV} ${BUILDFLAGS} NUM_THREADS=${MAXTHREADS} \
138
	cd ${WRKSRC}/benchmark ; ${SETENV} ${BUILDFLAGS} NUM_THREADS=${MAXTHREADS} \
178
	USE_THREAD=1 ${BENCHMARK_THREADS_FLAG} ${MAKE_CMD} ${MAKE_ARGS}
139
	USE_THREAD=1 ${BENCHMARK_THREADS_FLAG} ${MAKE_CMD} ${MAKE_ARGS}
179
140
180
do-install:
141
post-install:
181
.for L in ${OPENBLAS_LIBS}
182
	${INSTALL_DATA} ${WRKDIR}/lib/${L}.a ${STAGEDIR}${PREFIX}/lib
183
	${INSTALL_LIB} ${WRKDIR}/lib/${L}.so.${OPENBLAS_SVER} ${STAGEDIR}${PREFIX}/lib
184
	${LN} -sf ${L}.so.${OPENBLAS_SVER} ${STAGEDIR}${PREFIX}/lib/${L}.so
185
.endfor
186
	cd ${WRKSRC} && \
142
	cd ${WRKSRC} && \
187
		${FIND} . -name 'common*.h' -print | ${XARGS} ${BASENAME} | ${XARGS} -I {} ${MV} {} openblas_{}
143
		${FIND} . -name 'common*.h' -print | ${XARGS} ${BASENAME} | ${XARGS} -I {} ${MV} {} openblas_{}
188
	${MV} ${WRKSRC}/version.h ${WRKSRC}/openblas_version.h
144
	${MV} ${WRKSRC}/version.h ${WRKSRC}/openblas_version.h
Lines 201-207 do-install: Link Here
201
		${WRKSRC}/interface/*.c
157
		${WRKSRC}/interface/*.c
202
	${MKDIR} ${STAGEDIR}${PREFIX}/include/openblas
158
	${MKDIR} ${STAGEDIR}${PREFIX}/include/openblas
203
	${INSTALL_DATA} ${WRKSRC}/openblas_*.h ${STAGEDIR}${PREFIX}/include/openblas
159
	${INSTALL_DATA} ${WRKSRC}/openblas_*.h ${STAGEDIR}${PREFIX}/include/openblas
204
	${INSTALL_DATA} ${WRKSRC}/cblas.h ${WRKSRC}/config_kernel.h ${WRKSRC}/config_last.h ${WRKSRC}/l1param.h ${WRKSRC}/l2param.h ${WRKSRC}/symcopy.h \
160
	${INSTALL_DATA} ${WRKSRC}/cblas.h ${WRKSRC}/config_last.h ${WRKSRC}/l1param.h ${WRKSRC}/l2param.h ${WRKSRC}/symcopy.h \
205
		${STAGEDIR}${PREFIX}/include/openblas
161
		${STAGEDIR}${PREFIX}/include/openblas
162
	${MV} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}_*-r${PORTVERSION}.a ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.a
163
	${MV} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}_*-r${PORTVERSION}.so ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.so.${OPENBLAS_SVER}
164
	${RM} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.so
165
	${LN} -sf lib${PORTNAME}.so.${OPENBLAS_SVER} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.so
206
166
207
.include <bsd.port.mk>
167
.include <bsd.port.post.mk>
(-)math/openblas/distinfo (-3 / +3 lines)
Lines 1-7 Link Here
1
TIMESTAMP = 1503123719
1
TIMESTAMP = 1571670934
2
SHA256 (openblas/large.tgz) = f328d88b7fa97722f271d7d0cfea1c220e0f8e5ed5ff01d8ef1eb51d6f4243a1
2
SHA256 (openblas/large.tgz) = f328d88b7fa97722f271d7d0cfea1c220e0f8e5ed5ff01d8ef1eb51d6f4243a1
3
SIZE (openblas/large.tgz) = 2595
3
SIZE (openblas/large.tgz) = 2595
4
SHA256 (openblas/timing.tgz) = 999c65f8ea8bd4eac7f1c7f3463d4946917afd20a997807300fe35d70122f3af
4
SHA256 (openblas/timing.tgz) = 999c65f8ea8bd4eac7f1c7f3463d4946917afd20a997807300fe35d70122f3af
5
SIZE (openblas/timing.tgz) = 1059485
5
SIZE (openblas/timing.tgz) = 1059485
6
SHA256 (openblas/xianyi-OpenBLAS-v0.2.20_GH0.tar.gz) = 5ef38b15d9c652985774869efd548b8e3e972e1e99475c673b25537ed7bcf394
6
SHA256 (openblas/xianyi-OpenBLAS-v0.3.7_GH0.tar.gz) = bde136122cef3dd6efe2de1c6f65c10955bbb0cc01a520c2342f5287c28f9379
7
SIZE (openblas/xianyi-OpenBLAS-v0.2.20_GH0.tar.gz) = 11637301
7
SIZE (openblas/xianyi-OpenBLAS-v0.3.7_GH0.tar.gz) = 11986592
(-)math/openblas/files/patch-Makefile (-11 lines)
Removed Link Here
1
--- Makefile.orig	2015-10-27 20:44:50 UTC
2
+++ Makefile
3
@@ -238,7 +238,7 @@ ifndef NOFORTRAN
4
 	-@echo "LOADOPTS    = $(FFLAGS) $(EXTRALIB)" >> $(NETLIB_LAPACK_DIR)/make.inc
5
 	-@echo "CC          = $(CC)" >> $(NETLIB_LAPACK_DIR)/make.inc
6
 	-@echo "override CFLAGS      = $(LAPACK_CFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc
7
-	-@echo "ARCH        = $(AR)" >> $(NETLIB_LAPACK_DIR)/make.inc
8
+	-@echo "ARCH_       = $(AR)" >> $(NETLIB_LAPACK_DIR)/make.inc
9
 	-@echo "ARCHFLAGS   = -ru" >> $(NETLIB_LAPACK_DIR)/make.inc
10
 	-@echo "RANLIB      = $(RANLIB)" >> $(NETLIB_LAPACK_DIR)/make.inc
11
 	-@echo "LAPACKLIB   = ../$(LIBNAME)" >> $(NETLIB_LAPACK_DIR)/make.inc
(-)math/openblas/files/patch-Makefile.rule (-15 lines)
Removed Link Here
1
--- Makefile.rule.orig	2015-10-27 20:44:50 UTC
2
+++ Makefile.rule
3
@@ -19,10 +19,10 @@ VERSION = 0.2.15
4
 
5
 # C compiler including binary type(32bit / 64bit). Default is gcc.
6
 # Don't use Intel Compiler or PGI, it won't generate right codes as I expect.
7
-# CC = gcc
8
+CC = %%CC%%
9
 
10
 # Fortran compiler. Default is g77.
11
-# FC = gfortran
12
+FC = %%FC%%
13
 
14
 # Even you can specify cross compiler. Meanwhile, please set HOSTCC.
15
 
(-)math/openblas/files/patch-Makefile.system (-62 lines)
Removed Link Here
1
--- Makefile.system.orig	2015-10-27 20:44:50 UTC
2
+++ Makefile.system
3
@@ -218,6 +218,7 @@ MD5SUM = md5 -r
4
 endif
5
 
6
 ifeq ($(OSNAME), FreeBSD)
7
+EXTRALIB	+= -lm %%LDFLAGS%%
8
 MD5SUM = md5 -r
9
 endif
10
 
11
@@ -889,9 +890,17 @@ SYMBOLSUFFIX =
12
 endif
13
 
14
 ifndef LIBNAMESUFFIX
15
+ifndef SMP
16
 LIBPREFIX = lib$(SYMBOLPREFIX)openblas$(SYMBOLSUFFIX)
17
 else
18
+LIBPREFIX = lib$(SYMBOLPREFIX)openblasp$(SYMBOLSUFFIX)
19
+endif
20
+else
21
+ifndef SMP
22
 LIBPREFIX = lib$(SYMBOLPREFIX)openblas$(SYMBOLSUFFIX)_$(LIBNAMESUFFIX)
23
+else
24
+LIBPREFIX = lib$(SYMBOLPREFIX)openblasp$(SYMBOLSUFFIX)_$(LIBNAMESUFFIX)
25
+endif
26
 endif
27
 
28
 KERNELDIR	= $(TOPDIR)/kernel/$(ARCH)
29
@@ -1020,24 +1029,8 @@ ifndef LIBSUFFIX
30
 LIBSUFFIX = a
31
 endif
32
 
33
-ifneq ($(DYNAMIC_ARCH), 1)
34
-ifndef SMP
35
-LIBNAME		= $(LIBPREFIX)_$(LIBCORE)$(REVISION).$(LIBSUFFIX)
36
-LIBNAME_P	= $(LIBPREFIX)_$(LIBCORE)$(REVISION)_p.$(LIBSUFFIX)
37
-else
38
-LIBNAME		= $(LIBPREFIX)_$(LIBCORE)p$(REVISION).$(LIBSUFFIX)
39
-LIBNAME_P	= $(LIBPREFIX)_$(LIBCORE)p$(REVISION)_p.$(LIBSUFFIX)
40
-endif
41
-else
42
-ifndef SMP
43
 LIBNAME		= $(LIBPREFIX)$(REVISION).$(LIBSUFFIX)
44
 LIBNAME_P	= $(LIBPREFIX)$(REVISION)_p.$(LIBSUFFIX)
45
-else
46
-LIBNAME		= $(LIBPREFIX)p$(REVISION).$(LIBSUFFIX)
47
-LIBNAME_P	= $(LIBPREFIX)p$(REVISION)_p.$(LIBSUFFIX)
48
-endif
49
-endif
50
-
51
 
52
 LIBDLLNAME   = $(LIBPREFIX).dll
53
 LIBSONAME    = $(LIBNAME:.$(LIBSUFFIX)=.so)
54
@@ -1067,7 +1060,7 @@ LIB_COMPONENTS = CBLAS
55
 endif
56
 
57
 export OSNAME
58
-export ARCH
59
+export ARCH_
60
 export CORE
61
 export LIBCORE
62
 export PGCPATH
(-)math/openblas/files/patch-c_check (-2 / +2 lines)
Lines 1-6 Link Here
1
--- c_check.orig	2015-10-27 20:44:50 UTC
1
--- c_check.orig	2019-04-29 17:22:19 UTC
2
+++ c_check
2
+++ c_check
3
@@ -235,7 +235,7 @@ open(CONFFILE, "> $config"  ) || die "Ca
3
@@ -320,7 +320,7 @@ open(CONFFILE, "> $config"  ) || die "Can't create $co
4
 # print $data, "\n";
4
 # print $data, "\n";
5
 
5
 
6
 print MAKEFILE "OSNAME=$os\n";
6
 print MAKEFILE "OSNAME=$os\n";
(-)math/openblas/files/patch-common__arm.h (-2 / +2 lines)
Lines 1-6 Link Here
1
--- common_arm.h.orig	2016-09-01 03:58:42 UTC
1
--- common_arm.h.orig	2018-08-30 22:07:48 UTC
2
+++ common_arm.h
2
+++ common_arm.h
3
@@ -93,6 +93,17 @@ static inline int blas_quickdivide(blasint x, blasint
3
@@ -93,6 +93,17 @@ static inline int blas_quickdivide(blasint x, blasint 
4
 
4
 
5
 #endif
5
 #endif
6
 
6
 
(-)math/openblas/files/patch-common__power.h (-38 lines)
Removed Link Here
1
--- common_power.h.orig	2017-07-24 04:03:35 UTC
2
+++ common_power.h
3
@@ -241,7 +241,7 @@ static inline int blas_quickdivide(blasint x, blasint 
4
 #define HAVE_PREFETCH
5
 #endif
6
 
7
-#if defined(POWER3) || defined(POWER6) || defined(PPCG4) || defined(CELL) || defined(POWER8)
8
+#if defined(POWER3) || defined(POWER6) || defined(PPCG4) || defined(CELL) || defined(POWER8) || defined(PPC970)
9
 #define DCBT_ARG	0
10
 #else
11
 #define DCBT_ARG	8
12
@@ -499,7 +499,7 @@ static inline int blas_quickdivide(blasint x, blasint 
13
 
14
 #if defined(ASSEMBLER) && !defined(NEEDPARAM)
15
 
16
-#ifdef OS_LINUX
17
+#if defined(OS_LINUX) || defined(OS_FREEBSD)
18
 #ifndef __64BIT__
19
 #define PROLOGUE \
20
 	.section .text;\
21
@@ -774,7 +774,7 @@ Lmcount$lazy_ptr:
22
 
23
 #define HALT		mfspr	r0, 1023
24
 
25
-#ifdef OS_LINUX
26
+#if defined(OS_LINUX) || defined(OS_FREEBSD)
27
 #if defined(PPC440) || defined(PPC440FP2)
28
 #undef  MAX_CPU_NUMBER
29
 #define MAX_CPU_NUMBER 1
30
@@ -819,7 +819,7 @@ Lmcount$lazy_ptr:
31
 #define MAP_ANONYMOUS MAP_ANON
32
 #endif
33
 
34
-#ifdef OS_LINUX
35
+#if defined(OS_LINUX) || defined(OS_FREEBSD)
36
 #ifndef __64BIT__
37
 #define FRAMESLOT(X) (((X) * 4) + 8)
38
 #else
(-)math/openblas/files/patch-cpuid__arm64.c (-2 / +2 lines)
Lines 1-6 Link Here
1
--- cpuid_arm64.c.orig	2016-09-01 03:58:42 UTC
1
--- cpuid_arm64.c.orig	2019-04-29 17:22:19 UTC
2
+++ cpuid_arm64.c
2
+++ cpuid_arm64.c
3
@@ -132,6 +132,8 @@ int detect(void)
3
@@ -180,6 +180,8 @@ int detect(void)
4
 
4
 
5
 
5
 
6
 	}
6
 	}
(-)math/openblas/files/patch-cpuid_ia64.c (-12 lines)
Removed Link Here
1
--- cpuid_ia64.c.orig	2015-10-27 20:44:50 UTC
2
+++ cpuid_ia64.c
3
@@ -38,7 +38,9 @@
4
 
5
 #include <stdio.h>
6
 #include <string.h>
7
+#ifdef linux
8
 #include <sys/sysinfo.h>
9
+#endif
10
 #include "cpuid.h"
11
 
12
 #ifdef __ECC
(-)math/openblas/files/patch-cpuid_sparc.c (-10 lines)
Removed Link Here
1
--- cpuid_sparc.c.orig	2015-10-27 20:44:50 UTC
2
+++ cpuid_sparc.c
3
@@ -49,6 +49,7 @@ void get_subdirname(void){
4
 }
5
 
6
 void get_cpuconfig(void){
7
+  printf("#define SPARC\n");
8
   printf("#define V9\n");
9
   printf("#define DTB_DEFAULT_ENTRIES 32\n");
10
 }
(-)math/openblas/files/patch-cpuid_x86.c (-18 lines)
Removed Link Here
1
--- cpuid_x86.c.orig	2017-07-24 04:03:35 UTC
2
+++ cpuid_x86.c
3
@@ -1329,6 +1329,7 @@ int get_cpuname(void){
4
       case 8:
5
 	switch (model) {
6
 	case 1:
7
+	case 8:
8
 	  // AMD Ryzen
9
 	  if(support_avx())
10
 #ifndef NO_AVX2
11
@@ -1865,6 +1866,7 @@ int get_coretype(void){
12
       } else if (exfamily == 8) {
13
 	switch (model) {
14
 	case 1:
15
+	case 8:
16
 	  // AMD Ryzen
17
 	  if(support_avx())
18
 #ifndef NO_AVX2
(-)math/openblas/files/patch-driver_others_memory.c (-13 lines)
Removed Link Here
1
Passing a priority level to constructor/destructor only works on GCC >= 4.3.0;
2
improve the upstream check so that the build works with base GCC.
3
--- driver/others/memory.c.orig	2016-04-12 19:29:19 UTC
4
+++ driver/others/memory.c
5
@@ -144,7 +144,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF
6
 #if defined(_MSC_VER) && !defined(__clang__)
7
 #define CONSTRUCTOR __cdecl
8
 #define DESTRUCTOR __cdecl
9
-#elif (defined(OS_DARWIN) || defined(OS_SUNOS)) && defined(C_GCC)
10
+#elif (defined(OS_DARWIN) || defined(OS_SUNOS)) || (defined(C_GCC) && ((__GNUC__ == 4) && (__GNUC_MINOR__ < 3)))
11
 #define CONSTRUCTOR	__attribute__ ((constructor))
12
 #define DESTRUCTOR	__attribute__ ((destructor))
13
 #else
(-)math/openblas/files/patch-exports+Makefile (-18 lines)
Removed Link Here
1
--- exports/Makefile.orig	2015-10-27 20:44:50 UTC
2
+++ exports/Makefile
3
@@ -140,6 +140,7 @@ endif
4
 #http://stackoverflow.com/questions/7656425/makefile-ifeq-logical-or
5
 ifeq ($(OSNAME), $(filter $(OSNAME),FreeBSD NetBSD))
6
 
7
+EXTRALIB += -lgfortran
8
 so : ../$(LIBSONAME)
9
 
10
 ifeq (, $(SYMBOLPREFIX)$(SYMBOLSUFFIX))
11
@@ -151,6 +152,7 @@ else
12
 endif
13
 	$(CC) $(CFLAGS) $(LDFLAGS)  -shared -o ../$(LIBSONAME) \
14
 	-Wl,--whole-archive $< -Wl,--no-whole-archive \
15
+	-Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) \
16
 	$(FEXTRALIB) $(EXTRALIB)
17
 	$(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
18
 	rm -f linktest
(-)math/openblas/files/patch-f_check (-3 / +3 lines)
Lines 1-6 Link Here
1
--- f_check.orig	2015-10-27 20:44:50 UTC
1
--- f_check.orig	2018-12-02 22:41:17 UTC
2
+++ f_check
2
+++ f_check
3
@@ -261,7 +261,7 @@ if ($link ne "") {
3
@@ -288,7 +288,7 @@ if ($link ne "") {
4
 
4
 
5
     foreach $flags (@flags) {
5
     foreach $flags (@flags) {
6
 	if (
6
 	if (
Lines 9-15 Link Here
9
 	    && ($flags !~ /^-LIST:/)
9
 	    && ($flags !~ /^-LIST:/)
10
 	    && ($flags !~ /^-LANG:/)
10
 	    && ($flags !~ /^-LANG:/)
11
 	    ) {
11
 	    ) {
12
@@ -292,7 +292,7 @@ if ($link ne "") {
12
@@ -317,7 +317,7 @@ if ($link ne "") {
13
 	}
13
 	}
14
 
14
 
15
 	if (
15
 	if (
(-)math/openblas/files/patch-interface__ztrmv.c (-2 / +2 lines)
Lines 1-6 Link Here
1
--- interface/ztrmv.c.orig	2016-09-01 03:58:42 UTC
1
--- interface/ztrmv.c.orig	2019-04-29 17:22:19 UTC
2
+++ interface/ztrmv.c
2
+++ interface/ztrmv.c
3
@@ -242,7 +242,7 @@ void CNAME(enum CBLAS_ORDER order, enum 
3
@@ -245,7 +245,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Upl
4
   else
4
   else
5
 #endif
5
 #endif
6
   {
6
   {
(-)math/openblas/files/patch-param.h (-11 lines)
Removed Link Here
1
--- param.h.orig	2019-06-28 14:19:50 UTC
2
+++ param.h
3
@@ -1877,7 +1877,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILI
4
 #define ZGEMM_DEFAULT_UNROLL_M 2
5
 #define ZGEMM_DEFAULT_UNROLL_N 2
6
 
7
-#ifdef OS_LINUX
8
+#if defined(OS_LINUX) || defined(OS_FREEBSD)
9
 #if L2_SIZE == 1024976
10
 #define SGEMM_DEFAULT_P 320
11
 #define DGEMM_DEFAULT_P 256
(-)math/openblas/pkg-plist (-6 / +18 lines)
Lines 1-4 Link Here
1
include/cblas.h
2
include/f77blas.h
3
include/lapacke.h
4
include/lapacke_config.h
5
include/lapacke_mangling.h
6
include/lapacke_utils.h
1
include/openblas/cblas.h
7
include/openblas/cblas.h
8
include/openblas/config_last.h
9
include/openblas/l1param.h
10
include/openblas/l2param.h
2
include/openblas/openblas_common.h
11
include/openblas/openblas_common.h
3
include/openblas/openblas_common_alpha.h
12
include/openblas/openblas_common_alpha.h
4
include/openblas/openblas_common_arm.h
13
include/openblas/openblas_common_arm.h
Lines 29-40 include/openblas/openblas_common_x86_64.h Link Here
29
include/openblas/openblas_common_z.h
38
include/openblas/openblas_common_z.h
30
include/openblas/openblas_common_zarch.h
39
include/openblas/openblas_common_zarch.h
31
include/openblas/openblas_config.h
40
include/openblas/openblas_config.h
32
include/openblas/config_kernel.h
33
include/openblas/config_last.h
34
include/openblas/openblas_cpuid.h
35
include/openblas/l1param.h
36
include/openblas/l2param.h
37
include/openblas/openblas_config_template.h
41
include/openblas/openblas_config_template.h
42
include/openblas/openblas_cpuid.h
38
include/openblas/openblas_param.h
43
include/openblas/openblas_param.h
39
include/openblas/symcopy.h
40
include/openblas/openblas_version.h
44
include/openblas/openblas_version.h
45
include/openblas/symcopy.h
46
include/openblas_config.h
47
lib/cmake/openblas/OpenBLASConfig.cmake
48
lib/cmake/openblas/OpenBLASConfigVersion.cmake
49
lib/libopenblas.a
50
lib/libopenblas.so
51
lib/libopenblas.so.0
52
libdata/pkgconfig/openblas.pc

Return to bug 231371