[openblas] 01/01: Add armhf support.

Sébastien Villemot sebastien at debian.org
Sun Jun 15 13:12:11 UTC 2014


This is an automated email from the git hooks/post-receive script.

sebastien pushed a commit to branch master
in repository openblas.

commit 244bc121a93096e48f0acdcfc8afa69bb47884bd
Author: Sébastien Villemot <sebastien at debian.org>
Date:   Sun Jun 15 12:42:09 2014 +0000

    Add armhf support.
    
     * Use ARMv6 target. We cannot currently use the ARMv7 target, because it
       requires VFPv3-D32 (and armhf only guarantees VFPv3-D16).
     * arm-gcc-flags.patch: Remove arch-specific GCC flags.
    
    Git-Dch: Full
---
 debian/control                     |  4 ++--
 debian/patches/arm-gcc-flags.patch | 21 +++++++++++++++++++++
 debian/patches/series              |  1 +
 debian/rules                       |  9 +++++++++
 4 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index d013e18..d2ec682 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,7 @@ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-science/packages/openbla
 
 Package: libopenblas-base
 Section: libs
-Architecture: amd64 i386 powerpc ppc64 kfreebsd-i386 kfreebsd-amd64
+Architecture: amd64 armhf i386 powerpc ppc64 kfreebsd-i386 kfreebsd-amd64
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Provides: libblas.so.3
 Suggests: liblapack3
@@ -31,7 +31,7 @@ Description: Optimized BLAS (linear algebra) library based on GotoBLAS2
 
 Package: libopenblas-dev
 Section: libdevel
-Architecture: amd64 i386 powerpc ppc64 kfreebsd-i386 kfreebsd-amd64
+Architecture: amd64 armhf i386 powerpc ppc64 kfreebsd-i386 kfreebsd-amd64
 Depends: libopenblas-base (= ${binary:Version}), libblas-dev, ${shlibs:Depends},
  ${misc:Depends}
 Provides: libblas.so
diff --git a/debian/patches/arm-gcc-flags.patch b/debian/patches/arm-gcc-flags.patch
new file mode 100644
index 0000000..a92bd96
--- /dev/null
+++ b/debian/patches/arm-gcc-flags.patch
@@ -0,0 +1,21 @@
+Description: Remove custom GCC flags on ARM CPUs
+Author: Sébastien Villemot <sebastien at debian.org>
+Forwarded: not-needed
+Last-Update: 2014-06-15
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/Makefile.arm
++++ b/Makefile.arm
+@@ -1,12 +1,8 @@
+ 
+ ifeq ($(CORE), ARMV7)
+-CCOMMON_OPT += -marm -mfpu=vfpv3  -mfloat-abi=hard -march=armv7-a
+-FCOMMON_OPT += -marm -mfpu=vfpv3  -mfloat-abi=hard -march=armv7-a
+ endif
+ 
+ ifeq ($(CORE), ARMV6)
+-CCOMMON_OPT += -marm -mfpu=vfp -mfloat-abi=hard  -march=armv6
+-FCOMMON_OPT += -marm -mfpu=vfp -mfloat-abi=hard  -march=armv6
+ endif
+ 
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 5e8997f..e8e6750 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+arm-gcc-flags.patch
 kfreebsd-soname.patch
 libblas3-soname.patch
 test-custom-package.patch
diff --git a/debian/rules b/debian/rules
index c87b6e0..6b05ab7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,6 +12,15 @@ ifneq (,$(findstring $(DEB_HOST_ARCH),$(ENABLE_DYNAMIC_ARCHS)))
 	TARGET_GENERIC_ARG="TARGET=GENERIC"
 endif
 
+ifeq ($(DEB_HOST_ARCH),armhf)
+	# We cannot use the ARMv7 profile on armhf, because it requires a 32-register FP unit.
+	# See kernel/arm/KERNEL.ARMv7: it loads some *_vfpv3.S files, which use 32 registers.
+	# Also, it FTBFS if GCC flag -mvfpv3 is removed (see arm-gcc-flags.patch), because GCC
+	# refuses asm files with 32 FP registers in that case.
+	# Issue discussed in https://github.com/xianyi/OpenBLAS/issues/388
+	TARGET_GENERIC_ARG="TARGET=ARMV6"
+endif
+
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 	DEBUG_ARG="DEBUG=1"
 endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/openblas.git



More information about the debian-science-commits mailing list