summaryrefslogtreecommitdiff
path: root/libraries/OpenBLAS
diff options
context:
space:
mode:
authorTim Dickson <dickson.tim@googlemail.com>2019-01-07 19:26:31 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-01-07 19:26:31 +0700
commitca7f1f2fc4a79a0a075ba1055d51d21e0e698654 (patch)
tree0a505ba39867c5e7b53a825edcc42f890de8110a /libraries/OpenBLAS
parent0adf2f7655da3da81f0979249482f2f592e35dd7 (diff)
downloadslackbuilds-ca7f1f2fc4a79a0a075ba1055d51d21e0e698654.tar.gz
libraries/OpenBLAS: Fix build on VM.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/OpenBLAS')
-rw-r--r--libraries/OpenBLAS/OpenBLAS.SlackBuild17
-rw-r--r--libraries/OpenBLAS/README5
2 files changed, 20 insertions, 2 deletions
diff --git a/libraries/OpenBLAS/OpenBLAS.SlackBuild b/libraries/OpenBLAS/OpenBLAS.SlackBuild
index b0773b1259..5025a75415 100644
--- a/libraries/OpenBLAS/OpenBLAS.SlackBuild
+++ b/libraries/OpenBLAS/OpenBLAS.SlackBuild
@@ -17,7 +17,19 @@ if [ -z "$ARCH" ]; then
*) ARCH=$( uname -m ) ;;
esac
fi
-
+EXTRAPARMS=""
+if [ "x`uname -p|grep QEMU|wc -l`" = "x1" ]; then
+ #we are running in a vm with a QEMU cpu. OpenBLAS does not like this
+ EXTRAPARMS="DYNAMIC_ARCH=1"
+ if [ "x$TARGET" = "x" ]; then
+ echo "the cpu is not recognised by OpenBLAS. specify a target cpu"
+ echo "using variable TARGET=targetname"
+ echo "look at TargetList.txt in the source for valid TARGET types."
+ exit 2
+ else
+ EXTRAPARMS=$EXTRAPARMS" TARGET="$TARGET
+ fi
+fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -44,8 +56,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-make
+make $EXTRAPARMS
make \
+ $EXTRAPARMS \
NO_STATIC=1 \
BUILD_RELAPACK=1 \
DESTDIR=$PKG \
diff --git a/libraries/OpenBLAS/README b/libraries/OpenBLAS/README
index f1a444a09e..7269fb158c 100644
--- a/libraries/OpenBLAS/README
+++ b/libraries/OpenBLAS/README
@@ -2,3 +2,8 @@ OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
Added symbolic link to install a generic blas library that can be used by
Octave and R.
+OpenBLAS has cpu specific targetted assembly code for speed optimisation.
+If running in a vm with QEMU cpu you need to specify a variable
+TARGET=cpuname to the script where cpuname is one from the list in the
+sourcecode file TargetList.txt
+examples are TARGET=NEHALEM for an Intel i7 or TARGET=ATHLON for AMD Athlon