From b567a03adbbaf59f064cf8f952d2430c3eadc66d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 19 Dec 2009 08:13:39 -0800 Subject: gmp-4.2.4: Dont use 'h' asm constraint on mips. Signed-off-by: Khem Raj --- .../gmp/gmp-4.2.4/dont_use_mips_h_constraint.patch | 39 ++++++++++++++++++++++ recipes/gmp/gmp_4.2.4.bb | 3 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 recipes/gmp/gmp-4.2.4/dont_use_mips_h_constraint.patch (limited to 'recipes') diff --git a/recipes/gmp/gmp-4.2.4/dont_use_mips_h_constraint.patch b/recipes/gmp/gmp-4.2.4/dont_use_mips_h_constraint.patch new file mode 100644 index 0000000000..f94116a9c0 --- /dev/null +++ b/recipes/gmp/gmp-4.2.4/dont_use_mips_h_constraint.patch @@ -0,0 +1,39 @@ +Index: gmp-4.2.4/longlong.h +=================================================================== +--- gmp-4.2.4.orig/longlong.h 2009-12-18 19:19:02.882100436 -0800 ++++ gmp-4.2.4/longlong.h 2009-12-18 19:21:00.422064316 -0800 +@@ -1014,7 +1014,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 +@@ -1027,7 +1035,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/gmp/gmp_4.2.4.bb b/recipes/gmp/gmp_4.2.4.bb index 9aa5bf8edc..2b4b09be4a 100644 --- a/recipes/gmp/gmp_4.2.4.bb +++ b/recipes/gmp/gmp_4.2.4.bb @@ -1,8 +1,9 @@ INC_PR = "r0" -PR = "${INC_PR}.4" +PR = "${INC_PR}.5" SRC_URI_append += "file://sh4-asmfix.patch;patch=1 \ file://use-includedir.patch;patch=1 \ + file://dont_use_mips_h_constraint.patch;patch=1 \ " require gmp.inc LICENSE = "GPLv3 LGPLv3" -- cgit 1.2.3-korg