Package: a2jmidid Version: 9-2 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu impish ubuntu-patch
Dear Maintainer, building on RISC-V fails. In Ubuntu, the attached patch was applied to achieve the following: * Enable building on RISC-V (LP: #1945803) Thanks for considering the patch. -- System Information: Debian Release: 11.0 APT prefers impish APT policy: (500, 'impish') Architecture: riscv64 Kernel: Linux 5.13.0-1003-generic (SMP w/4 CPU threads) Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru a2jmidid-9/debian/patches/0001-sigsegv-enable-RISC-V-build.patch a2jmidid-9/debian/patches/0001-sigsegv-enable-RISC-V-build.patch --- a2jmidid-9/debian/patches/0001-sigsegv-enable-RISC-V-build.patch 1970-01-01 01:00:00.000000000 +0100 +++ a2jmidid-9/debian/patches/0001-sigsegv-enable-RISC-V-build.patch 2021-10-01 16:18:06.000000000 +0200 @@ -0,0 +1,47 @@ +From 2c3fbef6854743416d95d85b1565dde51668488c Mon Sep 17 00:00:00 2001 +From: Heinrich Schuchardt <heinrich.schucha...@canonical.com> +Date: Fri, 1 Oct 2021 16:15:29 +0200 +Subject: [PATCH 1/1] sigsegv: enable RISC-V build +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Avoid build error + +../sigsegv.c:104:39: error: ‘mcontext_t’ has no member named ‘gregs’; +did you mean ‘__gregs’? + 104 | ucontext->uc_mcontext.gregs[i] + | ^~~~~ + +Signed-off-by: Heinrich Schuchardt <heinrich.schucha...@canonical.com> +--- + sigsegv.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/sigsegv.c b/sigsegv.c +index fb4456e..6930185 100644 +--- a/sigsegv.c ++++ b/sigsegv.c +@@ -91,7 +91,9 @@ static void signal_segv(int signum, siginfo_t* info, void*ptr) { + a2j_error("info.si_errno = %d", info->si_errno); + a2j_error("info.si_code = %d (%s)", info->si_code, si_codes[info->si_code]); + a2j_error("info.si_addr = %p", info->si_addr); +-#if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) && !defined(__aarch64__) ++#if !defined(__alpha__) && !defined(__ia64__) && \ ++ !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && \ ++ !defined(__sh__) && !defined(__aarch64__) && !defined(__riscv) + for(i = 0; i < NGREG; i++) + a2j_error("reg[%02d] = 0x" REGFORMAT, i, + #if defined(__powerpc__) && !defined(__powerpc64__) +@@ -108,7 +110,7 @@ static void signal_segv(int signum, siginfo_t* info, void*ptr) { + ucontext->uc_mcontext.gregs[i] + #endif + ); +-#endif /* alpha, ia64, kFreeBSD, arm, hppa, aarch64 */ ++#endif /* alpha, ia64, kFreeBSD, arm, hppa, aarch64, riscv */ + + #if defined(SIGSEGV_STACK_X86) || defined(SIGSEGV_STACK_IA64) + # if defined(SIGSEGV_STACK_IA64) +-- +2.32.0 + diff -Nru a2jmidid-9/debian/patches/series a2jmidid-9/debian/patches/series --- a2jmidid-9/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ a2jmidid-9/debian/patches/series 2021-10-01 16:18:52.000000000 +0200 @@ -0,0 +1 @@ +0001-sigsegv-enable-RISC-V-build.patch