Mailing List Archive

[PATCH libgpg-error] hurd-amd64 support
This supports the x86_64-pc-gnu triplet

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---

Index: libgpg-error-1.46/src/Makefile.am
===================================================================
--- libgpg-error-1.46.orig/src/Makefile.am
+++ libgpg-error-1.46/src/Makefile.am
@@ -67,6 +67,7 @@ lock_obj_pub = \
syscfg/lock-obj-pub.sparc-unknown-linux-gnu.h \
syscfg/lock-obj-pub.sparc64-unknown-linux-gnu.h \
syscfg/lock-obj-pub.x86_64-apple-darwin.h \
+ syscfg/lock-obj-pub.x86_64-unknown-gnu.h \
syscfg/lock-obj-pub.x86_64-unknown-kfreebsd-gnu.h \
syscfg/lock-obj-pub.x86_64-unknown-linux-gnu.h \
syscfg/lock-obj-pub.x86_64-unknown-linux-gnux32.h \
Index: libgpg-error-1.46/src/mkheader.c
===================================================================
--- libgpg-error-1.46.orig/src/mkheader.c
+++ libgpg-error-1.46/src/mkheader.c
@@ -108,6 +108,8 @@ canon_host_triplet (const char *triplet,
{"x86_64-pc-linux-gnuhardened1", "x86_64-unknown-linux-gnu" },
{"x86_64-pc-linux-gnu" },

+ {"x86_64-pc-gnu"},
+
{"powerpc-unknown-linux-gnuspe", "powerpc-unknown-linux-gnu" },

{"arm-unknown-linux-gnueabihf", "arm-unknown-linux-gnueabi" },
Index: libgpg-error-1.46/src/syscfg/lock-obj-pub.x86_64-unknown-gnu.h
===================================================================
--- /dev/null
+++ libgpg-error-1.46/src/syscfg/lock-obj-pub.x86_64-unknown-gnu.h
@@ -0,0 +1,24 @@
+## lock-obj-pub.x86_64-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:
+##
Re: [PATCH libgpg-error] hurd-amd64 support [ In reply to ]
Hi!

> This supports the x86_64-pc-gnu triplet

Applied. Thanks.


Salam-Shalom,

Werner

--
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein
Re: [PATCH libgpg-error] hurd-amd64 support [ In reply to ]
Hello,

It's nice to have GnuPG on another GNU Hurd system.

Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
> This supports the x86_64-pc-gnu triplet

I wonder if it works for GNU Hurd system:

diff --git a/configure.ac b/configure.ac
index d0fa6f2..ca7731c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -590,7 +590,7 @@ if test x"$gl_use_threads" = xno; then
AC_MSG_NOTICE([generated src/lock-obj-pub.native.h for $host])
elif test x$cross_compiling = xyes; then
case $host in
- *-*-linux-gnu* | *-*-linux-musl*)
+ *-*-gnu* | *-*-linux-gnu* | *-*-linux-musl*)
AC_CHECK_TOOL(OBJDUMP, [objdump])
if test -n "$OBJDUMP"; then
lock_obj_h_generated=yes


The change enables generating the header file from the output of cross
compiler (by src/gen-lock-obj.sh) for *-*-gnu* host on cross
compilation.

If it works, we won't need to add an entry to syscfg/ for each new
architecture in future.
--

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: [PATCH libgpg-error] hurd-amd64 support [ In reply to ]
NIIBE Yutaka, le jeu. 25 mai 2023 09:21:43 +0900, a ecrit:
> I wonder if it works for GNU Hurd system:
>
> diff --git a/configure.ac b/configure.ac
> index d0fa6f2..ca7731c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -590,7 +590,7 @@ if test x"$gl_use_threads" = xno; then
> AC_MSG_NOTICE([generated src/lock-obj-pub.native.h for $host])
> elif test x$cross_compiling = xyes; then
> case $host in
> - *-*-linux-gnu* | *-*-linux-musl*)
> + *-*-gnu* | *-*-linux-gnu* | *-*-linux-musl*)
> AC_CHECK_TOOL(OBJDUMP, [objdump])
> if test -n "$OBJDUMP"; then
> lock_obj_h_generated=yes
>
>
> The change enables generating the header file from the output of cross
> compiler (by src/gen-lock-obj.sh) for *-*-gnu* host on cross
> compilation.
>
> If it works, we won't need to add an entry to syscfg/ for each new
> architecture in future.

Yes that does work, it generats a proper src/lock-obj-pub.native.h file

Samuel

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-devel