Bug#560221: mpfr/mips(el): FTBFS with gcc-4.4

2009-12-09 Thread Aurelien Jarno
Package: mpfr
Version: 2.4.2-2
Severity: serious
Tags: patch
Justification: no longer builds from source

mpfr fails to build on mips(el) with gcc-4.4. A full build log can be
found here:
https://buildd.debian.org/fetch.cgi?pkg=mpfrarch=mipselver=2.4.2-2stamp=1260358474file=logas=raw

This is due to a change in GCC 4.4, the h asm constraint is not 
supported anymore on mips. For more details please see:
http://gcc.gnu.org/gcc-4.4/changes.html

The patch below fixes the problem by implementing the solution
recommended the previous web page. With it, mpfr builds and 
passes the testsuite.

--- mpfr-2.4.2.orig/mpfr-longlong.h
+++ mpfr-2.4.2/mpfr-longlong.h
@@ -1011,7 +1011,15 @@
 #endif /* __m88000__ */
 
 #if defined (__mips)  W_TYPE_SIZE == 32
-#if __GNUC__  2 || __GNUC_MINOR__ = 7
+#if (__GNUC__ = 5) || (__GNUC__ = 4  __GNUC_MINOR__ = 4)
+#define umul_ppmm(w1, w0, u, v) \
+  do { \
+UDItype _r;\
+_r = (UDItype) u * v;  \
+(w1) = _r  32;   \
+(w0) = (USItype) _r;   \
+  } while (0)
+#elif __GNUC__  2 || __GNUC_MINOR__ = 7
 #define umul_ppmm(w1, w0, u, v) \
   __asm__ (multu %2,%3 : =l (w0), =h (w1) : d (u), d (v))
 #else
@@ -1024,7 +1032,16 @@
 #endif /* __mips */
 
 #if (defined (__mips)  __mips = 3)  W_TYPE_SIZE == 64
-#if __GNUC__  2 || __GNUC_MINOR__ = 7
+#if (__GNUC__ = 5) || (__GNUC__ = 4  __GNUC_MINOR__ = 4)
+typedef unsigned int UTItype __attribute__ ((mode (TI)));
+#define umul_ppmm(w1, w0, u, v) \
+  do { \
+UTItype _r;\
+_r = (UTItype) u * v;  \
+(w1) = _r  64;   \
+(w0) = (UDItype) _r;   \
+  } while (0)
+#elif __GNUC__  2 || __GNUC_MINOR__ = 7
 #define umul_ppmm(w1, w0, u, v) \
   __asm__ (dmultu %2,%3 : =l (w0), =h (w1) : d (u), d (v))
 #else

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: mipsel (mips64)

Kernel: Linux 2.6.26-2-5kc-malta
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#560221: mpfr/mips(el): FTBFS with gcc-4.4

2009-12-09 Thread Laurent Fousse
Hello,

* Aurelien Jarno [Wed, Dec 09, 2009 at 09:31:57PM +0100]:
 mpfr fails to build on mips(el) with gcc-4.4. A full build log can be
 found here:
 https://buildd.debian.org/fetch.cgi?pkg=mpfrarch=mipselver=2.4.2-2stamp=1260358474file=logas=raw
 
 This is due to a change in GCC 4.4, the h asm constraint is not 
 supported anymore on mips. For more details please see:
 http://gcc.gnu.org/gcc-4.4/changes.html
 
 The patch below fixes the problem by implementing the solution
 recommended the previous web page. With it, mpfr builds and 
 passes the testsuite.

Thank you for the report and the patch. It should be uploaded shortly.

Laurent.



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org