From c313ecd0f15e2f2f0ed13998c0daf2d574247988 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 19 Dec 2009 08:15:45 -0800 Subject: [PATCH] mpfr_2.3.1.bb: Dont use 'h' asm constraint on mips. Signed-off-by: Khem Raj --- recipes/mpfr/dont_use_mips_h_constraint.patch | 39 +++++++++++++++++++ recipes/mpfr/mpfr_2.3.1.bb | 6 ++- 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 recipes/mpfr/dont_use_mips_h_constraint.patch diff --git a/recipes/mpfr/dont_use_mips_h_constraint.patch b/recipes/mpfr/dont_use_mips_h_constraint.patch new file mode 100644 index 0000000000..055e494491 --- /dev/null +++ b/recipes/mpfr/dont_use_mips_h_constraint.patch @@ -0,0 +1,39 @@ +Index: mpfr-2.3.1/mpfr-longlong.h +=================================================================== +--- mpfr-2.3.1.orig/mpfr-longlong.h 2009-12-18 19:22:54.372096301 -0800 ++++ mpfr-2.3.1/mpfr-longlong.h 2009-12-18 19:24:21.832074034 -0800 +@@ -1011,7 +1011,15 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO ( + #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 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO ( + #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 diff --git a/recipes/mpfr/mpfr_2.3.1.bb b/recipes/mpfr/mpfr_2.3.1.bb index 8da9c0e37f..5e415a1a0b 100644 --- a/recipes/mpfr/mpfr_2.3.1.bb +++ b/recipes/mpfr/mpfr_2.3.1.bb @@ -1,10 +1,12 @@ require mpfr.inc DEPENDS = "gmp" -PR = "r0" +PR = "r1" SRC_URI = "http://www.mpfr.org/mpfr-${PV}/mpfr-${PV}.tar.bz2 \ - file://long-long-thumb.patch;patch=1" + file://long-long-thumb.patch;patch=1 \ + file://dont_use_mips_h_constraint.patch;patch=1 \ + " S = "${WORKDIR}/mpfr-${PV}" do_stage() { -- 2.39.5