diff options
Diffstat (limited to 'testing/openblas/APKBUILD')
-rw-r--r-- | testing/openblas/APKBUILD | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/testing/openblas/APKBUILD b/testing/openblas/APKBUILD index 51f94b936f..1ca3524e1a 100644 --- a/testing/openblas/APKBUILD +++ b/testing/openblas/APKBUILD @@ -25,21 +25,27 @@ prepare() { done } +# DYNAMIC_ARCH: supported on x86* only, see https://github.com/xianyi/OpenBLAS/issues/709 +case "$CARCH" in +x86 | x86_64) DYNAMIC_ARCH=1 ;; +*) DYNAMIC_ARCH=0 ;; +esac + +# USE_OPENMP=0: see GCC bug 60035 +# NO_AFFINITY: don't expect to work on musl, also breaks R +FLAGS="USE_OPENMP=0 NO_LAPACK=0 NUM_THREADS=8 MAJOR_VERSION=3 \ + NO_AFFINITY=1 DYNAMIC_ARCH=$DYNAMIC_ARCH" + build() { cd "$_builddir" -#USE_OPENMP=0: see GCC bug 60035 -#NO_AFFINITY: don't expect to work on musl, also breaks R -#DYNAMIC_ARCH=1 requires 00-cpuid.patch - make USE_OPENMP=0 NO_LAPACK=0 NUM_THREADS=8 MAJOR_VERSION=3 \ - NO_AFFINITY=1 DYNAMIC_ARCH=1 PREFIX=/usr || return 1 + make $FLAGS PREFIX=/usr || return 1 } package() { cd "$_builddir" mkdir -pm 0755 "$pkgdir/usr/lib" "$pkgdir/usr/include" \ - "$pkgdir/usr/share/doc/$pkgname" || return 1 - make USE_OPENMP=0 NO_LAPACK=0 NUM_THREADS=2 MAJOR_VERSION=3 \ - NO_AFFINITY=1 DYNAMIC_ARCH=1 PREFIX="$pkgdir/usr" install || return 1 + "$pkgdir/usr/share/doc/$pkgname" || return 1 + make $FLAGS PREFIX="$pkgdir/usr" install || return 1 for FILE in *.txt *.md LICENSE; do install -m 0644 $FILE "$pkgdir/usr/share/doc/$pkgname" || return 1 done |