Commit 38a57f60 authored by Edward Wang's avatar Edward Wang Committed by Jean-Baptiste Kempf

gmp: fix compilation on mipsel

GCC 4.4+ no longer accepts the "=h" constraint.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 5e1759b9
--- gmp/longlong.h 2006-03-14 10:57:54.000000000 -0500
+++ gmp/longlong.h 2013-08-12 12:03:50.080931954 -0400
@@ -1011,7 +1011,19 @@
#endif /* __m88000__ */
#if defined (__mips) && W_TYPE_SIZE == 32
-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
+
+#define GCC_VERSION (__GNUC__ * 10000 \
+ + __GNUC_MINOR__ * 100 \
+ + __GNUC_PATCHLEVEL__)
+
+#if GCC_VERSION >= 40400
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ uint64_t res = u*v; \
+ w1 = res >> 32; \
+ w0 = res; \
+ } while(0);
+#elif GCC_VERSION >= 20700
#define umul_ppmm(w1, w0, u, v) \
__asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
#else
......@@ -15,6 +15,7 @@ gmp: gmp-$(GMP_VERSION).tar.bz2 .sum-gmp
$(UNPACK)
$(APPLY) $(SRC)/gmp/inline.diff
$(APPLY) $(SRC)/gmp/arm.diff
$(APPLY) $(SRC)/gmp/mips.diff
$(APPLY) $(SRC)/gmp/ansitest.diff
$(APPLY) $(SRC)/gmp/ansi2knr.diff
$(MOVE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment