Package: gmp-ecm
Version: 6.3-10
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu precise ubuntu-patch

Dear Maintainer,

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

Grab patch from upstream SVN to fix FTBFS on i386 with SSE2 by correctly
detecting that -msse2 needs to be used.

Thanks for considering the patch.


-- System Information:
Debian Release: wheezy/sid
  APT prefers precise-updates
  APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500, 
'precise')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-2-generic-pae (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru gmp-ecm-6.3/debian/patches/0004-Fix-SSE2-support.patch gmp-ecm-6.3/debian/patches/0004-Fix-SSE2-support.patch
--- gmp-ecm-6.3/debian/patches/0004-Fix-SSE2-support.patch	1969-12-31 19:00:00.000000000 -0500
+++ gmp-ecm-6.3/debian/patches/0004-Fix-SSE2-support.patch	2011-11-30 13:58:51.000000000 -0500
@@ -0,0 +1,50 @@
+Description: Fix compilation with SSE2 by passing -msse2
+Origin: https://gforge.inria.fr/scm/viewvc.php?view=rev&root=ecm&revision=1546
+
+Index: gmp-ecm-6.3/configure.in
+===================================================================
+--- gmp-ecm-6.3.orig/configure.in	2010-07-28 03:24:22.000000000 -0400
++++ gmp-ecm-6.3/configure.in	2011-11-30 13:41:13.285859861 -0500
+@@ -275,9 +275,9 @@
+   AC_MSG_CHECKING([for SSE2 support])
+   m4_define([SSE2_TEST_PROG], [AC_LANG_PROGRAM([], dnl
+ [#if (defined(__GNUC__) || defined(__ICL)) && defined(__i386__)
+-/* When there are no constraints, registers are referred to by
+-   single % sign, not double. Argh */
+-asm volatile ("pmuludq %xmm2, %xmm0");
++/* On some machines, a program without constraints may pass without -msse2 but
++   those with constraints in spv.c fail, thus we test with constraints here. */
++asm volatile ("pmuludq %%xmm2, %%xmm0" : : :"%xmm0");
+ #else
+ #error
+ #IRIXdoesnotexitaterrordirective
+Index: gmp-ecm-6.3/configure
+===================================================================
+--- gmp-ecm-6.3.orig/configure	2011-11-30 13:24:16.000000000 -0500
++++ gmp-ecm-6.3/configure	2011-11-30 13:47:47.545864034 -0500
+@@ -11844,9 +11844,9 @@
+ main ()
+ {
+ #if (defined(__GNUC__) || defined(__ICL)) && defined(__i386__)
+-/* When there are no constraints, registers are referred to by
+-   single % sign, not double. Argh */
+-asm volatile ("pmuludq %xmm2, %xmm0");
++/* On some machines, a program without constraints may pass without -msse2 but
++   those with constraints in spv.c fail, thus we test with constraints here. */
++asm volatile ("pmuludq %%xmm2, %%xmm0" : : :"%xmm0");
+ #else
+ #error
+ #IRIXdoesnotexitaterrordirective
+@@ -11868,9 +11868,9 @@
+ main ()
+ {
+ #if (defined(__GNUC__) || defined(__ICL)) && defined(__i386__)
+-/* When there are no constraints, registers are referred to by
+-   single % sign, not double. Argh */
+-asm volatile ("pmuludq %xmm2, %xmm0");
++/* On some machines, a program without constraints may pass without -msse2 but
++   those with constraints in spv.c fail, thus we test with constraints here. */
++asm volatile ("pmuludq %%xmm2, %%xmm0" : : :"%xmm0");
+ #else
+ #error
+ #IRIXdoesnotexitaterrordirective
diff -Nru gmp-ecm-6.3/debian/patches/series gmp-ecm-6.3/debian/patches/series
--- gmp-ecm-6.3/debian/patches/series	2011-09-26 17:53:55.000000000 -0400
+++ gmp-ecm-6.3/debian/patches/series	2011-11-30 13:40:56.000000000 -0500
@@ -1,3 +1,4 @@
 0001-Link-libecm.so-against-libgmp.patch
 0002-Disable-assembly-on-mips.patch
 0003-Rerun-autoreconf.patch
+0004-Fix-SSE2-support.patch

Reply via email to