Package: teem
Version: 1.11.0~svn5906-1
Followup-For: Bug #704206
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu raring ubuntu-patch



In Ubuntu, the attached patch was applied to achieve the following:

  * Fix FTBFS on powerpc and s390 with -ffp-contract=off
  * Fix testsuite failure on any-i386 with -ffloat-store

These two different compiler flags end up fixing some FP rounding errors
unique to i386 and IBM platforms, respectively.  This is tested in Ubuntu
on i386 and powerpc and Works For Me.

It's possible that s390 doesn't support -ffp-contract=off, in which case
it would need -mno-fused-madd instead (which would have the same effect),
but I didn't have a chance to test this on an s390 machine.

... Adam

-- System Information:
Debian Release: wheezy/sid
  APT prefers raring-updates
  APT policy: (500, 'raring-updates'), (500, 'raring-security'), (500, 'raring')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.8.0-19-generic (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru teem-1.11.0~svn5906/debian/changelog teem-1.11.0~svn5906/debian/changelog
diff -Nru teem-1.11.0~svn5906/debian/rules teem-1.11.0~svn5906/debian/rules
--- teem-1.11.0~svn5906/debian/rules	2013-01-09 09:08:48.000000000 -0700
+++ teem-1.11.0~svn5906/debian/rules	2013-04-21 09:55:03.000000000 -0600
@@ -13,6 +13,13 @@
 
 DEB_BUILD_PARALLEL := true
 
+ifneq (,$(filter $(DEB_HOST_ARCH_CPU), i386))
+  CFLAGS += -ffloat-store
+endif
+ifneq (,$(filter $(DEB_HOST_ARCH_CPU), powerpc ppc64 s390 s390x))
+  CFLAGS += -ffp-contract=off
+endif
+
 DEB_CMAKE_EXTRA_FLAGS = \
         -DCMAKE_INSTALL_PREFIX:PATH=/usr \
         -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \

Reply via email to