[pkg-gnupg-maint] Bug#891663: [PATCH] libgpg-error: Add support for the riscv64 architecture

Karsten Merker merker at debian.org
Tue Feb 27 20:06:46 UTC 2018


Source: libgpg-error
Version: 1.27-6
X-Debbugs-CC: debian-riscv at lists.debian.org
Tags: patch
Severity: wishlist
User: debian-riscv at lists.debian.org
Usertags: riscv64

Hello,

we are in the process of bootstrapping a Debian port for the
riscv64 architecture (https://wiki.debian.org/RISC-V).  The
libgpg-error package is part of the build-dependency chain for
the essential package set, so we need to build it for riscv64 to
be able to complete the bootstrap process.

AIUI, libgpg-error requires a per-architecture header file
"src/syscfg/lock-obj-pub.<arch-triple>.h", which upstream doesn't
provide for riscv64.  Based on the information in the header
files for the other architectures, I have created such a file for
riscv64 by cross-building and executing (in qemu) the
gen-posix-lock-obj helper program:

$ riscv64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../src -I..   -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -fdebug-prefix-map=/usr/src/repositories/libgpg-error=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wpointer-arith -Wno-psabi -fvisibility=hidden -c -o gen-posix-lock-obj.o ../../src/gen-posix-lock-obj.c
$ /bin/bash ../libtool  --tag=CC   --mode=link riscv64-linux-gnu-gcc  -g -O2 -fdebug-prefix-map=/usr/src/repositories/libgpg-error=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wpointer-arith -Wno-psabi -fvisibility=hidden  -specs=/usr/share/dpkg/pie-link.specs -Wl,-z,relro -Wl,-z,now -o gen-posix-lock-obj gen-posix-lock-obj.o
libtool: link: riscv64-linux-gnu-gcc -g -O2 -fdebug-prefix-map=/usr/src/repositories/libgpg-error=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wpointer-arith -Wno-psabi -fvisibility=hidden -specs=/usr/share/dpkg/pie-link.specs -Wl,-z -Wl,relro -Wl,-z -Wl,now -o gen-posix-lock-obj gen-posix-lock-obj.o
$ ./gen-posix-lock-obj   # (executed in qemu via binfmt-misc)
## lock-obj-pub.riscv64-unknown-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[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:
##

Attached is the raw header file as well as a patch for the
packaging to carry this header file as a Debian patch.  I would
apprechiate very much if you could upload a new package version
that includes this patch to unstable in the near future as we
depend on it for continuing our bootstrap efforts.

Regards,
Karsten
-- 
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lock-obj-pub.riscv64-unknown-linux-gnu.h
Type: text/x-chdr
Size: 621 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnupg-maint/attachments/20180227/3822fb28/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-add-riscv64-unknown-linux-gnu-lock-obj-definitions.patch
Type: text/x-diff
Size: 2134 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnupg-maint/attachments/20180227/3822fb28/attachment.patch>


More information about the pkg-gnupg-maint mailing list