pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/math/openblas
Module Name: pkgsrc
Committed By: bacon
Date: Thu Nov 5 16:31:45 UTC 2020
Added Files:
pkgsrc/math/openblas: DESCR Makefile Makefile.common PLIST
buildlink3.mk distinfo options.mk version.mk
pkgsrc/math/openblas/patches: patch-Makefile patch-Makefile.install
patch-Makefile.system patch-c_check patch-common__arm.h
patch-cpuid__arm.c patch-cpuid__arm64.c patch-cpuid_ia64.c
patch-exports+Makefile patch-f_check patch-getarch.c
patch-interface__ztrmv.c patch-utest_Makefile
Log Message:
math/openblas: import openblas-0.3.7
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
OpenBLAS is an open source project supported by
Lab of Parallel Software and Computational Science, ISCAS.
This package builds the serial library.
Needs patching and testing on platforms besides Linux
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/math/openblas/DESCR \
pkgsrc/math/openblas/Makefile pkgsrc/math/openblas/Makefile.common \
pkgsrc/math/openblas/PLIST pkgsrc/math/openblas/buildlink3.mk \
pkgsrc/math/openblas/distinfo pkgsrc/math/openblas/options.mk \
pkgsrc/math/openblas/version.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/math/openblas/patches/patch-Makefile \
pkgsrc/math/openblas/patches/patch-Makefile.install \
pkgsrc/math/openblas/patches/patch-Makefile.system \
pkgsrc/math/openblas/patches/patch-c_check \
pkgsrc/math/openblas/patches/patch-common__arm.h \
pkgsrc/math/openblas/patches/patch-cpuid__arm.c \
pkgsrc/math/openblas/patches/patch-cpuid__arm64.c \
pkgsrc/math/openblas/patches/patch-cpuid_ia64.c \
pkgsrc/math/openblas/patches/patch-exports+Makefile \
pkgsrc/math/openblas/patches/patch-f_check \
pkgsrc/math/openblas/patches/patch-getarch.c \
pkgsrc/math/openblas/patches/patch-interface__ztrmv.c \
pkgsrc/math/openblas/patches/patch-utest_Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/math/openblas/DESCR
diff -u /dev/null pkgsrc/math/openblas/DESCR:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/DESCR Thu Nov 5 16:31:45 2020
@@ -0,0 +1,5 @@
+OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
+OpenBLAS is an open source project supported by
+Lab of Parallel Software and Computational Science, ISCAS.
+
+This package builds the serial library.
Index: pkgsrc/math/openblas/Makefile
diff -u /dev/null pkgsrc/math/openblas/Makefile:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/Makefile Thu Nov 5 16:31:45 2020
@@ -0,0 +1,7 @@
+# $NetBSD: Makefile,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+MAINTAINER= thomas.orgis%uni-hamburg.de@localhost
+
+OPENBLAS_VARIANT= openblas
+.include "../../math/openblas/Makefile.common"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/math/openblas/Makefile.common
diff -u /dev/null pkgsrc/math/openblas/Makefile.common:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/Makefile.common Thu Nov 5 16:31:45 2020
@@ -0,0 +1,142 @@
+# $NetBSD: Makefile.common,v 1.1 2020/11/05 16:31:45 bacon Exp $
+#
+# used by math/openblas_pthread/Makefile
+# used by math/openblas_openmp/Makefile
+# used by math/openblas/Makefile
+#
+# This is the common Makefile for OpenBLAS builds. It depends on
+# OPENBLAS_VARIANT = (openblas|openblas_pthread|openblas_openmp)
+# being set.
+
+DISTNAME= OpenBLAS-${OPENBLAS_VERSION}
+PKGNAME= ${OPENBLAS_VARIANT}-${OPENBLAS_VERSION}
+DIST_SUBDIR= openblas-${OPENBLAS_VERSION}
+CATEGORIES= math
+MASTER_SITES= ${MASTER_SITE_GITHUB:=xianyi/} \
+ http://www.netlib.org/lapack/timing/
+DISTFILES= ${DISTNAME}.tar.gz ${LARGE_FILE} ${TIMING_FILE}
+LARGE_FILE= large.tgz
+TIMING_FILE= timing.tgz
+GITHUB_PROJECT= OpenBLAS
+GITHUB_TAG= v${OPENBLAS_VERSION}
+
+DISTINFO_FILE= ${.CURDIR}/../../math/openblas/distinfo
+PATCHDIR= ${.CURDIR}/../../math/openblas/patches
+
+HOMEPAGE= https://github.com/xianyi/OpenBLAS
+COMMENT= Optimized BLAS library based on GotoBLAS2
+LICENSE= modified-bsd
+
+# Needs source patching and/or GCC_REQD for NetBSD
+# NetBSD gfortran framework needs improvements for this and other packages
+# Untested on other platforms
+ONLY_FOR_PLATFORM= Linux-*-*
+
+USE_LANGUAGES= c fortran
+USE_TOOLS+= gmake perl:build
+
+NO_CONFIGURE= yes
+
+TEST_TARGET= tests
+
+# Work around CFLAGS breakage:
+# https://github.com/xianyi/OpenBLAS/issues/818
+MAKE_FLAGS+= CFLAGS=${CFLAGS:Q}
+MAKE_FLAGS+= CXXFLAGS=${CXXFLAGS:Q}
+MAKE_FLAGS+= FFLAGS=${FFLAGS:Q}
+# Also set compilers explicitly, overriding Makefile.rule
+MAKE_FLAGS+= CC=${CC:Q}
+MAKE_FLAGS+= CXX=${CXX:Q}
+MAKE_FLAGS+= FC=${FC:Q}
+
+# You may override the autodetected thread count limit.
+# Default is detected from build host, which may differ from run host.
+BUILD_DEFS+= OPENBLAS_THREAD_LIMIT
+
+.include "../../mk/bsd.prefs.mk"
+
+# Default checks number of cores of build host.
+# Do we want a pkgsrc-wide default?
+OPENBLAS_THREAD_LIMIT?= # empty
+.if !empty(OPENBLAS_THREAD_LIMIT)
+MAKE_FLAGS+= NUM_THREADS=${OPENBLAS_THREAD_LIMIT:Q}
+.endif
+BENCHMARK_MAXTHREADS?= 8
+
+.if ${MACHINE_ARCH:M*64} == ""
+MAKE_FLAGS+= BINARY32=1
+.else
+MAKE_FLAGS+= BINARY64=1
+.endif
+# Those come in separate BLAS-agnostic packages.
+# ... except we start headaches about ILP64?
+MAKE_FLAGS+= NO_CBLAS=1 NO_LAPACKE=1
+
+# Separate headers and cmake stuff.
+MAKE_FLAGS+= OPENBLAS_INCLUDE_DIR=${PREFIX}/include/${OPENBLAS_VARIANT}
+MAKE_FLAGS+= OPENBLAS_CMAKE_DIR=${PREFIX}/lib/cmake/${OPENBLAS_VARIANT}
+
+# TODO: Set INTERFACE64=1 with additional OPENBLAS_VARIANTs.
+# Need to settle on a convention for SYMBOLSUFFIX first, see
+# https://github.com/xianyi/OpenBLAS/issues/646 .
+.if ${OPENBLAS_VARIANT} == openblas
+MAKE_FLAGS+= USE_OPENMP=0 USE_THREAD=0 USE_LOCKING=1
+BENCHMARK_ENV= USE_SIMPLE_THREADED_LEVEL3=1
+.elif ${OPENBLAS_VARIANT} == openblas_pthread
+BENCHMARK_ENV= OPENBLAS_NUM_THREADS=${BENCHMARK_MAXTHREADS}
+MAKE_FLAGS+= LIBNAMESUFFIX=pthread USE_OPENMP=0 USE_THREAD=1
+.elif ${OPENBLAS_VARIANT} == openblas_openmp
+BENCHMARK_ENV= OMP_NUM_THREADS=${BENCHMARK_MAXTHREADS}
+MAKE_FLAGS+= LIBNAMESUFFIX=openmp USE_OPENMP=1 NO_AFFINITY=1
+.endif
+
+SUBST_CLASSES+= arch
+SUBST_STAGE.arch= pre-build
+SUBST_SED.arch+= -e "s+(ARCH)+(ARCH_)+"
+SUBST_FILES.arch+= Makefile.tail
+SUBST_FILES.arch+= driver/level3/Makefile
+SUBST_FILES.arch+= driver/others/Makefile
+SUBST_FILES.arch+= exports/Makefile
+SUBST_FILES.arch+= interface/Makefile
+SUBST_FILES.arch+= kernel/Makefile
+SUBST_FILES.arch+= kernel/Makefile.L3
+SUBST_FILES.arch+= lapack/laswp/Makefile
+SUBST_FILES.arch+= lapack-netlib/SRC/Makefile
+SUBST_FILES.arch+= lapack-netlib/SRC/VARIANTS/Makefile
+SUBST_FILES.arch+= lapack-netlib/TESTING/MATGEN/Makefile
+SUBST_FILES.arch+= lapack-netlib/LAPACKE/src/Makefile
+SUBST_FILES.arch+= lapack-netlib/LAPACKE/utils/Makefile
+SUBST_FILES.arch+= reference/Makefile
+SUBST_FILES.arch+= Makefile.system
+
+SUBST_CLASSES+= threads
+SUBST_STAGE.threads= pre-build
+SUBST_SED.threads+= -e "s+OPENBLAS_NUM_THREADS+OMP_NUM_THREADS+g"
+SUBST_FILES.threads+= test/Makefile
+SUBST_FILES.threads+= ctest/Makefile
+
+# Fix up pkgconfig file installation.
+SUBST_CLASSES+= pc
+SUBST_STAGE.pc= pre-build
+SUBST_SED.pc+= -e 's+-lopenblas+-l${OPENBLAS_VARIANT}+'
+SUBST_SED.pc+= -e 's+openblas.pc"+${OPENBLAS_VARIANT}.pc"+'
+SUBST_FILES.pc+= Makefile.install openblas.pc.in
+
+PLIST_SRC= ${.CURDIR}/../../math/openblas/PLIST
+PLIST_SUBST+= OPENBLAS_VARIANT=${OPENBLAS_VARIANT}
+
+post-extract:
+ (cd ${DISTDIR}/${DIST_SUBDIR} && \
+ ${CP} ${LARGE_FILE} ${TIMING_FILE} ${WRKSRC})
+
+# This builds some benchmark programs you can call from ${WRKSRC} afterwards.
+.PHONY: benchmark
+benchmark: build
+ (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${BENCHMARK_ENV} \
+ ${MAKE_PROGRAM} ${MAKE_FLAGS} hpl)
+ (cd ${WRKSRC}/benchmark && ${SETENV} ${MAKE_ENV} \
+ ${BENCHMARK_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS})
+
+.include "../../math/openblas/version.mk"
+
+.include "options.mk"
Index: pkgsrc/math/openblas/PLIST
diff -u /dev/null pkgsrc/math/openblas/PLIST:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/PLIST Thu Nov 5 16:31:45 2020
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1 2020/11/05 16:31:45 bacon Exp $
+lib/lib${OPENBLAS_VARIANT}.a
+lib/lib${OPENBLAS_VARIANT}.so
+lib/lib${OPENBLAS_VARIANT}.so.0
+lib/pkgconfig/${OPENBLAS_VARIANT}.pc
+lib/cmake/${OPENBLAS_VARIANT}/OpenBLASConfig.cmake
+lib/cmake/${OPENBLAS_VARIANT}/OpenBLASConfigVersion.cmake
+include/${OPENBLAS_VARIANT}/openblas_config.h
+include/${OPENBLAS_VARIANT}/f77blas.h
Index: pkgsrc/math/openblas/buildlink3.mk
diff -u /dev/null pkgsrc/math/openblas/buildlink3.mk:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/buildlink3.mk Thu Nov 5 16:31:45 2020
@@ -0,0 +1,12 @@
+# $NetBSD: buildlink3.mk,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+BUILDLINK_TREE+= openblas
+
+.if !defined(OPENBLAS_BUILDLINK3_MK)
+OPENBLAS_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.openblas+= openblas>=0.3.5
+BUILDLINK_PKGSRCDIR.openblas?= ../../math/openblas
+.endif # OPENBLAS_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -openblas
Index: pkgsrc/math/openblas/distinfo
diff -u /dev/null pkgsrc/math/openblas/distinfo:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/distinfo Thu Nov 5 16:31:45 2020
@@ -0,0 +1,27 @@
+$NetBSD: distinfo,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+SHA1 (openblas-0.3.7/OpenBLAS-0.3.7.tar.gz) = 6a79b36d1bf73584a513139806d226f9189d621e
+RMD160 (openblas-0.3.7/OpenBLAS-0.3.7.tar.gz) = 72103fa62efaa9ab77f80f9ae70b1417fa6f2122
+SHA512 (openblas-0.3.7/OpenBLAS-0.3.7.tar.gz) = 9c4898301c675471bbce2bb99b6bbe7c90724784fac06504416d4bd5da3cd4488f727b0a118c9a38ea342daac2af9e32597a847004241cc57de693b58b856262
+Size (openblas-0.3.7/OpenBLAS-0.3.7.tar.gz) = 11986592 bytes
+SHA1 (openblas-0.3.7/large.tgz) = a689e5b180595b40c5719b0f358b31b15b57a2db
+RMD160 (openblas-0.3.7/large.tgz) = 8010ff4002ef42cf22a9ee9345011d68fc27d855
+SHA512 (openblas-0.3.7/large.tgz) = e24db2b8a4253ccff9ca196815901c1fefd55e882f4fe1085715ac84b8f318e1842a91072130c17fdd144344ffc80233a77500da9349acb54e504b3935825965
+Size (openblas-0.3.7/large.tgz) = 2595 bytes
+SHA1 (openblas-0.3.7/timing.tgz) = fd47fc3f26d142a791df51e4a422a49662507252
+RMD160 (openblas-0.3.7/timing.tgz) = f0fe220e7ab611d4db8d8cab960361955e2ab093
+SHA512 (openblas-0.3.7/timing.tgz) = be0abfcfffdf0e118ed7e25a8451639833cf0ad6bb04d101bbe194c16f656b6ce509b2f76acf4ad626d1fb5b126bd5498cfea262f2946c2d077751112a2906af
+Size (openblas-0.3.7/timing.tgz) = 1059485 bytes
+SHA1 (patch-Makefile) = 6029076c34765e53a26617fb4bd36b56ba413f1b
+SHA1 (patch-Makefile.install) = 08c80677f8040623eaf5277cf92b5f5969fb4a07
+SHA1 (patch-Makefile.system) = d9dec776fb0d2919850506f682f3623b68751c90
+SHA1 (patch-c_check) = c5990809434a259399c75e660aad5abe83899548
+SHA1 (patch-common__arm.h) = f08ec61bee8317daac267e90a79f46097b3431c9
+SHA1 (patch-cpuid__arm.c) = 20f95cede90cbe548c0cd09ed2e3d37d1d4aeabd
+SHA1 (patch-cpuid__arm64.c) = bbeb7222b32ec821511a6798fc27ff7269700662
+SHA1 (patch-cpuid_ia64.c) = 39649319b8c0a37b8d494e3c03b1ddb6fb616603
+SHA1 (patch-exports+Makefile) = 973016eae339d014d9f6f146e1e934793eb76145
+SHA1 (patch-f_check) = 9162d6a31f96c6af5aada82f6e78cf0385384215
+SHA1 (patch-getarch.c) = 3d0ea5b989c6402d9e2f03a6cc2de848f06ca16d
+SHA1 (patch-interface__ztrmv.c) = 6038946f8fb9542e680178ece2bd0d0d5853baad
+SHA1 (patch-utest_Makefile) = e6f816dfd5b905db93a1a963d86ae3afbeed81d3
Index: pkgsrc/math/openblas/options.mk
diff -u /dev/null pkgsrc/math/openblas/options.mk:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/options.mk Thu Nov 5 16:31:45 2020
@@ -0,0 +1,18 @@
+# $NetBSD: options.mk,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.openblas
+# Auto-detect CPU features at runtime or use static features from build host
+PKG_SUPPORTED_OPTIONS= dynamic-arch
+PKG_SUGGESTED_OPTIONS= dynamic-arch
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mdynamic-arch)
+MAKE_FLAGS+= DYNAMIC_ARCH=1
+.else
+MAKE_FLAGS+= DYNAMIC_ARCH=0
+.endif
+
+# Other options create variants of the library, not configurations of one.
+# Especially INTERFACE64, which changes the API!
Index: pkgsrc/math/openblas/version.mk
diff -u /dev/null pkgsrc/math/openblas/version.mk:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/version.mk Thu Nov 5 16:31:45 2020
@@ -0,0 +1,3 @@
+# $NetBSD: version.mk,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+OPENBLAS_VERSION= 0.3.7
Index: pkgsrc/math/openblas/patches/patch-Makefile
diff -u /dev/null pkgsrc/math/openblas/patches/patch-Makefile:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/patches/patch-Makefile Thu Nov 5 16:31:45 2020
@@ -0,0 +1,72 @@
+$NetBSD: patch-Makefile,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+Remove special library names.
+
+--- Makefile.orig 2019-08-11 21:23:27.000000000 +0000
++++ Makefile
+@@ -100,7 +100,6 @@ ifneq ($(NO_SHARED), 1)
+ ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS Android Haiku))
+ @$(MAKE) -C exports so
+ @ln -fs $(LIBSONAME) $(LIBPREFIX).so
+- @ln -fs $(LIBSONAME) $(LIBPREFIX).so.$(MAJOR_VERSION)
+ endif
+ ifeq ($(OSNAME), $(filter $(OSNAME),FreeBSD OpenBSD NetBSD DragonFly))
+ @$(MAKE) -C exports so
+@@ -108,8 +107,6 @@ ifeq ($(OSNAME), $(filter $(OSNAME),Free
+ endif
+ ifeq ($(OSNAME), Darwin)
+ @$(MAKE) -C exports dyn
+- @ln -fs $(LIBDYNNAME) $(LIBPREFIX).dylib
+- @ln -fs $(LIBDYNNAME) $(LIBPREFIX).$(MAJOR_VERSION).dylib
+ endif
+ ifeq ($(OSNAME), WINNT)
+ @$(MAKE) -C exports dll
+@@ -146,7 +143,6 @@ ifeq ($(NO_SHARED), 1)
+ $(error OpenBLAS: neither static nor shared are enabled.)
+ endif
+ endif
+- @-ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
+ @for d in $(SUBDIRS) ; \
+ do if test -d $$d; then \
+ $(MAKE) -C $$d $(@F) || exit 1 ; \
+@@ -180,7 +176,6 @@ endif
+ prof : prof_blas prof_lapack
+
+ prof_blas :
+- ln -fs $(LIBNAME_P) $(LIBPREFIX)_p.$(LIBSUFFIX)
+ for d in $(SUBDIRS) ; \
+ do if test -d $$d; then \
+ $(MAKE) -C $$d prof || exit 1 ; \
+@@ -191,7 +186,6 @@ ifeq ($(DYNAMIC_ARCH), 1)
+ endif
+
+ blas :
+- ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
+ for d in $(BLASDIRS) ; \
+ do if test -d $$d; then \
+ $(MAKE) -C $$d libs || exit 1 ; \
+@@ -199,7 +193,6 @@ blas :
+ done
+
+ hpl :
+- ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
+ for d in $(BLASDIRS) ../laswp exports ; \
+ do if test -d $$d; then \
+ $(MAKE) -C $$d $(@F) || exit 1 ; \
+@@ -213,7 +206,6 @@ ifeq ($(DYNAMIC_ARCH), 1)
+ endif
+
+ hpl_p :
+- ln -fs $(LIBNAME_P) $(LIBPREFIX)_p.$(LIBSUFFIX)
+ for d in $(SUBDIRS) ../laswp exports ; \
+ do if test -d $$d; then \
+ $(MAKE) -C $$d $(@F) || exit 1 ; \
+@@ -255,7 +247,7 @@ ifeq ($(NOFORTRAN), $(filter 0,$(NOFORTR
+ -@echo "LOADOPTS = $(FFLAGS) $(EXTRALIB)" >> $(NETLIB_LAPACK_DIR)/make.inc
+ -@echo "CC = $(CC)" >> $(NETLIB_LAPACK_DIR)/make.inc
+ -@echo "override CFLAGS = $(LAPACK_CFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc
+- -@echo "override ARCH = $(AR)" >> $(NETLIB_LAPACK_DIR)/make.inc
++ -@echo "override ARCH_ = $(AR)" >> $(NETLIB_LAPACK_DIR)/make.inc
+ -@echo "ARCHFLAGS = $(ARFLAGS) -ru" >> $(NETLIB_LAPACK_DIR)/make.inc
+ -@echo "RANLIB = $(RANLIB)" >> $(NETLIB_LAPACK_DIR)/make.inc
+ -@echo "LAPACKLIB = ../$(LIBNAME)" >> $(NETLIB_LAPACK_DIR)/make.inc
Index: pkgsrc/math/openblas/patches/patch-Makefile.install
diff -u /dev/null pkgsrc/math/openblas/patches/patch-Makefile.install:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/patches/patch-Makefile.install Thu Nov 5 16:31:45 2020
@@ -0,0 +1,43 @@
+$NetBSD: patch-Makefile.install,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+Second part of removing the special library names.
+
+--- Makefile.install.orig 2019-08-11 21:23:27.000000000 +0000
++++ Makefile.install
+@@ -61,8 +61,6 @@ endif
+ ifneq ($(NO_STATIC),1)
+ @echo Copying the static library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
+ @install -pm644 $(LIBNAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
+- @cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \
+- ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
+ endif
+ #for install shared library
+ ifneq ($(NO_SHARED),1)
+@@ -70,8 +68,7 @@ ifneq ($(NO_SHARED),1)
+ ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS Android Haiku))
+ @install -pm755 $(LIBSONAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
+ @cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \
+- ln -fs $(LIBSONAME) $(LIBPREFIX).so ; \
+- ln -fs $(LIBSONAME) $(LIBPREFIX).so.$(MAJOR_VERSION)
++ ln -fs $(LIBSONAME) $(LIBPREFIX).so
+ endif
+
+ ifeq ($(OSNAME), $(filter $(OSNAME),FreeBSD OpenBSD NetBSD DragonFly))
+@@ -110,16 +107,13 @@ endif
+ ifneq ($(NO_STATIC),1)
+ @echo Copying the static library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
+ @installbsd -c -m 644 $(LIBNAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
+- @cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \
+- ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
+ endif
+ #for install shared library
+ ifneq ($(NO_SHARED),1)
+ @echo Copying the shared library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
+ @installbsd -c -m 755 $(LIBSONAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
+ @cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \
+- ln -fs $(LIBSONAME) $(LIBPREFIX).so ; \
+- ln -fs $(LIBSONAME) $(LIBPREFIX).so.$(MAJOR_VERSION)
++ ln -fs $(LIBSONAME) $(LIBPREFIX).so
+ endif
+
+ endif
Index: pkgsrc/math/openblas/patches/patch-Makefile.system
diff -u /dev/null pkgsrc/math/openblas/patches/patch-Makefile.system:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/patches/patch-Makefile.system Thu Nov 5 16:31:45 2020
@@ -0,0 +1,52 @@
+$NetBSD: patch-Makefile.system,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+Fully control the library name via LIBNAMESUFFIX
+And a bit of ARCH_
+
+--- Makefile.system.orig 2019-08-11 21:23:27.000000000 +0000
++++ Makefile.system
+@@ -1242,31 +1242,15 @@ ifndef LIBSUFFIX
+ LIBSUFFIX = a
+ endif
+
+-ifneq ($(DYNAMIC_ARCH), 1)
+-ifndef SMP
+-LIBNAME = $(LIBPREFIX)_$(LIBCORE)$(REVISION).$(LIBSUFFIX)
+-LIBNAME_P = $(LIBPREFIX)_$(LIBCORE)$(REVISION)_p.$(LIBSUFFIX)
+-else
+-LIBNAME = $(LIBPREFIX)_$(LIBCORE)p$(REVISION).$(LIBSUFFIX)
+-LIBNAME_P = $(LIBPREFIX)_$(LIBCORE)p$(REVISION)_p.$(LIBSUFFIX)
+-endif
+-else
+-ifndef SMP
+-LIBNAME = $(LIBPREFIX)$(REVISION).$(LIBSUFFIX)
+-LIBNAME_P = $(LIBPREFIX)$(REVISION)_p.$(LIBSUFFIX)
+-else
+-LIBNAME = $(LIBPREFIX)p$(REVISION).$(LIBSUFFIX)
+-LIBNAME_P = $(LIBPREFIX)p$(REVISION)_p.$(LIBSUFFIX)
+-endif
+-endif
+-
++LIBNAME = $(LIBPREFIX).$(LIBSUFFIX)
++LIBNAME_P = $(LIBPREFIX)_p.$(LIBSUFFIX)
+
+ LIBDLLNAME = $(LIBPREFIX).dll
+ IMPLIBNAME = lib$(LIBNAMEBASE).dll.a
+ ifneq ($(OSNAME), AIX)
+-LIBSONAME = $(LIBNAME:.$(LIBSUFFIX)=.so)
++LIBSONAME = $(LIBNAME:.$(LIBSUFFIX)=.so).$(MAJOR_VERSION)
+ else
+-LIBSONAME = $(LIBNAME:.$(LIBSUFFIX)=.a)
++LIBSONAME = $(LIBNAME:.$(LIBSUFFIX)=.a).$(MAJOR_VERSION)
+ endif
+ LIBDYNNAME = $(LIBNAME:.$(LIBSUFFIX)=.dylib)
+ LIBDEFNAME = $(LIBNAME:.$(LIBSUFFIX)=.def)
+@@ -1297,7 +1281,7 @@ LIB_COMPONENTS = CBLAS
+ endif
+
+ export OSNAME
+-export ARCH
++export ARCH_
+ export CORE
+ export LIBCORE
+ export PGCPATH
Index: pkgsrc/math/openblas/patches/patch-c_check
diff -u /dev/null pkgsrc/math/openblas/patches/patch-c_check:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/patches/patch-c_check Thu Nov 5 16:31:45 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-c_check,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+Avoid name collision on ARCH
+
+--- c_check.orig 2015-10-27 20:44:50 UTC
++++ c_check
+@@ -235,7 +235,7 @@ open(CONFFILE, "> $config" ) || die "Ca
+ # print $data, "\n";
+
+ print MAKEFILE "OSNAME=$os\n";
+-print MAKEFILE "ARCH=$architecture\n";
++print MAKEFILE "ARCH_=$architecture\n";
+ print MAKEFILE "C_COMPILER=$compiler\n";
+ print MAKEFILE "BINARY32=\n" if $binformat ne bin32;
+ print MAKEFILE "BINARY64=\n" if $binformat ne bin64;
Index: pkgsrc/math/openblas/patches/patch-common__arm.h
diff -u /dev/null pkgsrc/math/openblas/patches/patch-common__arm.h:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/patches/patch-common__arm.h Thu Nov 5 16:31:45 2020
@@ -0,0 +1,20 @@
+$NetBSD: patch-common__arm.h,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+Add clang support
+
+--- common_arm.h.orig 2016-09-01 03:58:42 UTC
++++ common_arm.h
+@@ -93,6 +93,13 @@ static inline int blas_quickdivide(blasi
+
+ #endif
+
++/* Translate pre-UAL asm to UAL equivalents */
++#if defined(__clang__)
++#define fnmacs vmls.f32
++#define fnmacd vmls.f64
++#define fnmuls vnmul.f32
++#define fnmuld vnmul.f64
++#endif
+
+ #ifndef F_INTERFACE
+ #define REALNAME ASMNAME
Index: pkgsrc/math/openblas/patches/patch-cpuid__arm.c
diff -u /dev/null pkgsrc/math/openblas/patches/patch-cpuid__arm.c:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/patches/patch-cpuid__arm.c Thu Nov 5 16:31:45 2020
@@ -0,0 +1,16 @@
+$NetBSD: patch-cpuid__arm.c,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+Add default arm processor type
+
+--- cpuid_arm.c.orig 2016-09-01 03:58:42 UTC
++++ cpuid_arm.c
+@@ -181,7 +181,8 @@ int detect(void)
+ }
+
+ }
+-
++#else
++ return CPU_ARMV6;
+ #endif
+
+ return CPU_UNKNOWN;
Index: pkgsrc/math/openblas/patches/patch-cpuid__arm64.c
diff -u /dev/null pkgsrc/math/openblas/patches/patch-cpuid__arm64.c:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/patches/patch-cpuid__arm64.c Thu Nov 5 16:31:45 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-cpuid__arm64.c,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+Add default arm processor type
+
+--- cpuid_arm64.c.orig 2016-09-01 03:58:42 UTC
++++ cpuid_arm64.c
+@@ -132,6 +132,8 @@ int detect(void)
+
+
+ }
++#else
++ return CPU_ARMV8;
+ #endif
+
+ return CPU_UNKNOWN;
Index: pkgsrc/math/openblas/patches/patch-cpuid_ia64.c
diff -u /dev/null pkgsrc/math/openblas/patches/patch-cpuid_ia64.c:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/patches/patch-cpuid_ia64.c Thu Nov 5 16:31:45 2020
@@ -0,0 +1,16 @@
+$NetBSD: patch-cpuid_ia64.c,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+FreeBSD does not have sysinfo in base
+
+--- cpuid_ia64.c.orig 2015-10-27 20:44:50 UTC
++++ cpuid_ia64.c
+@@ -38,7 +38,9 @@
+
+ #include <stdio.h>
+ #include <string.h>
++#ifdef linux
+ #include <sys/sysinfo.h>
++#endif
+ #include "cpuid.h"
+
+ #ifdef __ECC
Index: pkgsrc/math/openblas/patches/patch-exports+Makefile
diff -u /dev/null pkgsrc/math/openblas/patches/patch-exports+Makefile:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/patches/patch-exports+Makefile Thu Nov 5 16:31:45 2020
@@ -0,0 +1,22 @@
+$NetBSD: patch-exports+Makefile,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+Improve dynamic lib naming
+
+--- exports/Makefile.orig 2019-08-11 21:23:27.000000000 +0000
++++ exports/Makefile
+@@ -173,6 +173,7 @@ endif
+ #http://stackoverflow.com/questions/7656425/makefile-ifeq-logical-or
+ ifeq ($(OSNAME), $(filter $(OSNAME),FreeBSD OpenBSD NetBSD DragonFly))
+
++EXTRALIB += -lgfortran
+ so : ../$(LIBSONAME)
+
+ ifeq (, $(SYMBOLPREFIX)$(SYMBOLSUFFIX))
+@@ -184,6 +185,7 @@ else
+ endif
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
+ -Wl,--whole-archive $< -Wl,--no-whole-archive \
++ -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) \
+ $(FEXTRALIB) $(EXTRALIB)
+ $(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
+ rm -f linktest
Index: pkgsrc/math/openblas/patches/patch-f_check
diff -u /dev/null pkgsrc/math/openblas/patches/patch-f_check:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/patches/patch-f_check Thu Nov 5 16:31:45 2020
@@ -0,0 +1,24 @@
+$NetBSD: patch-f_check,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+Clean up link flags
+
+--- f_check.orig 2015-10-27 20:44:50 UTC
++++ f_check
+@@ -261,7 +261,7 @@ if ($link ne "") {
+
+ foreach $flags (@flags) {
+ if (
+- ($flags =~ /^\-L/)
++ ($flags =~ /^\-L\S/)
+ && ($flags !~ /^-LIST:/)
+ && ($flags !~ /^-LANG:/)
+ ) {
+@@ -292,7 +292,7 @@ if ($link ne "") {
+ }
+
+ if (
+- ($flags =~ /^\-l/)
++ ($flags =~ /^\-l\S/)
+ && ($flags !~ /gfortranbegin/)
+ && ($flags !~ /frtbegin/)
+ && ($flags !~ /pathfstart/)
Index: pkgsrc/math/openblas/patches/patch-getarch.c
diff -u /dev/null pkgsrc/math/openblas/patches/patch-getarch.c:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/patches/patch-getarch.c Thu Nov 5 16:31:45 2020
@@ -0,0 +1,26 @@
+$NetBSD: patch-getarch.c,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+Do not override our parallel make choice.
+
+--- getarch.c.orig 2018-12-31 23:09:59.000000000 +0100
++++ getarch.c 2019-03-22 17:24:40.477260427 +0100
+@@ -1236,19 +1236,6 @@
+ #endif
+ #endif
+
+-#ifdef MAKE_NB_JOBS
+- #if MAKE_NB_JOBS > 0
+- printf("MAKE += -j %d\n", MAKE_NB_JOBS);
+- #else
+- // Let make use parent -j argument or -j1 if there
+- // is no make parent
+- #endif
+-#elif NO_PARALLEL_MAKE==1
+- printf("MAKE += -j 1\n");
+-#else
+- printf("MAKE += -j %d\n", get_num_cores());
+-#endif
+-
+ break;
+
+ case '1' : /* For config.h */
Index: pkgsrc/math/openblas/patches/patch-interface__ztrmv.c
diff -u /dev/null pkgsrc/math/openblas/patches/patch-interface__ztrmv.c:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/patches/patch-interface__ztrmv.c Thu Nov 5 16:31:45 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-interface__ztrmv.c,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+Avoid buffer overflow
+
+--- interface/ztrmv.c.orig 2016-09-01 03:58:42 UTC
++++ interface/ztrmv.c
+@@ -242,7 +242,7 @@ void CNAME(enum CBLAS_ORDER order, enum
+ else
+ #endif
+ {
+- buffer_size = ((n - 1) / DTB_ENTRIES) * 2 * DTB_ENTRIES + 32 / sizeof(FLOAT);
++ buffer_size = (((n - 1) / DTB_ENTRIES) * 2 * DTB_ENTRIES + 32 / sizeof(FLOAT)) + 8;
+ // It seems to be required for some K8 or Barcelona CPU
+ buffer_size += 8;
+ if(incx != 1)
Index: pkgsrc/math/openblas/patches/patch-utest_Makefile
diff -u /dev/null pkgsrc/math/openblas/patches/patch-utest_Makefile:1.1
--- /dev/null Thu Nov 5 16:31:45 2020
+++ pkgsrc/math/openblas/patches/patch-utest_Makefile Thu Nov 5 16:31:45 2020
@@ -0,0 +1,19 @@
+$NetBSD: patch-utest_Makefile,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+Limit regression tests to working configs
+
+--- utest/Makefile.orig 2020-01-08 19:47:09.730906975 +0000
++++ utest/Makefile
+@@ -16,8 +16,12 @@ OBJS=utest_main.o test_amax.o test_rotmg
+
+ ifneq ($(NO_LAPACK), 1)
+ OBJS += test_potrs.o
++ifneq ($(NO_LAPACKE), 1)
++ifneq ($(NO_CBLAS), 1)
+ OBJS += test_kernel_regress.o
+ endif
++endif
++endif
+
+ #this does not work with OpenMP nor with native Windows or Android threads
+ # FIXME TBD if this works on OSX, SunOS, POWER and zarch
Home |
Main Index |
Thread Index |
Old Index