summaryrefslogtreecommitdiff
path: root/recipes
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2009-12-19 08:13:39 -0800
committerKhem Raj <raj.khem@gmail.com>2009-12-19 08:13:39 -0800
commitb567a03adbbaf59f064cf8f952d2430c3eadc66d (patch)
tree177bfb9e31bc2df59a3593d399c1edeb5699548b /recipes
parenta030c6b8e12445a266a8673efe589375baf93ccc (diff)
gmp-4.2.4: Dont use 'h' asm constraint on mips.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes')
-rw-r--r--recipes/gmp/gmp-4.2.4/dont_use_mips_h_constraint.patch39
-rw-r--r--recipes/gmp/gmp_4.2.4.bb3
2 files changed, 41 insertions, 1 deletions
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"