Source: libgpg-error Version: 1.27-6 X-Debbugs-CC: debian-ri...@lists.debian.org Tags: patch Severity: wishlist User: debian-ri...@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.
## 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: ##
>From cec778b68abe56de49f838af5754348494778abe Mon Sep 17 00:00:00 2001 From: Karsten Merker <mer...@debian.org> Date: Tue, 27 Feb 2018 19:43:09 +0000 Subject: [PATCH] add riscv64-unknown-linux-gnu lock-obj definitions --- ...bj-pub-file-for-riscv64-unknown-linux-gnu.patch | 30 ++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 31 insertions(+) create mode 100644 debian/patches/0017-syscfg-Add-lock-obj-pub-file-for-riscv64-unknown-linux-gnu.patch diff --git a/debian/patches/0017-syscfg-Add-lock-obj-pub-file-for-riscv64-unknown-linux-gnu.patch b/debian/patches/0017-syscfg-Add-lock-obj-pub-file-for-riscv64-unknown-linux-gnu.patch new file mode 100644 index 0000000..19ec11a --- /dev/null +++ b/debian/patches/0017-syscfg-Add-lock-obj-pub-file-for-riscv64-unknown-linux-gnu.patch @@ -0,0 +1,30 @@ +Index: libgpg-error/src/syscfg/lock-obj-pub.riscv64-unknown-linux-gnu.h +=================================================================== +--- /dev/null ++++ libgpg-error/src/syscfg/lock-obj-pub.riscv64-unknown-linux-gnu.h +@@ -0,0 +1,25 @@ ++## 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: ++## diff --git a/debian/patches/series b/debian/patches/series index 9d0097a..af6b832 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -14,3 +14,4 @@ 0014-yat2m-Change-bug-report-address.patch 0015-build-Install-yat2m.patch 0016-use-compiler-flags-for-yat2m.patch +0017-syscfg-Add-lock-obj-pub-file-for-riscv64-unknown-linux-gnu.patch -- 2.16.2