[SCM] ATLAS packaging for Debian branch, master, updated. upstream/3.8.4-34-gf9ed6f4
Sébastien Villemot
sebastien at debian.org
Tue Jun 11 15:19:24 UTC 2013
The following commit has been merged in the master branch:
commit 544ec20911432a9f7dad41ca7e73c4766da96118
Author: Sébastien Villemot <sebastien at debian.org>
Date: Tue Jun 11 15:53:38 2013 +0200
on armhf, ensure that -mfloat-abi=softfp and -mcpu=vfpv3 flags are never
used; this is implemented via a patch (armhf.diff) and by the use of fixed
archdefs
diff --git a/debian/archdefs/arm/ARMv732.tar.bz2 b/debian/archdefs/arm/ARMv732.tar.bz2
index e566513..b6b41e7 100644
Binary files a/debian/archdefs/arm/ARMv732.tar.bz2 and b/debian/archdefs/arm/ARMv732.tar.bz2 differ
diff --git a/debian/archdefs/arm/ARMv732NEON.tar.bz2 b/debian/archdefs/arm/ARMv732NEON.tar.bz2
new file mode 100644
index 0000000..abe1be2
Binary files /dev/null and b/debian/archdefs/arm/ARMv732NEON.tar.bz2 differ
diff --git a/debian/changelog b/debian/changelog
index 27a881b..c36bc29 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,6 +18,9 @@ atlas (3.10.1-1) UNRELEASED; urgency=low
ATLAS uses asm constructs too recent for the platform (armel is only v4t)
+ debian/rules: on armhf, define the ATL_ARM_HARDFP flag; otherwise the asm
constructs use the soft-float ABI for passing floating points
+ + on armhf, ensure that -mfloat-abi=softfp and -mcpu=vfpv3 flags are never
+ used; this is implemented via a patch (armhf.diff) and by the use of fixed
+ archdefs
* The generic package is now built without multi-threading, because otherwise
the package fails to build on some single-processor machines. As a side
effect, the build of the custom package gracefully handles non-threaded
diff --git a/debian/patches/armhf.diff b/debian/patches/armhf.diff
new file mode 100644
index 0000000..d56e3b1
--- /dev/null
+++ b/debian/patches/armhf.diff
@@ -0,0 +1,28 @@
+Description: Do not use soft-float ABI on armhf
+ See http://math-atlas.sourceforge.net/errata.html#armhardfp.
+ Also remove -mfpu=vfpv3 flag, because some armhf machines have only vfpv3-d16
+ (i.e. 16 FPU registers instead of 32).
+Author: Sébastien Villemot <sebastien at debian.org>
+Last-Update: 2013-06-09
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/CONFIG/src/atlcomp.txt
++++ b/CONFIG/src/atlcomp.txt
+@@ -255,13 +255,13 @@
+ # ARM defaults
+ #
+ MACH=ARMv7 OS=ALL LVL=1000 COMPS=xcc
+- 'gcc' '-mcpu=cortex-a8 -O1 -mfpu=vfpv3 -mfloat-abi=softfp '
++ 'gcc' '-mcpu=cortex-a8 -O1 '
+ MACH=ARMv7 OS=ALL LVL=1000 COMPS=smc,skc,gcc,icc
+- 'gcc' '-O1 -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=vfpv3 -mfloat-abi=softfp -fno-expensive-optimizations'
++ 'gcc' '-O1 -mcpu=cortex-a8 -mtune=cortex-a8 -fno-expensive-optimizations'
+ MACH=ARMv7 OS=ALL LVL=1000 COMPS=dmc,dkc
+- 'gcc' '-O1 -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=vfpv3 -mfloat-abi=softfp -fno-schedule-insns2'
++ 'gcc' '-O1 -mcpu=cortex-a8 -mtune=cortex-a8 -fno-schedule-insns2'
+ MACH=ARMv7 OS=ALL LVL=1000 COMPS=f77
+- 'gfortran' '-mcpu=cortex-a8 -mfpu=vfpv3 -mfloat-abi=softfp -O'
++ 'gfortran' '-mcpu=cortex-a8 -mfpu=vfpv3 -O'
+ #
+ # Generic defaults
+ #
diff --git a/debian/patches/series b/debian/patches/series
index d3f70b9..d0164b5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ shared_libraries.diff
22_sh.diff
kfreebsd.diff
armel-is-v4t.diff
+armhf.diff
diff --git a/debian/rules b/debian/rules
index ca1927c..b810ad9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -67,10 +67,26 @@ ifeq ($(DEB_HOST_ARCH),armhf)
COMMON_CONFIG_PARAMS += -D c -DATL_ARM_HARDFP=1
endif
+# The archdefs provided by ATLAS are unsuitable for armhf (see details in
+# armhf.diff patch)
+#
+# Hence we replace them by new ones without the problematic flags. They are
+# located under debian/archdefs/arm, and used for the generic package.
+#
+# The following rules ensure that these new archdefs are also used for the
+# custom package.
+use-my-armhf-archdef:
+ test -f CONFIG/ARCHS/ARMv732.tar.bz2.old || (mv CONFIG/ARCHS/ARMv732.tar.bz2 CONFIG/ARCHS/ARMv732.tar.bz2.old && cp debian/archdefs/arm/ARMv732.tar.bz2 CONFIG/ARCHS/ARMv732.tar.bz2)
+ test -f CONFIG/ARCHS/ARMv732NEON.tar.bz2.old || (mv CONFIG/ARCHS/ARMv732NEON.tar.bz2 CONFIG/ARCHS/ARMv732NEON.tar.bz2.old && cp debian/archdefs/arm/ARMv732NEON.tar.bz2 CONFIG/ARCHS/ARMv732NEON.tar.bz2)
+
+restore-armhf-archdef:
+ (test -f CONFIG/ARCHS/ARMv732.tar.bz2.old && mv CONFIG/ARCHS/ARMv732.tar.bz2.old CONFIG/ARCHS/ARMv732.tar.bz2) || true
+ (test -f CONFIG/ARCHS/ARMv732NEON.tar.bz2.old && mv CONFIG/ARCHS/ARMv732NEON.tar.bz2.old CONFIG/ARCHS/ARMv732NEON.tar.bz2) || true
+
# Build a custom package optimized for the current arch
custom: custom-stamp
.PHONY: custom
-custom-stamp:
+custom-stamp: use-my-armhf-archdef
rm -f configure-stamp
ncpu=$$(LANG=C cpufreq-info | grep "analyzing CPU" -c);\
@@ -142,7 +158,7 @@ build-stamp:
touch $@
clean:: clean-work
-clean-work:
+clean-work: restore-armhf-archdef
dh_testdir
dh_testroot
rm -rf build check
diff --git a/debian/source/include-binaries b/debian/source/include-binaries
index e0941ad..0323e4b 100644
--- a/debian/source/include-binaries
+++ b/debian/source/include-binaries
@@ -1,5 +1,6 @@
debian/archdefs/amd64/x86SSE264SSE2.tar.bz2
debian/archdefs/arm/ARMv732.tar.bz2
+debian/archdefs/arm/ARMv732NEON.tar.bz2
debian/archdefs/i386/x86x8732.tar.bz2
debian/archdefs/ia64/IA64Itan64.tar.bz2
debian/archdefs/mipsel/UNKNOWN32.tar.bz2
--
ATLAS packaging for Debian
More information about the debian-science-commits
mailing list