[oe-commits] Khem Raj : gnupg: Fix compilation when using gcc 4.4+

git version control git at git.openembedded.org
Tue Dec 22 09:50:14 UTC 2009


Module: openembedded.git
Branch: martin_jansa/xorg-7.5
Commit: a030c6b8e12445a266a8673efe589375baf93ccc
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=a030c6b8e12445a266a8673efe589375baf93ccc

Author: Khem Raj <raj.khem at gmail.com>
Date:   Fri Dec 18 19:03:42 2009 -0800

gnupg: Fix compilation when using gcc 4.4+

* 'h' contraint for mips inline asm has been dropped
   starting gcc 4.4 so we need to replace its usage
   with equivalent code.

Signed-off-by: Khem Raj <raj.khem at gmail.com>

---

 .../gnupg-1.4.2.2/dont_use_mips_h_constraint.patch |   48 ++++++++++++++++++++
 recipes/gnupg/gnupg_1.4.2.2.bb                     |    6 ++-
 2 files changed, 52 insertions(+), 2 deletions(-)

diff --git a/recipes/gnupg/gnupg-1.4.2.2/dont_use_mips_h_constraint.patch b/recipes/gnupg/gnupg-1.4.2.2/dont_use_mips_h_constraint.patch
new file mode 100644
index 0000000..e0212b8
--- /dev/null
+++ b/recipes/gnupg/gnupg-1.4.2.2/dont_use_mips_h_constraint.patch
@@ -0,0 +1,48 @@
+Avoid using h contraint on mips for gcc >= 4.4 as it has been removed
+on gcc 4.4 onwards
+
+see
+
+http://gcc.gnu.org/gcc-4.4/changes.html
+
+-Khem
+
+Index: gnupg-1.4.2.2/mpi/longlong.h
+===================================================================
+--- gnupg-1.4.2.2.orig/mpi/longlong.h	2009-12-18 16:44:21.334633084 -0800
++++ gnupg-1.4.2.2/mpi/longlong.h	2009-12-18 16:48:29.202212344 -0800
+@@ -711,7 +711,15 @@ extern USItype __udiv_qrnnd ();
+  **************  MIPS  *****************
+  ***************************************/
+ #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" ((USItype)(w0)),                                      \
+@@ -736,7 +744,16 @@ extern USItype __udiv_qrnnd ();
+  **************  MIPS/64  **************
+  ***************************************/
+ #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" ((UDItype)(w0)),                                      \
diff --git a/recipes/gnupg/gnupg_1.4.2.2.bb b/recipes/gnupg/gnupg_1.4.2.2.bb
index 6f63649..7f21a31 100644
--- a/recipes/gnupg/gnupg_1.4.2.2.bb
+++ b/recipes/gnupg/gnupg_1.4.2.2.bb
@@ -8,8 +8,10 @@ SRC_URI += "file://15_free_caps.patch;patch=1 \
 	    file://16_min_privileges.patch;patch=1 \
 	    file://22_zero_length_mpi_fix.patch;patch=1 \
             file://30_nm_always_check.patch;patch=1 \
-            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}/gnupg-${PV}"
 
-PR = "r3"
+PR = "r4"





More information about the Openembedded-commits mailing list