From b7a46ed22764db9097aba96e68143d46b2a75be0 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 20 Jun 2018 15:18:35 +0200 Subject: gnu: openblas: Fix build on i686. * gnu/packages/patches/openblas-fix-tests-i686.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/maths.scm (openblas)[native-inputs]: Add it. [arguments]: Add phase to apply it on i686 systems only. --- gnu/packages/patches/openblas-fix-tests-i686.patch | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 gnu/packages/patches/openblas-fix-tests-i686.patch (limited to 'gnu/packages/patches/openblas-fix-tests-i686.patch') diff --git a/gnu/packages/patches/openblas-fix-tests-i686.patch b/gnu/packages/patches/openblas-fix-tests-i686.patch new file mode 100644 index 0000000000..3325546ea3 --- /dev/null +++ b/gnu/packages/patches/openblas-fix-tests-i686.patch @@ -0,0 +1,35 @@ +Fix a test failure on some i686 systems: + +https://github.com/xianyi/OpenBLAS/issues/1575 + +This patch is a squashed version of these commits: + +https://github.com/xianyi/OpenBLAS/pull/1583 + +diff --git a/kernel/x86/KERNEL.NEHALEM b/kernel/x86/KERNEL.NEHALEM +index 835520ef..65b03ae5 100644 +--- a/kernel/x86/KERNEL.NEHALEM ++++ b/kernel/x86/KERNEL.NEHALEM +@@ -1,3 +1 @@ + include $(KERNELDIR)/KERNEL.PENRYN +-SSWAPKERNEL = ../arm/swap.c +-DSWAPKERNEL = ../arm/swap.c +diff --git a/kernel/x86/swap.S b/kernel/x86/swap.S +index 54b00b33..e30c2789 100644 +--- a/kernel/x86/swap.S ++++ b/kernel/x86/swap.S +@@ -138,6 +138,14 @@ + /* INCX != 1 or INCY != 1 */ + + .L14: ++ cmpl $0, %ebx ++ jne .L141 ++ cmpl $0, %ecx ++ jne .L141 ++/* INCX == 0 and INCY == 0 */ ++ jmp .L27 ++ ++.L141: + movl %edx, %eax + sarl $2, %eax + jle .L28 -- cgit v1.2.3