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

Collapse All | Expand All

(-)/tmp/openblas/./Makefile (-14 / +3 lines)
Lines 2-9 Link Here
2
# $FreeBSD: head/math/openblas/Makefile 515977 2019-10-29 12:30:15Z arrowd $
2
# $FreeBSD: head/math/openblas/Makefile 515977 2019-10-29 12:30:15Z arrowd $
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
Lines 127-139 Link Here
127
		${WRKSRC}/interface/Makefile \
126
		${WRKSRC}/interface/Makefile \
128
		${WRKSRC}/kernel/Makefile \
127
		${WRKSRC}/kernel/Makefile \
129
		${WRKSRC}/kernel/Makefile.L3 \
128
		${WRKSRC}/kernel/Makefile.L3 \
130
		${WRKSRC}/lapack/laswp/Makefile \
129
		${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_)+" \
130
	${REINPLACE_CMD} -e "s+(ARCH)+(ARCH_)+" \
138
	-e 's+%%LDFLAGS%%+${LDFLAGS}+' \
131
	-e 's+%%LDFLAGS%%+${LDFLAGS}+' \
139
	-e 's+%%LOCALBASE%%+${LOCALBASE}+' \
132
	-e 's+%%LOCALBASE%%+${LOCALBASE}+' \
Lines 143-152 Link Here
143
	-e 's+$${CROSS_SUFFIX}+${LOCALBASE}/bin/+' \
136
	-e 's+$${CROSS_SUFFIX}+${LOCALBASE}/bin/+' \
144
	-e '/Clang.*OpenMP/g' \
137
	-e '/Clang.*OpenMP/g' \
145
		${WRKSRC}/Makefile.system
138
		${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
139
151
post-patch-OPENMP-on:
140
post-patch-OPENMP-on:
152
	${REINPLACE_CMD} -e "s+OPENBLAS_NUM_THREADS+OMP_NUM_THREADS+g" \
141
	${REINPLACE_CMD} -e "s+OPENBLAS_NUM_THREADS+OMP_NUM_THREADS+g" \
Lines 201-207 Link Here
201
		${WRKSRC}/interface/*.c
190
		${WRKSRC}/interface/*.c
202
	${MKDIR} ${STAGEDIR}${PREFIX}/include/openblas
191
	${MKDIR} ${STAGEDIR}${PREFIX}/include/openblas
203
	${INSTALL_DATA} ${WRKSRC}/openblas_*.h ${STAGEDIR}${PREFIX}/include/openblas
192
	${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 \
193
	${INSTALL_DATA} ${WRKSRC}/cblas.h ${WRKSRC}/l1param.h ${WRKSRC}/l2param.h ${WRKSRC}/symcopy.h \
205
		${STAGEDIR}${PREFIX}/include/openblas
194
		${STAGEDIR}${PREFIX}/include/openblas
206
195
207
.include <bsd.port.mk>
196
.include <bsd.port.mk>
(-)/tmp/openblas/./distinfo (-3 / +3 lines)
Lines 1-7 Link Here
1
TIMESTAMP = 1503123719
1
TIMESTAMP = 1572440771
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
(-)/tmp/openblas/./files/patch-Makefile (-11 lines)
Lines 1-11 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
(-)/tmp/openblas/./files/patch-Makefile.rule (-2 / +2 lines)
Lines 1-6 Link Here
1
--- Makefile.rule.orig	2015-10-27 20:44:50 UTC
1
--- Makefile.rule.orig	2019-04-29 17:22:19 UTC
2
+++ Makefile.rule
2
+++ Makefile.rule
3
@@ -19,10 +19,10 @@ VERSION = 0.2.15
3
@@ -24,10 +24,10 @@ VERSION = 0.3.6
4
 
4
 
5
 # C compiler including binary type(32bit / 64bit). Default is gcc.
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.
6
 # Don't use Intel Compiler or PGI, it won't generate right codes as I expect.
(-)/tmp/openblas/./files/patch-Makefile.system (-15 / +17 lines)
Lines 1-32 Link Here
1
--- Makefile.system.orig	2015-10-27 20:44:50 UTC
1
--- Makefile.system.orig	2019-04-30 02:22:19.000000000 +0900
2
+++ Makefile.system
2
+++ Makefile.system	2019-10-06 23:39:21.483212000 +0900
3
@@ -218,6 +218,7 @@ MD5SUM = md5 -r
3
@@ -270,6 +270,7 @@
4
 endif
4
 endif
5
 
5
 
6
 ifeq ($(OSNAME), FreeBSD)
6
 ifneq (,$(findstring $(OSNAME), FreeBSD OpenBSD DragonFly))
7
+EXTRALIB	+= -lm %%LDFLAGS%%
7
+EXTRALIB	+= -lm %%LDFLAGS%%
8
 MD5SUM = md5 -r
8
 MD5SUM = md5 -r
9
 endif
9
 endif
10
 
10
 
11
@@ -889,9 +890,17 @@ SYMBOLSUFFIX =
11
@@ -1064,10 +1065,18 @@
12
 endif
12
 endif
13
 
13
 
14
 ifndef LIBNAMESUFFIX
14
 ifndef LIBNAMESUFFIX
15
+ifndef SMP
15
+ifndef SMP
16
 LIBPREFIX = lib$(SYMBOLPREFIX)openblas$(SYMBOLSUFFIX)
16
 LIBNAMEBASE = $(SYMBOLPREFIX)openblas$(SYMBOLSUFFIX)
17
 else
17
 else
18
+LIBPREFIX = lib$(SYMBOLPREFIX)openblasp$(SYMBOLSUFFIX)
18
+LIBNAMEBASE = $(SYMBOLPREFIX)openblasp$(SYMBOLSUFFIX)
19
+endif
19
+endif
20
+else
20
+else
21
+ifndef SMP
21
+ifndef SMP
22
 LIBPREFIX = lib$(SYMBOLPREFIX)openblas$(SYMBOLSUFFIX)_$(LIBNAMESUFFIX)
22
 LIBNAMEBASE = $(SYMBOLPREFIX)openblas$(SYMBOLSUFFIX)_$(LIBNAMESUFFIX)
23
+else
23
+else
24
+LIBPREFIX = lib$(SYMBOLPREFIX)openblasp$(SYMBOLSUFFIX)_$(LIBNAMESUFFIX)
24
+LIBNAMEBASE = $(SYMBOLPREFIX)openblasp$(SYMBOLSUFFIX)_$(LIBNAMESUFFIX)
25
+endif
26
 endif
25
 endif
26
+endif
27
 
27
 
28
 KERNELDIR	= $(TOPDIR)/kernel/$(ARCH)
28
 ifeq ($(OSNAME), CYGWIN_NT)
29
@@ -1020,24 +1029,8 @@ ifndef LIBSUFFIX
29
 LIBPREFIX = cyg$(LIBNAMEBASE)
30
@@ -1215,25 +1224,9 @@
30
 LIBSUFFIX = a
31
 LIBSUFFIX = a
31
 endif
32
 endif
32
 
33
 
Lines 47-57 Link Here
47
-LIBNAME_P	= $(LIBPREFIX)p$(REVISION)_p.$(LIBSUFFIX)
48
-LIBNAME_P	= $(LIBPREFIX)p$(REVISION)_p.$(LIBSUFFIX)
48
-endif
49
-endif
49
-endif
50
-endif
50
-
51
 
51
 
52
-
52
 LIBDLLNAME   = $(LIBPREFIX).dll
53
 LIBDLLNAME   = $(LIBPREFIX).dll
53
 LIBSONAME    = $(LIBNAME:.$(LIBSUFFIX)=.so)
54
 IMPLIBNAME   = lib$(LIBNAMEBASE).dll.a
54
@@ -1067,7 +1060,7 @@ LIB_COMPONENTS = CBLAS
55
 ifneq ($(OSNAME), AIX)
56
@@ -1270,7 +1263,7 @@
55
 endif
57
 endif
56
 
58
 
57
 export OSNAME
59
 export OSNAME
(-)/tmp/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";
(-)/tmp/openblas/./files/patch-common__power.h (-38 lines)
Lines 1-38 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
(-)/tmp/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
 	}
(-)/tmp/openblas/./files/patch-cpuid_ia64.c (-12 lines)
Lines 1-12 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
(-)/tmp/openblas/./files/patch-cpuid_sparc.c (-10 lines)
Lines 1-10 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
 }
(-)/tmp/openblas/./files/patch-cpuid_x86.c (-18 lines)
Lines 1-18 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
(-)/tmp/openblas/./files/patch-driver_others_memory.c (-13 lines)
Lines 1-13 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
(-)/tmp/openblas/./files/patch-exports+Makefile (-6 / +6 lines)
Lines 1-14 Link Here
1
--- exports/Makefile.orig	2015-10-27 20:44:50 UTC
1
--- exports/Makefile.orig	2019-04-29 17:22:19 UTC
2
+++ exports/Makefile
2
+++ exports/Makefile
3
@@ -140,6 +140,7 @@ endif
3
@@ -124,6 +124,7 @@ dllinit.$(SUFFIX) : dllinit.c
4
 #http://stackoverflow.com/questions/7656425/makefile-ifeq-logical-or
5
 ifeq ($(OSNAME), $(filter $(OSNAME),FreeBSD NetBSD))
6
 
4
 
5
 ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS Android Haiku))
6
 
7
+EXTRALIB += -lgfortran
7
+EXTRALIB += -lgfortran
8
 so : ../$(LIBSONAME)
8
 so : ../$(LIBSONAME)
9
 
9
 
10
 ifeq (, $(SYMBOLPREFIX)$(SYMBOLSUFFIX))
10
 ifeq ($(OSNAME), Android)
11
@@ -151,6 +152,7 @@ else
11
@@ -180,6 +181,7 @@ else
12
 endif
12
 endif
13
 	$(CC) $(CFLAGS) $(LDFLAGS)  -shared -o ../$(LIBSONAME) \
13
 	$(CC) $(CFLAGS) $(LDFLAGS)  -shared -o ../$(LIBSONAME) \
14
 	-Wl,--whole-archive $< -Wl,--no-whole-archive \
14
 	-Wl,--whole-archive $< -Wl,--no-whole-archive \
(-)/tmp/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	2019-04-29 17:22:19 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 (
(-)/tmp/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
   {
(-)/tmp/openblas/./files/patch-param.h (-11 lines)
Lines 1-11 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
(-)/tmp/openblas/./pkg-plist (-2 / +1 lines)
Lines 29-36 Link Here
29
include/openblas/openblas_common_z.h
29
include/openblas/openblas_common_z.h
30
include/openblas/openblas_common_zarch.h
30
include/openblas/openblas_common_zarch.h
31
include/openblas/openblas_config.h
31
include/openblas/openblas_config.h
32
include/openblas/config_kernel.h
33
include/openblas/config_last.h
34
include/openblas/openblas_cpuid.h
32
include/openblas/openblas_cpuid.h
35
include/openblas/l1param.h
33
include/openblas/l1param.h
36
include/openblas/l2param.h
34
include/openblas/l2param.h
Lines 38-40 Link Here
38
include/openblas/openblas_param.h
36
include/openblas/openblas_param.h
39
include/openblas/symcopy.h
37
include/openblas/symcopy.h
40
include/openblas/openblas_version.h
38
include/openblas/openblas_version.h
39

Return to bug 231371