Source: libgpg-error
Version: 1.37-1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

libgpg-error fails to cross build from source when building for mips64
(big endian), because there is no lock-obj-pub.h for mips64 in the
syscfg folder. I asked YunQiang Su to create one natively. He kindly did
and reported that it is identical to the mips64el one (which is
reasonable as all sizeofs match mips64 and the initializer is all
zeros). I've attached a patch for your convenience, but the credit goes
to YunQiang Su.

Helmut
Index: libgpg-error-1.37/src/syscfg/lock-obj-pub.mips64-unknown-linux-gnuabi64.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ libgpg-error-1.37/src/syscfg/lock-obj-pub.mips64-unknown-linux-gnuabi64.h	2020-05-10 07:06:22.249081290 +0200
@@ -0,0 +1,25 @@
+## lock-obj-pub.mips64-unknown-linux-gnuabi64.h
+## File created by gen-posix-lock-obj - DO NOT EDIT
+## To be included by mkheader into gpg-error.h
+
+typedef struct
+{
+  long _vers;
+  union {
+    volatile char _priv[40];
+    long _x_align;
+    long *_xp_align;
+  } u;
+} gpgrt_lock_t;
+
+#define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \
+                                    0,0,0,0,0,0,0,0, \
+                                    0,0,0,0,0,0,0,0, \
+                                    0,0,0,0,0,0,0,0, \
+                                    0,0,0,0,0,0,0,0}}}
+##
+## Local Variables:
+## mode: c
+## buffer-read-only: t
+## End:
+##
Index: libgpg-error-1.37/src/Makefile.am
===================================================================
--- libgpg-error-1.37.orig/src/Makefile.am	2020-02-06 18:39:06.000000000 +0100
+++ libgpg-error-1.37/src/Makefile.am	2020-05-10 07:07:13.932190364 +0200
@@ -59,6 +59,7 @@
         syscfg/lock-obj-pub.m68k-unknown-linux-gnu.h        \
         syscfg/lock-obj-pub.mips-unknown-linux-gnu.h        \
         syscfg/lock-obj-pub.mips64el-unknown-linux-gnuabi64.h \
+        syscfg/lock-obj-pub.mips64-unknown-linux-gnuabi64.h \
         syscfg/lock-obj-pub.mipsel-unknown-linux-gnu.h      \
 	syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h       \
         syscfg/lock-obj-pub.or1k-unknown-linux-gnu.h        \
Index: libgpg-error-1.37/src/Makefile.in
===================================================================
--- libgpg-error-1.37.orig/src/Makefile.in	2020-02-07 13:17:38.000000000 +0100
+++ libgpg-error-1.37/src/Makefile.in	2020-05-10 07:07:20.160081571 +0200
@@ -537,6 +537,7 @@
         syscfg/lock-obj-pub.m68k-unknown-linux-gnu.h        \
         syscfg/lock-obj-pub.mips-unknown-linux-gnu.h        \
         syscfg/lock-obj-pub.mips64el-unknown-linux-gnuabi64.h \
+        syscfg/lock-obj-pub.mips64-unknown-linux-gnuabi64.h \
         syscfg/lock-obj-pub.mipsel-unknown-linux-gnu.h      \
 	syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h       \
         syscfg/lock-obj-pub.or1k-unknown-linux-gnu.h        \

Reply via email to