[LIBGPG-ERROR PATCH] update build architectures to support i[456]86-pc{, -linux, -kfreebsd}-gnu.h

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Sep 17 03:20:46 CEST 2015


i486-pc, i586-pc, and i686-pc all use the same ABI given the GNU
userland and a specific kernel.

This changeset updates the arch-specific lock-obj header generation to
treat the hardware aliases explicitly and should improve
cross-building for anyone wanting to target any of these 9
architectures.

It also removes src/syscfg/lock-obj-pub.i486-pc-linux-gnu.h, which
should be handled by the alias to
src/syscfg/lock-obj-pub.i686-pc-linux-gnu.h

Debian-Bug-Id: 799177
---
 src/mkheader.c                                 |  4 ++++
 src/syscfg/lock-obj-pub.i486-pc-gnu.h          | 24 ------------------------
 src/syscfg/lock-obj-pub.i486-pc-kfreebsd-gnu.h | 23 -----------------------
 src/syscfg/lock-obj-pub.i486-pc-linux-gnu.h    | 23 -----------------------
 src/syscfg/lock-obj-pub.i686-pc-gnu.h          | 24 ++++++++++++++++++++++++
 src/syscfg/lock-obj-pub.i686-pc-kfreebsd-gnu.h | 23 +++++++++++++++++++++++
 6 files changed, 51 insertions(+), 70 deletions(-)
 delete mode 100644 src/syscfg/lock-obj-pub.i486-pc-gnu.h
 delete mode 100644 src/syscfg/lock-obj-pub.i486-pc-kfreebsd-gnu.h
 delete mode 100644 src/syscfg/lock-obj-pub.i486-pc-linux-gnu.h
 create mode 100644 src/syscfg/lock-obj-pub.i686-pc-gnu.h
 create mode 100644 src/syscfg/lock-obj-pub.i686-pc-kfreebsd-gnu.h

diff --git a/src/mkheader.c b/src/mkheader.c
index b8fd783..875a0f5 100644
--- a/src/mkheader.c
+++ b/src/mkheader.c
@@ -77,6 +77,10 @@ canon_host_triplet (const char *triplet)
   } tbl[] = {
     {"i486-pc-linux-gnu", "i686-pc-linux-gnu" },
     {"i586-pc-linux-gnu" },
+    {"i486-pc-gnu", "i686-pc-gnu"},
+    {"i586-pc-gnu"},
+    {"i486-pc-kfreebsd-gnu", "i686-pc-kfreebsd-gnu"},
+    {"i586-pc-kfreebsd-gnu"},
 
     { NULL }
   };
diff --git a/src/syscfg/lock-obj-pub.i486-pc-gnu.h b/src/syscfg/lock-obj-pub.i486-pc-gnu.h
deleted file mode 100644
index 59b61e1..0000000
--- a/src/syscfg/lock-obj-pub.i486-pc-gnu.h
+++ /dev/null
@@ -1,24 +0,0 @@
-## lock-obj-pub.i486-pc-gnu.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[32];
-    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}}}
-##
-## Local Variables:
-## mode: c
-## buffer-read-only: t
-## End:
-##
diff --git a/src/syscfg/lock-obj-pub.i486-pc-kfreebsd-gnu.h b/src/syscfg/lock-obj-pub.i486-pc-kfreebsd-gnu.h
deleted file mode 100644
index 8a680d1..0000000
--- a/src/syscfg/lock-obj-pub.i486-pc-kfreebsd-gnu.h
+++ /dev/null
@@ -1,23 +0,0 @@
-## lock-obj-pub.i486-pc-kfreebsd-gnu.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[24];
-    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}}}
-##
-## Local Variables:
-## mode: c
-## buffer-read-only: t
-## End:
-##
diff --git a/src/syscfg/lock-obj-pub.i486-pc-linux-gnu.h b/src/syscfg/lock-obj-pub.i486-pc-linux-gnu.h
deleted file mode 100644
index f1849c4..0000000
--- a/src/syscfg/lock-obj-pub.i486-pc-linux-gnu.h
+++ /dev/null
@@ -1,23 +0,0 @@
-## lock-obj-pub.i486-pc-linux-gnu.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[24];
-    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}}}
-##
-## Local Variables:
-## mode: c
-## buffer-read-only: t
-## End:
-##
diff --git a/src/syscfg/lock-obj-pub.i686-pc-gnu.h b/src/syscfg/lock-obj-pub.i686-pc-gnu.h
new file mode 100644
index 0000000..0522462
--- /dev/null
+++ b/src/syscfg/lock-obj-pub.i686-pc-gnu.h
@@ -0,0 +1,24 @@
+## lock-obj-pub.i686-pc-gnu.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[32];
+    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}}}
+##
+## Local Variables:
+## mode: c
+## buffer-read-only: t
+## End:
+##
diff --git a/src/syscfg/lock-obj-pub.i686-pc-kfreebsd-gnu.h b/src/syscfg/lock-obj-pub.i686-pc-kfreebsd-gnu.h
new file mode 100644
index 0000000..4cf12fc
--- /dev/null
+++ b/src/syscfg/lock-obj-pub.i686-pc-kfreebsd-gnu.h
@@ -0,0 +1,23 @@
+## lock-obj-pub.i686-pc-kfreebsd-gnu.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[24];
+    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}}}
+##
+## Local Variables:
+## mode: c
+## buffer-read-only: t
+## End:
+##
-- 
2.5.1




More information about the Gnupg-devel mailing list