summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch')
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch
new file mode 100644
index 0000000000..b101a5bbe7
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch
@@ -0,0 +1,42 @@
1Index: gnupg-1.4.10/mpi/longlong.h
2===================================================================
3--- gnupg-1.4.10.orig/mpi/longlong.h 2008-12-11 17:39:43.000000000 +0100
4+++ gnupg-1.4.10/mpi/longlong.h 2010-03-27 14:27:53.000000000 +0100
5@@ -706,18 +706,35 @@
6 #endif /* __m88110__ */
7 #endif /* __m88000__ */
8
9+/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */
10+#if defined (__GNUC__) && defined (__GNUC_MINOR__)
11+#define __GNUC_PREREQ(maj, min) \
12+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
13+#else
14+#define __GNUC_PREREQ(maj, min) 0
15+#endif
16+
17 /***************************************
18 ************** MIPS *****************
19 ***************************************/
20 #if defined (__mips__) && W_TYPE_SIZE == 32
21-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
22+#if __GNUC_PREREQ (4,4)
23+#define umul_ppmm(w1, w0, u, v) \
24+ do { \
25+ UDItype __ll = (UDItype)(u) * (v); \
26+ w1 = __ll >> 32; \
27+ w0 = __ll; \
28+ } while (0)
29+#endif
30+#if !defined (umul_ppmm) && __GNUC_PREREQ (2,7)
31 #define umul_ppmm(w1, w0, u, v) \
32 __asm__ ("multu %2,%3" \
33 : "=l" ((USItype)(w0)), \
34 "=h" ((USItype)(w1)) \
35 : "d" ((USItype)(u)), \
36 "d" ((USItype)(v)))
37-#else
38+#endif
39+#if !defined (umul_ppmm)
40 #define umul_ppmm(w1, w0, u, v) \
41 __asm__ ("multu %2,%3 \n" \
42 "mflo %0 \n" \