summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolić <jsmolic@gentoo.org>2024-06-25 18:29:52 +0200
committerJakov Smolić <jsmolic@gentoo.org>2024-06-25 18:31:19 +0200
commitdc5945848571723b42e3b01bb36c4aa09dacaa27 (patch)
treed044019a1fd3a735560ca8ec4d75b8a5c0a807a8 /dev-lisp
parentapp-arch/7zip: add ~arm64 keyword (diff)
downloadgentoo-dc5945848571723b42e3b01bb36c4aa09dacaa27.tar.gz
gentoo-dc5945848571723b42e3b01bb36c4aa09dacaa27.tar.bz2
gentoo-dc5945848571723b42e3b01bb36c4aa09dacaa27.zip
dev-lisp/gcl: Apply upstream patch for risc-v relocations
Closes: https://bugs.gentoo.org/893938 Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>
Diffstat (limited to 'dev-lisp')
-rw-r--r--dev-lisp/gcl/files/gcl-2.6.15-riscv.patch67
-rw-r--r--dev-lisp/gcl/gcl-2.6.15_pre3.ebuild6
2 files changed, 72 insertions, 1 deletions
diff --git a/dev-lisp/gcl/files/gcl-2.6.15-riscv.patch b/dev-lisp/gcl/files/gcl-2.6.15-riscv.patch
new file mode 100644
index 000000000000..1250ac2cf1e0
--- /dev/null
+++ b/dev-lisp/gcl/files/gcl-2.6.15-riscv.patch
@@ -0,0 +1,67 @@
+From bc3324432b859477feed47e7db0e97dd33b61d1f Mon Sep 17 00:00:00 2001
+From: Camm Maguire <camm@transcendence.maguirefamily.org>
+Date: Fri, 23 Feb 2024 07:47:26 -0500
+Subject: update relocs for riscv64
+
+---
+ gcl/h/elf64_riscv64_reloc.h | 44 +++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 43 insertions(+), 1 deletion(-)
+
+diff --git a/gcl/h/elf64_riscv64_reloc.h b/gcl/h/elf64_riscv64_reloc.h
+index c2f8232..08e94ce 100644
+--- a/h/elf64_riscv64_reloc.h
++++ b/h/elf64_riscv64_reloc.h
+@@ -23,8 +23,50 @@
+ case R_RISCV_JAL:
+ break;
+ case R_RISCV_64:
+- store_val(where,MASK(64),(s+a));
++ store_val(where,~0L,(s+a));
+ break;
+ case R_RISCV_32:
+ store_val(where,MASK(32),(s+a));
+ break;
++ case R_RISCV_32_PCREL:
++ store_val(where,MASK(32),(s+a)-p);
++ break;
++ case R_RISCV_ADD8:
++ add_val(where,MASK(8),(s+a));
++ break;
++ case R_RISCV_ADD16:
++ add_val(where,MASK(16),(s+a));
++ break;
++ case R_RISCV_ADD32:
++ add_val(where,MASK(32),(s+a));
++ break;
++ case R_RISCV_ADD64:
++ add_val(where,~0L,(s+a));
++ break;
++ case R_RISCV_SUB6:
++ add_val(where,MASK(6),-(s+a));
++ break;
++ case R_RISCV_SUB8:
++ add_val(where,MASK(8),-(s+a));
++ break;
++ case R_RISCV_SUB16:
++ add_val(where,MASK(16),-(s+a));
++ break;
++ case R_RISCV_SUB32:
++ add_val(where,MASK(32),-(s+a));
++ break;
++ case R_RISCV_SUB64:
++ add_val(where,~0L,-(s+a));
++ break;
++ case R_RISCV_SET6:
++ store_val(where,MASK(6),(s+a));
++ break;
++ case R_RISCV_SET8:
++ store_val(where,MASK(8),(s+a));
++ break;
++ case R_RISCV_SET16:
++ store_val(where,MASK(16),(s+a));
++ break;
++ case R_RISCV_SET32:
++ store_val(where,MASK(32),(s+a));
++ break;
+--
+cgit v1.1
diff --git a/dev-lisp/gcl/gcl-2.6.15_pre3.ebuild b/dev-lisp/gcl/gcl-2.6.15_pre3.ebuild
index dd6b7e3a812d..7d14fb1a28a3 100644
--- a/dev-lisp/gcl/gcl-2.6.15_pre3.ebuild
+++ b/dev-lisp/gcl/gcl-2.6.15_pre3.ebuild
@@ -27,7 +27,11 @@ DEPEND="${RDEPEND}
app-text/texi2html
>=dev-build/autoconf-2.52"
-PATCHES=( "${WORKDIR}"/${PF}-spelling.patch )
+PATCHES=(
+ "${WORKDIR}"/${PF}-spelling.patch
+ # bug 893938
+ "${FILESDIR}"/${PN}-2.6.15-riscv.patch
+)
S="${WORKDIR}"/${PN}-Version_2_6_15pre3/${PN}
src_configure() {